diff options
author | Friedrich Beckmann <friedrich.beckmann@gmx.de> | 2025-06-14 13:48:40 +0200 |
---|---|---|
committer | Friedrich Beckmann <friedrich.beckmann@gmx.de> | 2025-06-14 13:48:40 +0200 |
commit | e4a8a804aa5353bcaa4403da291e02bd9fcd22db (patch) | |
tree | 140e3b62e66c10952392c6c1bb36104d40d4e24a /themes/fredo/layouts/single.html |
initial version
Diffstat (limited to 'themes/fredo/layouts/single.html')
-rw-r--r-- | themes/fredo/layouts/single.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/themes/fredo/layouts/single.html b/themes/fredo/layouts/single.html new file mode 100644 index 0000000..11efc31 --- /dev/null +++ b/themes/fredo/layouts/single.html @@ -0,0 +1,30 @@ +{{ define "main" }} + <article id="content"> + {{ if eq .Type "posts" }} + <section class="post-date"> + <p> {{ time.Format ":date_long" .PublishDate }} </p> + </section> + {{ end }} + {{ if .Param "Image" }} + {{ $imagename := .Param "image" }} + {{ $myimg := resources.Get $imagename }} + {{ if $myimg }} + {{ $myimg := $myimg.Resize "1024x" }} + <figure class="small-figure"> + <picture> + <source type="image/jpeg" srcset="{{ $myimg.RelPermalink }}"> + <img class="gallery-photo" alt="{{ .Title }}" src="{{ $myimg.RelPermalink }}"/> + </picture> + <figcaption class="gallery-caption">{{ .Param "caption" }}</figcaption> + </figure> + {{ else }} + {{ errorf "Can not find image: %s" $imagename }} + {{ end }} + {{ end }} + + + <h1>{{ .Title }}</h1> + {{ .Content }} + </article> + +{{ end }}
\ No newline at end of file |