Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions src/lib/layouts/DocsArticle.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,13 @@
<h5 class="aw-references-menu-title aw-eyebrow">On This Page</h5>
</div>
<ol class="aw-references-menu-list">
{#each toc as parent}
<li class="aw-references-menu-item">
<a href={parent.href} class="aw-references-menu-link" class:is-selected={parent.selected}>
{#each toc as parent (parent.href)}
<li class="aw-references-menu-item" class:article-scroll-indicator={parent.selected}>
<a
href={parent.href}
class="aw-references-menu-link"
class:is-selected={parent.selected}
>
{#if parent?.step}
<span class="aw-numeric-badge">{parent.step}</span>
{/if}
Expand Down Expand Up @@ -144,3 +148,18 @@
</aside>
</article>
</main>

<style lang="scss">
.article-scroll-indicator {
position: relative;
&::before {
position: absolute;
content: '';
top: 0;
left: -1.5rem;
height: 100%;
width: 2px;
background-color: hsl(var(--p-references-menu-link-color-text));
}
}
</style>
21 changes: 20 additions & 1 deletion src/lib/layouts/DocsTutorial.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@
<ol class="aw-references-menu-list">
{#each tutorials as tutorial}
<li class="aw-references-menu-item">
<a href={tutorial.href} class="aw-references-menu-link">
<a
href={tutorial.href}
class="aw-references-menu-link"
class:tutorial-scroll-indicator={currentStep === tutorial.step}
>
<span class="aw-numeric-badge">{tutorial.step}</span>
<span class="aw-caption-400">{tutorial.title}</span>
</a>
Expand Down Expand Up @@ -175,3 +179,18 @@
</aside>
</article>
</main>

<style lang="scss">
.tutorial-scroll-indicator {
position: relative;
&::before {
position: absolute;
content: '';
top: 0;
left: -1.5rem;
height: 100%;
width: 2px;
background-color: hsl(var(--p-references-menu-link-color-text));
}
}
</style>
310 changes: 0 additions & 310 deletions src/routes/docs/tutorials/example-2/+page.svelte

This file was deleted.

Loading