mirror of
https://github.com/tiennm99/tsuki.git
synced 2026-09-01 06:19:48 +00:00
- search/list.html: Pagefind UI container + module init with full vi
i18n strings; loads /pagefind/pagefind-ui.{css,js} from generated dir
- search-button.html in header, gated by params.search.enable
- comments.html for Giscus, opt-in via params.comments.giscus.enable;
reads repo/repoId/category/categoryId/mapping/theme/lang from params
- giscus-theme.js: MutationObserver on data-theme, postMessage iframe
on toggle so Giscus theme stays in sync with site
- search.css: header-actions row, search button, Pagefind UI tokens
mapped to tsuki design tokens
- comments.css: min-block-size on iframe to prevent layout shift
- exampleSite/hugo.yaml: commented giscus params block as docs
- i18n/vi.yml: Pagefind UI strings (clear, loadMore, zeroResults...)
Both features no-op when disabled. CSS bundle 3.5 KB gz (budget 15).
15 lines
558 B
HTML
15 lines
558 B
HTML
<header class="site-header">
|
|
<a class="site-title" href="{{ "/" | relURL }}">
|
|
{{- with site.Params.profile.name }}{{ . }}{{ else }}{{ site.Title }}{{ end -}}
|
|
</a>
|
|
{{ partial "nav.html" . }}
|
|
<div class="site-header-actions">
|
|
{{- if site.Params.search.enable | default true }}
|
|
{{ partial "search-button.html" . }}
|
|
{{- end }}
|
|
<button type="button" class="theme-toggle" aria-label="{{ i18n "toggleTheme" | default "Toggle theme" }}" data-theme-toggle hidden>
|
|
<span aria-hidden="true">◐</span>
|
|
</button>
|
|
</div>
|
|
</header>
|