diff --git a/src/app.css b/src/app.css index 28fa877..9f47567 100644 --- a/src/app.css +++ b/src/app.css @@ -229,7 +229,6 @@ body { color: var(--color-text); transition: background-color 500ms ease-in-out; } - [data-typewriter="animated"] [data-char-index] { opacity: 0; } @@ -238,54 +237,6 @@ body { transition: opacity 0.05s ease-in; } -.bg-base.relative.h-screen { - width: 100vw; - margin-left: 0; -} - -@media (min-width: 768px) { - .bg-base.relative.h-screen { - width: calc(100vw - 600px); - margin-left: 300px; - } -} - -@media (max-width: 767px) { - nav.fixed.z-50[class*="border-r-2"] { - /* Left sidebar starts off-screen on mobile */ - transform: translateX(-100%); - } -} - -/* Note: JS will add inline styles and reactive classList that override these defaults */ - -/* Blog banner fallbacks - similar to main layout */ -.blog-banner-image { - /* Full width by default on mobile */ - width: 100vw; - margin-left: 0; -} - -.blog-banner-text { - /* Full width by default on mobile */ - width: 100vw; - margin-left: 0; -} - -@media (min-width: 768px) { - .blog-banner-image { - /* Account for sidebars on desktop */ - width: calc(100vw - 600px); - margin-left: 300px; - } - - .blog-banner-text { - /* Account for sidebars on desktop */ - width: calc(100vw - 600px); - margin-left: 300px; - } -} - .cursor-typing { display: inline-block; width: 2px; @@ -302,6 +253,13 @@ body { vertical-align: text-bottom; animation: blink 1s infinite; margin-left: 2px; + position: absolute; +} + +@media (max-width: 767px) { + .cursor-block { + position: relative; + } } @keyframes blink { diff --git a/src/app.tsx b/src/app.tsx index 2129817..642fadd 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -5,7 +5,9 @@ import { ErrorBoundary, onMount, onCleanup, - Suspense + Suspense, + Show, + createSignal } from "solid-js"; import "./app.css"; import { LeftBar, RightBar } from "./components/Bars"; @@ -32,8 +34,12 @@ function AppLayout(props: { children: any }) { let lastScrollY = 0; const SCROLL_THRESHOLD = 75; + // Track if we're on the client (hydrated) - starts false on server + const [isClient, setIsClient] = createSignal(false); + // Use onMount to avoid hydration issues - window operations are client-only onMount(() => { + setIsClient(true); const windowWidth = createWindowWidth(); createEffect(() => { @@ -188,30 +194,37 @@ function AppLayout(props: { children: any }) { <>