From 0baef9ac7f3e73bb5cc70f220137a10b37b3ad08 Mon Sep 17 00:00:00 2001 From: TheRealMG <56460873+TheRealMG@users.noreply.github.com> Date: Mon, 4 Nov 2024 13:57:14 -0600 Subject: [PATCH] rudimentary dark mode --- src/components/header.astro | 2 +- src/components/hero.astro | 4 ++-- src/components/navbar.astro | 2 +- src/layouts/main.astro | 4 ++++ tailwind.config.cjs | 14 ++++++++++++-- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/components/header.astro b/src/components/header.astro index 80000a8..158b614 100644 --- a/src/components/header.astro +++ b/src/components/header.astro @@ -7,7 +7,7 @@ import Navbar from "./navbar.astro";
- + v1.0.1-a.17
diff --git a/src/components/hero.astro b/src/components/hero.astro index 5cbbe18..a1c5176 100644 --- a/src/components/hero.astro +++ b/src/components/hero.astro @@ -5,7 +5,7 @@ import '@fontsource/dm-sans/700.css';

Stay focused, browse faster

-

+

Zen is beautifully designed, privacy-focused, and packed with features. We care about your experience, not your data.

@@ -16,7 +16,7 @@ import '@fontsource/dm-sans/700.css'; Zen Logo
Your experience using Zen may change over time, as new features are added, improved and adjusted with upstream Firefox updates. User discretion is advised. diff --git a/src/components/navbar.astro b/src/components/navbar.astro index 95c2628..e3ae33f 100644 --- a/src/components/navbar.astro +++ b/src/components/navbar.astro @@ -23,7 +23,7 @@ @tailwind base; @layer base { nav { - @apply flex justify-center gap-10 text-primary font-semibold text-lg; + @apply flex justify-center gap-10 text-primary font-semibold text-lg dark:text-primary-dark; } ul { @apply hidden items-center justify-center gap-10 md:flex; diff --git a/src/layouts/main.astro b/src/layouts/main.astro index 1ecc6ac..528056c 100644 --- a/src/layouts/main.astro +++ b/src/layouts/main.astro @@ -38,4 +38,8 @@ import '@fontsource/inter'; linear-gradient(to bottom, rgba(147, 51, 234, 0.03), transparent 30%); background-size: cover; } + + html { + @apply dark:bg-black; + } diff --git a/tailwind.config.cjs b/tailwind.config.cjs index c9d6151..af83a37 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -17,7 +17,9 @@ module.exports = { extend: { colors: { primary: "hsl(258, 48%, 23%)", + "primary-dark": "hsl(258, 48%, 65%)", muted: "hsl(258, 48%, 55%)", + "muted-dark": "hsl(258, 48%, 85%)", }, spacing: { xs: "0.5rem", @@ -50,13 +52,20 @@ module.exports = { ], dm: ["DM Sans"], }, + dropShadow: { + glow: [ + "0 0px 5px hsla(258, 48%, 23%, 0.90)", + "0 0px 20px hsla(258, 48%, 23%, 0.75)" + ] + } }, }, plugins: [ plugin(({ addBase, addComponents, addUtilities, theme }) => { addBase({ h2: { - "@apply text-scale-large font-bold text-primary": {}, + "@apply text-scale-large font-bold text-primary dark:text-primary-dark": {}, + }, }); addComponents({ @@ -71,7 +80,8 @@ module.exports = { "@apply text-center place-items-center": {}, }, ".btn-base": { - "@apply bg-black text-white font-semibold py-3 px-6 rounded-full w-fit flex items-center gap-2 text-lg drop-shadow-lg hover:drop-shadow-xl transition-all duration-300": + "@apply bg-black text-white font-semibold py-3 px-6 rounded-full w-fit flex items-center gap-2 text-lg drop-shadow-lg hover:drop-shadow-xl transition-all duration-300 dark:bg-white dark:text-black": + {}, }, });