feat: add multi-language select and fix minor issues

fix: navbar icon should use home relative link

fix: copy code for raw <code> element

fix: missing breadcrumb hover style

fix: tabs typo preventing loading the script
This commit is contained in:
Xin
2023-08-13 22:18:20 +01:00
parent 3d7a4b7c99
commit 7a2cca9181
12 changed files with 120 additions and 32 deletions

View File

@ -43,7 +43,11 @@
{{ end }}
</div>
{{/* Hide theme switch when sidebar is disabled */}}
{{ template "theme-switch" (dict "class" (cond $disableSidebar "md:hidden" "")) }}
{{ $switchesClass := cond $disableSidebar "md:hidden" "" }}
<div class="{{ $switchesClass }} sticky bottom-0 bg-white dark:bg-dark mx-4 py-4 shadow-[0_-12px_16px_#fff] flex justify-end items-center gap-2 dark:border-neutral-800 dark:shadow-[0_-12px_16px_#111] contrast-more:border-neutral-400 contrast-more:shadow-none contrast-more:dark:shadow-none border-t" data-toggle-animation="show">
{{ partial "language-switch" (dict "context" $context "grow" true) }}
{{ partial "theme-toggle" (dict "hideLabel" true) }}
</div>
</aside>
{{- define "sidebar-main" -}}
@ -156,12 +160,3 @@
{{- define "sidebar-separator" -}}
<div class="mt-4 border-t py-4 dark:border-neutral-800 contrast-more:border-neutral-400 dark:contrast-more:border-neutral-400" />
{{- end -}}
{{- define "theme-switch" -}}
{{- $class := .class -}}
<div class="{{ $class }} sticky bottom-0 bg-white dark:bg-dark mx-4 py-4 shadow-[0_-12px_16px_#fff] flex items-center gap-2 dark:border-neutral-800 dark:shadow-[0_-12px_16px_#111] contrast-more:border-neutral-400 contrast-more:shadow-none contrast-more:dark:shadow-none border-t" data-toggle-animation="show">
<div class="grow flex flex-col">
{{ partial "theme-toggle" }}
</div>
</div>
{{- end -}}