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
8 changes: 6 additions & 2 deletions src/lib/layouts/DocsTutorial.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
export let title: string;
export let toc: Array<TocItem>;
export let currentStep: number;
export let back: string;

export let tutorials: Array<Tutorial>;

Expand All @@ -28,7 +29,9 @@
<slot name="metadata" />
</ul>
<div class="u-position-relative u-flex u-cross-center">
<button
{#if back}
<a
href={back}
class="
aw-button is-text is-only-icon aw-u-cross-center aw-u-size-40
u-position-absolute u-inset-inline-start-0 aw-u-translate-x-negative"
Expand All @@ -38,7 +41,8 @@
class="icon-cheveron-left aw-u-font-size-24 aw-u-color-text-primary aw-is-not-mobile"
aria-hidden="true"
/>
</button>
</a>
{/if}
<h1 class="aw-title">{title}</h1>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/lib/layouts/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
export let expandable = false;
export let navigation: NavTree;
export let parent: NavParent | undefined = undefined;
export let back: string;

function isNavLink(item: NavLink | NavGroup): item is NavLink {
return 'href' in item;
Expand Down
4 changes: 3 additions & 1 deletion src/markdoc/layouts/Tutorial.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
export let difficulty: string;
export let readtime: string;
export let step: number;
export let back: string;

setContext<LayoutContext>('headings', writable({}));

Expand Down Expand Up @@ -71,7 +72,8 @@
<meta name="twitter:image" content={ogImage} />
<meta name="twitter:card" content="summary_large_image" />
</svelte:head>
<DocsTutorial {title} {toc} {tutorials} currentStep={step}>

<DocsTutorial {title} {back} {toc} {tutorials} currentStep={step}>
<svelte:fragment slot="metadata">
{#if difficulty}
<li>{difficulty}</li>
Expand Down