Umstellung auf dynamische Templates

This commit is contained in:
2025-05-10 19:01:12 +02:00
parent c1b6a0cbb3
commit 7630d1e033
5 changed files with 98 additions and 4 deletions

20
templates/article.html Normal file
View File

@@ -0,0 +1,20 @@
{{ define "title" }}{{ .Title }}  B1tsblog{{ end }}
{{ define "body" }}
<article>
{{ if .Cover }}
<img class="hero" src="{{ .Cover }}" alt="">
{{ end }}
<p><a class="no-underline" href="/">Zurück zur Übersicht</a></p>
<h1>{{ .Title }}</h1>
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "02.01.2006" }}</time>
<div class="article-content">
{{ .Body }}
</div>
<p><a class="no-underline" href="/">Zurück zur Übersicht</a></p>
</article>
{{ end }}
{{ define "article" }}{{ template "layout" . }}{{ end }}