Skip to content

Commit c4c3ae2

Browse files
fix nav popup. fix table of contents
1 parent 1cbebb5 commit c4c3ae2

File tree

4 files changed

+25
-14
lines changed

4 files changed

+25
-14
lines changed

src/components/root/mobileNav.svelte

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,13 @@
1010
isOpen = !isOpen;
1111
}
1212
13-
let openState = $state(false);
14-
15-
function popoverClose() {
16-
openState = false;
17-
}
1813
</script>
1914

2015
<div class="flex items-center justify-center lg:hidden">
2116
<Popover
2217
zIndex="100"
23-
open={openState}
24-
onOpenChange={(e) => (openState = e.open)}
18+
open={isOpen}
19+
onOpenChange={(e) => (isOpen = e.open)}
2520
positioning={{ placement: 'top' }}
2621
triggerBase="btn preset-tonal"
2722
contentBase="card bg-surface-200-800 p-4 space-y-4 max-w-[320px]"

src/routes/(main)/blog/2/+page.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,8 @@ jobs:
149149

150150
<PageParagraph>Let's dive into the steps!</PageParagraph>
151151

152-
<TableOfContents />
153152

154-
<div use:tocCrawler={{ mode: 'generate' }}>
153+
<div>
155154
<PageHeader className="">1. Configuring Svelte to Build a Static Site</PageHeader>
156155

157156
<PageParagraph>Disable SSR, enable prerendering, and remove trailing slashes.</PageParagraph>

src/routes/(main)/blog/7/+page.svelte

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,6 @@ bundleLock := bundleMapOfMu.Lock(bundlePath)
179179
defer bundleLock.Unlock()`
180180
</script>
181181

182-
<!-- POST 2 -->
183-
184182
<PageLayout {backHref} {backText} {title} {date}>
185183
<PageSubtitle className="underline underline-offset-8 decoration-sky-500"
186184
>Synchronizing PwManager: Preventing Race Conditions When Sharing Password Bundles</PageSubtitle

src/routes/(main)/quotes/+page.svelte

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script lang="ts">
22
import { ArrowUp, Link } from 'lucide-svelte';
3-
import Simple from '../../../components/layout/simple.svelte';
43
54
import { quotes } from './quotes';
65
import { onMount } from 'svelte';
@@ -67,9 +66,29 @@
6766
<ArrowUp size={64}></ArrowUp>
6867
</button>
6968

70-
<TableOfContents class="my-16" />
7169

72-
<div use:tocCrawler={{ mode: 'generate' }}>
70+
<nav class="p-4 my-16">
71+
<!-- Table of Contents -->
72+
<div class="text-sm space-y-2">
73+
<!-- Label -->
74+
<div class="font-bold">On This Page</div>
75+
<!-- Links -->
76+
<ul class="space-y-2">
77+
{#each quotes as [k, v]}
78+
<li>
79+
<a href={'#'+k.toLocaleLowerCase().replaceAll(' ', '-')} class="anchor block">
80+
{k }
81+
</a>
82+
</li>
83+
84+
{/each}
85+
86+
</ul>
87+
</div>
88+
</nav>
89+
90+
91+
<div >
7392
{#each quotes as [k, v]}
7493
<article>
7594
<header class="flex flex-row items-center">

0 commit comments

Comments
 (0)