mirror of
https://github.com/tiennm99/tsuki.git
synced 2026-09-18 14:20:46 +00:00
- 9 CSS files (tokens, reset, typography, layout, components, home, archive, toc, view-transitions) bundled via resources.Concat - 3 ES module JS files (theme-toggle, code-copy, toc-active); toc-active loaded only on long posts - @view-transition: navigation auto for cross-page morph (CSS-only) - TOC partial gated by WordCount>400 and Params.toc!=false; sticky on wide viewports, framed block on narrow - render-heading.html adds cosmetic anchor links - Hugo asset pipeline: resources.Concat | minify | fingerprint (no SCSS, no PostCSS, no Node) - i18n/vi.yml extended with prev/next/posts/archiveEmpty/toggleTheme - Bundle sizes: CSS 3.3 KB gz (budget 15), JS 0.8 KB gz (budget 8) Config: github-ascii heading IDs, :contentbasename permalink token for clean ASCII URLs, pagination.pagerSize migration (Hugo 0.128+).
32 lines
735 B
HTML
32 lines
735 B
HTML
{{ define "body_class" }}post{{ end }}
|
|
|
|
{{ define "main" }}
|
|
<article class="post">
|
|
<header class="post-header">
|
|
<h1 class="post-title">{{ .Title }}</h1>
|
|
{{ partial "meta.html" . }}
|
|
{{- with .Description }}
|
|
<p class="post-description">{{ . }}</p>
|
|
{{- end }}
|
|
</header>
|
|
|
|
<div class="post-content" data-pagefind-body>
|
|
{{ .Content }}
|
|
</div>
|
|
|
|
<footer class="post-footer">
|
|
{{- with .Params.tags }}
|
|
<ul class="post-tag-list">
|
|
{{- range . }}
|
|
<li><a href="{{ printf "/tags/%s/" (urlize .) | relURL }}">#{{ . }}</a></li>
|
|
{{- end }}
|
|
</ul>
|
|
{{- end }}
|
|
</footer>
|
|
</article>
|
|
|
|
{{- if and (gt .WordCount 400) (ne .Params.toc false) }}
|
|
{{ partial "toc.html" . }}
|
|
{{- end }}
|
|
{{ end }}
|