summaryrefslogtreecommitdiffstats
path: root/layouts/page.html
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-04-05 08:41:54 +0200
committerDanilo M. <danix@danix.xyz>2026-04-05 08:41:54 +0200
commit474b8f177078cfdc2d4342e9ead4d505afa02d62 (patch)
treef1bdf4ec77a2853f26b387f072588953a30ee907 /layouts/page.html
parentd605b77f6255a605d5afb9cd78649b1d7e301128 (diff)
downloaddanixxyz-theme-474b8f177078cfdc2d4342e9ead4d505afa02d62.tar.gz
danixxyz-theme-474b8f177078cfdc2d4342e9ead4d505afa02d62.zip
layout: add home, section, and page templates
Diffstat (limited to 'layouts/page.html')
-rw-r--r--layouts/page.html38
1 files changed, 32 insertions, 6 deletions
diff --git a/layouts/page.html b/layouts/page.html
index 7e286c8..09cf39f 100644
--- a/layouts/page.html
+++ b/layouts/page.html
@@ -1,10 +1,36 @@
{{ define "main" }}
- <h1>{{ .Title }}</h1>
+ <article class="page-page">
+ <div class="container-narrow">
+ <h1>{{ .Title }}</h1>
+ <div class="post-card-meta" style="margin-bottom: 2rem;">
+ <span>{{ dateFormat "Jan 2, 2006" .Date }}</span>
+ {{ if .Params.type }}<span class="post-type-badge {{ .Params.type }}">{{ .Params.type }}</span>{{ end }}
+ </div>
- {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
- {{ $dateHuman := .Date | time.Format ":date_long" }}
- <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
+ <div class="post-content">
+ {{ .Content }}
+ </div>
+ </div>
+ </article>
- {{ .Content }}
- {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
+ {{ if eq .Type "is" }}
+ <div class="container-narrow" style="margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border);">
+ <nav class="page-nav">
+ <h3 style="margin-bottom: 1rem;">Other pages</h3>
+ <ul style="list-style: none; margin: 0;">
+ {{ range .Site.Sections.By }}
+ {{ if eq .Type "is" }}
+ {{ range .Pages }}
+ <li style="margin-bottom: 0.5rem;">
+ <a href="{{ .RelPermalink }}" {{ if eq $.RelPermalink .RelPermalink }}class="active"{{ end }}>
+ {{ .Title }}
+ </a>
+ </li>
+ {{ end }}
+ {{ end }}
+ {{ end }}
+ </ul>
+ </nav>
+ </div>
+ {{ end }}
{{ end }}