chore: add heroicons v1 icons and update icons

fix: sidebar toc not rendered

chore: update heading template style

chore: update logo and favicon

chore: update favicons

chore: update icons
This commit is contained in:
Xin
2023-08-15 21:55:14 +01:00
parent ed14432f77
commit 87ea9db336
13 changed files with 274 additions and 29 deletions

View File

@ -7,7 +7,7 @@
<div class="flex justify-items-start {{ if $grow }}grow{{ end }}">
<button title="Change language" data-state="closed" class="language-switcher h-7 rounded-md px-2 text-left text-xs font-medium text-gray-600 transition-colors dark:text-gray-400 hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-primary-100/5 dark:hover:text-gray-50 grow" type="button" aria-label="Switch Language">
<div class="flex items-center gap-2 capitalize">
{{- partial "utils/icon" (dict "name" "globe" "attributes" "height=12") -}}
{{- partial "utils/icon" (dict "name" "globe-alt" "attributes" "height=12") -}}
{{- if not $hideLabel }}<span>{{ site.Language.LanguageName }}</span>{{ end -}}
</div>
</button>

View File

@ -37,7 +37,7 @@
<button type="button" aria-label="Menu" class="hamburger-menu -mr-2 rounded p-2 active:bg-gray-400/20 md:hidden">
{{- partial "utils/icon.html" (dict "name" "menu" "attributes" "height=24") -}}
{{- partial "utils/icon.html" (dict "name" "hamburger-menu" "attributes" "height=24") -}}
</button>
</nav>
</div>

View File

@ -51,11 +51,7 @@
</aside>
{{- define "sidebar-main" -}}
{{ $context := .context }}
{{ $toc := .toc | default false }}
{{ $pageURL := .pageURL }}
{{ template "sidebar-tree" (dict "context" $context "level" 0 "pageURL" $pageURL "toc" $toc) }}
{{ template "sidebar-tree" (dict "context" .context "level" 0 "pageURL" .pageURL "toc" (.toc | default false)) }}
{{- end -}}
{{- define "sidebar-tree" -}}
@ -78,7 +74,7 @@
{{- if and $toc $active -}}
{{- template "sidebar-toc" dict "page" . -}}
{{- end -}}
{{- template "sidebar-tree" dict "context" . "pageURL" $pageURL "level" (add $level 1) -}}
{{- template "sidebar-tree" dict "context" . "pageURL" $pageURL "level" (add $level 1) "toc" $toc -}}
</li>
{{- end -}}
{{- else -}}
@ -92,7 +88,7 @@
{{- if and $toc $active -}}
{{ template "sidebar-toc" dict "page" . }}
{{- end }}
{{ template "sidebar-tree" dict "context" . "pageURL" $pageURL "level" (add $level 1) }}
{{ template "sidebar-tree" dict "context" . "pageURL" $pageURL "level" (add $level 1) "toc" $toc }}
</li>
{{- end -}}
</ul>
@ -105,9 +101,9 @@
{{ $page := .page }}
{{ with $page.Fragments.Headings }}
<ul class='flex flex-col gap-1 relative before:absolute before:inset-y-1 before:w-px before:bg-gray-200 before:content-[""] dark:before:bg-neutral-800 ltr:pl-3 ltr:before:left-0 rtl:pr-3 rtl:before:right-0 ltr:ml-3 rtl:mr-3'>
{{ range . }}
{{ with .Headings }}
{{ range . }}
{{- range . }}
{{- with .Headings }}
{{- range . -}}
<li>
<a
href="#{{ anchorize .ID }}"
@ -116,9 +112,9 @@
{{- .Title -}}
</a>
</li>
{{ end }}
{{ end }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}
</ul>
{{ end }}
{{- end -}}