-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: sticky position toc below header
- Loading branch information
Showing
3 changed files
with
39 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<script lang="ts"> | ||
import PostMetadata from './PostMetadata.svelte' | ||
import Crumbs from './Crumbs.svelte' | ||
export let doc: BlogDocument | ||
</script> | ||
|
||
<Crumbs slug={doc.slug} title={doc.title} /> | ||
<header class="space-y-6"> | ||
<div class="space-y-2"> | ||
<h1 class="scroll-m-20 text-5xl font-bold font-serif tracking-tight"> | ||
{doc.title} | ||
</h1> | ||
<p class="text-balance text-lg text-muted-foreground"> | ||
{doc.blurb} | ||
</p> | ||
<PostMetadata | ||
primaryTags={doc.primaryTags} | ||
secondaryTags={doc.secondaryTags} | ||
date={doc.date} | ||
length={doc.content.length} | ||
reverseDateAndRest | ||
/> | ||
</div> | ||
<figure class="w-full lg:w-[80%]"> | ||
<img src={doc.image.src} alt={doc.image.alt} class="rounded-xl shadow-md" /> | ||
<figcaption class="mt-2 text-center text-muted-foreground">{doc.image.caption}</figcaption> | ||
</figure> | ||
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters