Skip to content

feat: improve HTML semantics and buttons animation #428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/components/Button.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
import { getTitleAnimation } from '../animations'

const {
class: className,
isPrimary,
Expand All @@ -13,11 +15,14 @@ const {
{
href ? (
<a
className="transition-all h-fit flex items-center justify-center gap-2 rounded-full border-2 border-dark bg-dark p-2 text-sm text-paper shadow-sm hover:bg-paper hover:text-dark hover:duration-200 md:px-4"
client:load
{...getTitleAnimation(0.2)}
id={id}
{...extra}
href={href}
class:list={[
'transition-bg flex items-center justify-center gap-2 rounded-full px-6 py-2 transition-transform duration-200',
'transition-bg flex items-center justify-center gap-2 rounded-full px-6 py-2 transition-all duration-200',
className,
isPrimary
? 'border-2 border-dark bg-dark text-paper hover:bg-paper hover:text-dark'
Expand All @@ -32,13 +37,16 @@ const {
</a>
) : (
<button
className="transition-all h-fit flex items-center justify-center gap-2 rounded-full border-2 border-dark bg-dark p-2 text-sm text-paper shadow-sm hover:bg-paper hover:text-dark hover:duration-200 md:px-4"
client:load
{...getTitleAnimation(0.2)}
id={id}
{...extra}
class:list={[
'flex items-center justify-center gap-2 rounded-full px-6 py-2 transition-transform duration-200',
'transition-bg flex items-center justify-center gap-2 rounded-full px-6 py-2 transition-all duration-200',
className,
isPrimary
? 'bg-dark text-paper'
? 'border-2 border-dark bg-dark text-paper hover:bg-paper hover:text-dark'
: isAlert
? 'bg-red-300 text-dark'
: !isBordered
Expand Down
172 changes: 97 additions & 75 deletions src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -45,99 +45,121 @@ const Reddit = icon({ prefix: 'fab', iconName: 'reddit' })
<div class="flex flex-col gap-10">
<div class="flex flex-col gap-2">
<Description class="!font-semibold"> Follow Us </Description>
<div class="flex items-center gap-4 opacity-80">
<a
href="https://github.com/zen-browser"
target="_blank"
class="font-bold"
aria-label="Visit Zen Browser on GitHub"
>
<Fragment set:html={Github.html} />
</a>
<a
href="https://twitter.com/zen_browser"
target="_blank"
class="font-normal"
aria-label="Visit Zen Browser on Twitter"
>
<Fragment set:html={Twitter.html} />
</a>
<a
href="https://fosstodon.org/@zenbrowser"
target="_blank"
class="font-normal"
aria-label="Visit Zen Browser on Mastodon"
>
<Fragment set:html={Mastodon.html} />
</a>
<a
href="https://bsky.app/profile/zen-browser.app"
target="_blank"
class="font-normal"
aria-label="Visit Zen Browser on Bluesky"
>
<Fragment set:html={Bluesky.html} />
</a>
<a
href="https://www.reddit.com/r/zen_browser"
target="_blank"
class="font-normal"
aria-label="Visit Zen Browser on Reddit"
>
<Fragment set:html={Reddit.html} />
</a>
</div>
<ul class="flex items-center gap-4 opacity-80">
<li>
<a
href="https://github.com/zen-browser"
target="_blank"
class="font-bold"
aria-label="Visit Zen Browser on GitHub"
>
<Fragment set:html={Github.html} />
</a>
</li>
<li>
<a
href="https://twitter.com/zen_browser"
target="_blank"
class="font-normal"
aria-label="Visit Zen Browser on Twitter"
>
<Fragment set:html={Twitter.html} />
</a>
</li>
<li>
<a
href="https://fosstodon.org/@zenbrowser"
target="_blank"
class="font-normal"
aria-label="Visit Zen Browser on Mastodon"
>
<Fragment set:html={Mastodon.html} />
</a>
</li>
<li>
<a
href="https://bsky.app/profile/zen-browser.app"
target="_blank"
class="font-normal"
aria-label="Visit Zen Browser on Bluesky"
>
<Fragment set:html={Bluesky.html} />
</a>
</li>
<li>
<a
href="https://www.reddit.com/r/zen_browser"
target="_blank"
class="font-normal"
aria-label="Visit Zen Browser on Reddit"
>
<Fragment set:html={Reddit.html} />
</a>
</li>
</ul>
</div>
<div class="flex flex-col gap-2">
<Description class="!font-semibold"> About Us </Description>
<div class="flex flex-col opacity-80">
<a href="/about" class="font-normal">About Us</a>
<a href="/privacy-policy" class="font-normal">Privacy Policy</a>
</div>
<ul class="flex flex-col opacity-80">
<li><a href="/about" class="font-normal">About Us</a></li>
<li>
<a href="/privacy-policy" class="font-normal">Privacy Policy</a>
</li>
</ul>
</div>
</div>
<div class="flex flex-col gap-2">
<Description class="!font-semibold"> Get Started </Description>
<div class="flex flex-col opacity-80">
<a href="/download" class="font-normal">Download</a>
<a href="/mods" class="font-normal">Zen Mods</a>
<a href="/release-notes" class="font-normal">Release Notes</a>
<a href="/download?twilight" class="font-normal">Twilight</a>
</div>
<ul class="flex flex-col opacity-80">
<li><a href="/download" class="font-normal">Download</a></li>
<li><a href="/mods" class="font-normal">Zen Mods</a></li>
<li><a href="/release-notes" class="font-normal">Release Notes</a></li>
<li><a href="/download?twilight" class="font-normal">Twilight</a></li>
</ul>
</div>
<div class="flex flex-col gap-2">
<Description class="!font-semibold"> Get Help </Description>
<div class="flex flex-col opacity-80">
<a href="https://discord.gg/zen-browser" class="font-normal">Discord</a>
<div class="flex items-center">
<div class="absolute">
<img
src="https://uptime.zen-browser.app/embed-badges/pulse?"
loading="lazy"
alt="Phare badge"
class="relative right-5 h-5 w-5 lg:right-6"
/>
<ul class="flex flex-col opacity-80">
<li>
<a href="https://discord.gg/zen-browser" class="font-normal"
>Discord</a
>
</li>
<li>
<div class="flex items-center">
<div class="absolute">
<img
src="https://uptime.zen-browser.app/embed-badges/pulse?"
loading="lazy"
alt="Phare badge"
class="relative right-5 h-5 w-5 lg:right-6"
/>
</div>
<a href="https://uptime.zen-browser.app/" class="font-normal"
>Uptime Status</a
>
</div>
<a href="https://uptime.zen-browser.app/" class="font-normal"
>Uptime Status</a
</li>
<li>
<a
href="https://github.com/zen-browser/desktop/issues/new/choose"
class="font-normal">Report an Issue</a
>
</div>
<a
href="https://github.com/zen-browser/desktop/issues/new/choose"
class="font-normal">Report an Issue</a
>
<a href="mailto:hello@zen-browser.app" class="font-normal"
>hello@zen-browser.app</a
>
</div>
</li>
<li>
<a href="mailto:hello@zen-browser.app" class="font-normal"
>hello@zen-browser.app</a
>
</li>
</ul>
</div>
</div>
<div class="flex h-32 w-full items-center">
<div class="flex">
<span class="flex">
Made with ❤️ by the <a href="/about" class="ml-2 inline-block font-bold"
>Zen Browser Team</a
>
</div>
</span>
<Circles
white
multiplier={0.7}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Hero.astro
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ function getHeroTitleAnimation() {
<div class="flex h-full flex-col items-center justify-center">
<motion.a
href="/download"
className="transition-bg mb-10 flex items-center gap-2 rounded-full border-2 border-dark bg-dark px-2 py-0 py-1 text-sm text-paper shadow-sm hover:bg-paper hover:text-dark hover:duration-200 md:px-4"
className="mb-10 flex items-center gap-2 rounded-full border-2 border-dark bg-dark px-2 py-1 text-sm text-paper shadow-sm transition-all duration-200 ease-in-out hover:bg-paper hover:text-dark hover:duration-200 md:px-4"
client:load
{...getTitleAnimation(1.8)}
>
<div>Beta is now available!</div>
<span>Beta is now available!</span>
<ArrowRight class="size-4" />
</motion.a>
<Title
Expand Down
49 changes: 27 additions & 22 deletions src/components/NavBar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,32 @@ import { ThemeSwitch } from 'free-astro-components'
<div
class="navbar-dropdown left-0 right-1/4 top-16 w-full lg:w-fit"
>
<a class="dropdown-item bg-dark/5 row-span-2" href="/mods">
<div class="dropdown-title">Zen Mods</div>
<div class="dropdown-description">
Customize your browsing experience with Zen Mods.
<a
class="dropdown-item bg-dark/5 row-span-2 justify-between"
href="/mods"
>
<div class="flex flex-col gap-1">
<span class="dropdown-title">Zen Mods</span>
<p class="dropdown-description">
Customize your browsing experience with Zen Mods.
</p>
</div>
<Button isPrimary class="mt-auto">
Try Zen Mods
<ArrowRight class="size-4" />
</Button>
</a>
<a class="dropdown-item" href="/release-notes">
<div class="dropdown-title">Release Notes</div>
<div class="dropdown-description">
<span class="dropdown-title">Release Notes</span>
<p class="dropdown-description">
Stay up to date with the latest features and improvements.
</div>
</p>
</a>
<a class="dropdown-item" href="https://discord.gg/zen-browser">
<div class="dropdown-title">Discord</div>
<div class="dropdown-description">
<span class="dropdown-title">Discord</span>
<p class="dropdown-description">
Join our community on Discord to chat with other Zen users!
</div>
</p>
</a>
</div>
</DropdownItems>
Expand All @@ -76,32 +81,32 @@ import { ThemeSwitch } from 'free-astro-components'
class="navbar-dropdown left-0 top-16 w-full !grid-cols-1 gap-1 lg:left-1/3 lg:right-1/4 lg:w-fit"
>
<a class="dropdown-item" href="/donate">
<div class="dropdown-title">Donate ❤️</div>
<div class="dropdown-description">
<span class="dropdown-title">Donate ❤️</span>
<p class="dropdown-description">
Support the development of Zen Browser with a donation.
</div>
</p>
</a>
<a class="dropdown-item" href="/about">
<div class="dropdown-title">About Us 🌟</div>
<div class="dropdown-description">
<span class="dropdown-title">About Us 🌟</span>
<p class="dropdown-description">
Learn more about the team behind Zen Browser.
</div>
</p>
</a>
<a class="dropdown-item" href="https://docs.zen-browser.app">
<div class="dropdown-title">Documentation</div>
<div class="dropdown-description">
<span class="dropdown-title">Documentation</span>
<p class="dropdown-description">
Learn how to use Zen Browser with our documentation.
</div>
</p>
</a>
<a
class="dropdown-item"
href="https://github.com/zen-browser"
target="_blank"
>
<div class="dropdown-title">GitHub</div>
<div class="dropdown-description">
<span class="dropdown-title">GitHub</span>
<p class="dropdown-description">
Contribute to the development of Zen Browser on GitHub.
</div>
</p>
</a>
</div>
</DropdownItems>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/about.astro
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import Layout from '../layouts/Layout.astro'
class="relative flex w-full flex-col items-center justify-center lg:flex-row"
>
<div class="flex flex-col p-8 lg:w-1/3 lg:pr-24">
<div class="text-4xl font-bold lg:text-6xl">Main Team</div>
<span class="text-4xl font-bold lg:text-6xl">Main Team</span>
<Description>
This list shows the main team members who are working hard to bring
you the best browsing experience.
Expand Down Expand Up @@ -112,7 +112,7 @@ import Layout from '../layouts/Layout.astro'
<div class="absolute hidden h-full w-[1px] bg-dark opacity-15 lg:block">
</div>
<div class="flex flex-col p-8 lg:w-1/3 lg:pl-24">
<div class="text-4xl font-bold lg:text-6xl">Contributors</div>
<span class="text-4xl font-bold lg:text-6xl">Contributors</span>
<Description>
Here are all the wonderful people that decided to contribute to the
project! The first set of images are from the desktop repository, and
Expand Down
4 changes: 2 additions & 2 deletions src/pages/donate.astro
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import Layout from '../layouts/Layout.astro'
class="relative flex w-full flex-col items-center justify-center lg:flex-row"
>
<div class="flex flex-col p-8 lg:w-1/3 lg:pr-24">
<div class="text-6xl font-bold">Patreon</div>
<span class="text-6xl font-bold">Patreon</span>
<Description>
Patreon allows you to support us with a monthly donation. You can
choose the level of support that works best for you.
Expand All @@ -38,7 +38,7 @@ import Layout from '../layouts/Layout.astro'
</div>
<div class="hidden h-72 w-[1px] bg-dark opacity-15 lg:block"></div>
<div class="flex flex-col p-8 lg:w-1/3 lg:pl-24">
<div class="text-6xl font-bold">Ko-fi</div>
<span class="text-6xl font-bold">Ko-fi</span>
<Description>
Ko-fi allows you to support us with a one-time donation. You can
choose the amount that works best for you. Monthly donations are also
Expand Down
Loading