add single and page layouts

This commit is contained in:
geekifan
2025-04-20 18:43:16 +08:00
parent 326f5bf451
commit 627a8c76c0
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,16 @@
{{ define "main" }}
<article class="px-1">
{{ if or (eq .Layout "page") (eq .Type "tabs") }}
{{ $tab_key := .Title | lower }}
{{ $title := index (index .Site.Data.locales .Site.Language.Lang).tabs $tab_key | default .Title }}
<h1 class="dynamic-title">
{{ $title }}
</h1>
<div class="content">
{{ .Content }}
</div>
{{ else }}
{{ .Content }}
{{ end }}
</article>
{{ end }}