feat: add blog list layout

chore: add toc to mobile dropdown menu single items

chore: refactor sidebar

chore: add single layout for blog

chore: add vscode settings

chore: add blog section

chore: add devcontainer.json

chore: exclude icon from mobile nav

chore: support multiple theme switches

- simplify theme switch implementation using data attributes
- hide theme switch when sidebar is disabled

chore: add theme switch to footer

- enable when sidebar is disabled

chore: add format-date partial
This commit is contained in:
Xin
2023-08-07 23:48:07 +01:00
parent 2f34627da3
commit a7aa9fa1cb
16 changed files with 429 additions and 75 deletions

View File

@ -1,4 +1,8 @@
{{- $enableFooterSwitches := .Scratch.Get "enableFooterSwitches" | default false -}}
<footer class="bg-gray-100 pb-[env(safe-area-inset-bottom)] dark:bg-neutral-900 print:bg-transparent">
{{- if $enableFooterSwitches }}{{ template "footer-switches" }}{{ end -}}
<hr class="dark:border-neutral-800" />
<div class="mx-auto flex max-w-[90rem] justify-center py-12 pl-[max(env(safe-area-inset-left),1.5rem)] pr-[max(env(safe-area-inset-right),1.5rem)] text-gray-600 dark:text-gray-400 md:justify-start">
<div class="flex w-full flex-col items-center sm:items-start">
@ -12,3 +16,9 @@
</div>
</div>
</footer>
{{- define "footer-switches" -}}
<div class="mx-auto flex max-w-[90rem] gap-2 py-2 px-4">
{{ partial "theme-toggle.html" }}
</div>
{{- end -}}