just show it

This commit is contained in:
Michael Freno
2025-12-21 23:54:35 -05:00
parent 3832269a96
commit 4d549e32ba
3 changed files with 3 additions and 13 deletions

View File

@@ -190,7 +190,7 @@ function AppLayout(props: { children: any }) {
<div class="flex max-w-screen flex-row"> <div class="flex max-w-screen flex-row">
<LeftBar /> <LeftBar />
<div <div
class="bg-base relative h-screen overflow-x-hidden overflow-y-scroll rounded-t-lg pt-16 shadow-2xl" class="bg-base relative h-screen overflow-x-hidden overflow-y-scroll py-16"
style={{ style={{
width: `${centerWidth()}px`, width: `${centerWidth()}px`,
"margin-left": `${leftBarSize()}px` "margin-left": `${leftBarSize()}px`

View File

@@ -27,8 +27,7 @@ const BarsContext = createContext<{
setRightBarSize: () => {}, setRightBarSize: () => {},
centerWidth: () => 0, centerWidth: () => 0,
setCenterWidth: () => {}, setCenterWidth: () => {},
leftBarVisible: () => leftBarVisible: () => true,
typeof window !== "undefined" ? window.innerWidth >= 768 : true,
setLeftBarVisible: () => {}, setLeftBarVisible: () => {},
rightBarVisible: () => true, rightBarVisible: () => true,
setRightBarVisible: () => {}, setRightBarVisible: () => {},
@@ -59,16 +58,7 @@ export function BarsProvider(props: { children: any }) {
onMount(() => { onMount(() => {
// Immediately sync to actual window width // Immediately sync to actual window width
setWindowWidth(window.innerWidth); setWindowWidth(window.innerWidth);
const initialIsMobile = isMobile(window.innerWidth);
setLeftBarVisible(!initialIsMobile);
// Initialize immediately on mobile if left bar starts hidden
if (initialIsMobile && !leftBarVisible()) {
leftBarSized = true;
checkAndSync();
}
// Setup resize listener
const handleResize = () => { const handleResize = () => {
setWindowWidth(window.innerWidth); setWindowWidth(window.innerWidth);
}; };

View File

@@ -148,7 +148,7 @@ export default function Home() {
</div> </div>
</div> </div>
</div> </div>
<Typewriter speed={120} class="max-w-3/4 pt-8 md:max-w-1/2"> <Typewriter speed={120} class="mx-auto max-w-3/4 pt-8 md:max-w-1/2">
And if you love the color schemes of this site And if you love the color schemes of this site
<div class="mx-auto w-fit"> <div class="mx-auto w-fit">
<DarkModeToggle /> <DarkModeToggle />