Skip to content

Commit

Permalink
Use original toc partial
Browse files Browse the repository at this point in the history
  • Loading branch information
pka committed Sep 3, 2024
1 parent 3d37159 commit 3cfde71
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions shortbread-website/content/copyright/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
+++
title = "Copyright & License"
toc = false
breadcrumbs = false
weight = 1
+++
Expand Down
1 change: 1 addition & 0 deletions shortbread-website/content/imprint.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
+++
title = "Imprint"
toc = false
breadcrumbs = false
sidebar.exclude = true
+++
Expand Down
10 changes: 5 additions & 5 deletions shortbread-website/themes/hextra/layouts/partials/toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
{{- $backToTop := (T "backToTop") | default "Scroll to top" -}}

<nav class="hextra-toc hx-order-last hx-hidden hx-w-64 hx-shrink-0 xl:hx-block print:hx-hidden hx-px-4" aria-label="table of contents">
<div class="hextra-scrollbar hx-sticky hx-top-16 hx-overflow-y-auto hx-pr-4 hx-pt-6 hx-text-sm [hyphens:auto] hx-max-h-[calc(100vh-var(--navbar-height)-env(safe-area-inset-bottom))] ltr:hx--mr-4 rtl:hx--ml-4">
{{- if $toc }}
{{- if $toc }}
<div class="hextra-scrollbar hx-sticky hx-top-16 hx-overflow-y-auto hx-pr-4 hx-pt-6 hx-text-sm [hyphens:auto] hx-max-h-[calc(100vh-var(--navbar-height)-env(safe-area-inset-bottom))] ltr:hx--mr-4 rtl:hx--ml-4">
{{- with .Fragments.Headings -}}
<p class="hx-mb-4 hx-font-semibold hx-tracking-tight">{{ $onThisPage }}</p>
{{- range . -}}
Expand All @@ -16,10 +16,9 @@
</ul>
{{- end -}}
{{- end -}}
{{ end -}}

{{- $borderClass := "hx-mt-8 hx-border-t hx-bg-white hx-pt-8 hx-shadow-[0_-12px_16px_white] dark:hx-bg-dark dark:hx-shadow-[0_-12px_16px_#111]" -}}
{{- if or (not .Fragments.Headings) (not $toc) -}}
{{- if not .Fragments.Headings -}}
{{- $borderClass = "" -}}
{{- end -}}

Expand Down Expand Up @@ -51,7 +50,8 @@
</svg>
</button>
</div>
</div>
</div>
{{ end -}}
</nav>

{{/* TOC subheadings component. This is a recursive component that renders a list of headings. */}}
Expand Down

0 comments on commit 3cfde71

Please sign in to comment.