mirror of
https://github.com/lainbo/component-party.git
synced 2026-04-05 04:59:02 +08:00
fix(home): fix snippet anchor href
This commit is contained in:
@@ -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"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user