Skip to content

Commit

Permalink
fix(home): fix snippet anchor href
Browse files Browse the repository at this point in the history
  • Loading branch information
matschik committed Oct 4, 2024
1 parent 8d8360e commit e7bead4
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/Index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -307,18 +307,15 @@
</h1>
{#each snippets.filter((s) => s.sectionId === section.sectionId) as snippet}
<div
id={section.sectionId + "." + snippet.snippetId}
data-snippet-id={section.sectionId +
"." +
snippet.snippetId}
>
{@const snippetPathId =
section.sectionId + "." + snippet.snippetId}
<div id={snippetPathId} data-snippet-id={snippetPathId}>
<h2
class="header-anchor sticky py-2 top-[2.9531rem] z-10 bg-[var(--bg-color)]"
>
{snippet.title}
<a
href={"#" + snippet.snippetId}
href={"#" + snippetPathId}
aria-hidden="true"
tabindex="-1"
>
Expand Down

0 comments on commit e7bead4

Please sign in to comment.