From db46f7d6ba2dffa8cf41242483eb6518b40c9d68 Mon Sep 17 00:00:00 2001 From: Timothy Pidashev Date: Mon, 6 Apr 2026 15:35:46 -0700 Subject: [PATCH] Rework mobile device detection --- src/components/animation-switcher/index.tsx | 2 +- src/components/background/index.tsx | 4 ++-- src/components/footer/index.tsx | 2 +- src/components/header/index.tsx | 2 +- src/components/mobile-nav/index.tsx | 2 +- src/components/theme-switcher/index.tsx | 2 +- src/layouts/content.astro | 2 +- src/layouts/index.astro | 2 +- src/layouts/resource.astro | 2 +- tailwind.config.cjs | 9 +++++++++ 10 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/components/animation-switcher/index.tsx b/src/components/animation-switcher/index.tsx index 935883b..cc87035 100644 --- a/src/components/animation-switcher/index.tsx +++ b/src/components/animation-switcher/index.tsx @@ -41,7 +41,7 @@ export default function AnimationSwitcher() { return (
setHovering(true)} onMouseLeave={() => setHovering(false)} onClick={handleClick} diff --git a/src/components/background/index.tsx b/src/components/background/index.tsx index bbd9010..fa59c5b 100644 --- a/src/components/background/index.tsx +++ b/src/components/background/index.tsx @@ -333,11 +333,11 @@ const Background: React.FC = ({ const getContainerClasses = () => { if (isIndex) { return mobileOnly - ? "fixed inset-0 -z-10 lg:hidden" + ? "fixed inset-0 -z-10 desk:hidden" : "fixed inset-0 -z-10"; } - const baseClasses = "fixed top-0 bottom-0 hidden lg:block -z-10"; + const baseClasses = "fixed top-0 bottom-0 hidden desk:block -z-10"; return position === "left" ? `${baseClasses} left-0` : `${baseClasses} right-0`; diff --git a/src/components/footer/index.tsx b/src/components/footer/index.tsx index 01a24e0..2139d4f 100644 --- a/src/components/footer/index.tsx +++ b/src/components/footer/index.tsx @@ -12,7 +12,7 @@ export default function Footer({ fixed = false }) { return (
-
+
{footerLinks}
diff --git a/src/components/header/index.tsx b/src/components/header/index.tsx index ca1c6d6..cb6fae5 100644 --- a/src/components/header/index.tsx +++ b/src/components/header/index.tsx @@ -92,7 +92,7 @@ export default function Header({ transparent = false }: { transparent?: boolean `} >