feat: migrate from using tailwind

This commit is contained in:
2026-06-22 20:54:21 +00:00
parent b81a2e57bd
commit 39700ad953
8 changed files with 752 additions and 293 deletions
@@ -1,14 +1,14 @@
{{- range .nodes.ByWeight -}}
{{- $isCurrent := eq .RelPermalink $.currentPage.RelPermalink -}}
{{- if eq $.level 0 -}}
<div class="flex flex-col">
<a class="flex items-center {{ if $isCurrent }}text-primary{{ else if .IsSection }}text-on-surface{{ else }}text-on-surface-variant{{ end }} hover:text-primary transition-colors py-1 text-left w-full group" href="{{ .RelPermalink }}">
<span class="material-symbols-outlined text-[16px] mr-1 text-on-surface-variant group-hover:text-primary">{{ if .IsSection }}expand_more{{ else }}chevron_right{{ end }}</span>
<div class="tree-node">
<a class="tree-link{{ if .IsSection }} tree-link--section{{ end }}{{ if $isCurrent }} tree-link--current{{ end }}" href="{{ .RelPermalink }}">
<span class="material-symbols-outlined tree-icon">{{ if .IsSection }}expand_more{{ else }}chevron_right{{ end }}</span>
{{ .LinkTitle }}
</a>
{{- if .IsSection -}}
{{- with .Pages.ByWeight -}}
<div class="ml-6 flex flex-col gap-1 text-on-surface-variant text-[13px] tree-item mt-1 mb-2">
<div class="tree-children">
{{ partial "explorer-tree.html" (dict "nodes" . "level" (add $.level 1) "currentPage" $.currentPage) }}
</div>
{{- end -}}
@@ -16,19 +16,19 @@
</div>
{{- else -}}
{{- if .IsSection -}}
<div class="flex flex-col">
<a class="flex items-center {{ if $isCurrent }}text-primary{{ end }} hover:text-on-surface transition-colors py-0.5" href="{{ .RelPermalink }}">
<span class="material-symbols-outlined text-[14px] mr-1 text-on-surface-variant">expand_more</span>
<div class="tree-node">
<a class="tree-link tree-link--nested{{ if $isCurrent }} tree-link--current{{ end }}" href="{{ .RelPermalink }}">
<span class="material-symbols-outlined tree-icon tree-icon--small">expand_more</span>
{{ .LinkTitle }}
</a>
{{- with .Pages.ByWeight -}}
<div class="ml-5 flex flex-col gap-1 text-on-surface-variant text-[13px] tree-item mt-1 italic">
<div class="tree-children tree-children--nested">
{{ partial "explorer-tree.html" (dict "nodes" . "level" (add $.level 1) "currentPage" $.currentPage) }}
</div>
{{- end -}}
</div>
{{- else -}}
<a class="{{ if $isCurrent }}text-primary{{ end }} hover:text-on-surface transition-colors py-0.5 italic" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
<a class="tree-link tree-link--leaf{{ if $isCurrent }} tree-link--current{{ end }}" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{- end -}}
{{- end -}}
{{- end -}}
@@ -1,21 +1,21 @@
<aside class="w-72 flex-shrink-0 flex flex-col gap-12 border-r border-on-surface/10 pr-8">
<aside class="site-sidebar">
<header>
<a class="font-display-lg text-display-lg text-on-surface" href="{{ `/` | relLangURL }}">{{ site.Title }}</a>
<a class="site-title" href="{{ `/` | relLangURL }}">{{ site.Title }}</a>
</header>
<button class="relative w-full bg-transparent text-on-surface border border-outline/30 rounded py-1.5 pl-8 pr-3 text-left focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary transition-colors text-[13px]" type="button" data-search-open aria-haspopup="dialog">
<span class="material-symbols-outlined absolute left-2 top-1.5 text-on-surface-variant text-[18px]" aria-hidden="true">search</span>
<span class="text-on-surface-variant/70">Search</span>
<button class="search-trigger" type="button" data-search-open aria-haspopup="dialog">
<span class="material-symbols-outlined" aria-hidden="true">search</span>
<span class="search-trigger-label">Search</span>
</button>
<nav class="flex flex-col gap-1 text-[14px]" aria-label="Primary">
<nav class="site-nav" aria-label="Primary">
{{ with site.Sections }}
{{ partial "explorer-tree.html" (dict "nodes" . "level" 0 "currentPage" $) }}
{{ end }}
</nav>
{{ with site.Params.sidebarFooter }}
<div class="mt-auto pt-8 font-display-lg italic text-on-surface-variant text-lg">
<div class="footer-note">
{{ . }}
</div>
{{ end }}