summaryrefslogtreecommitdiff
path: root/themes/fredo/layouts/_partials/post-short.html
diff options
context:
space:
mode:
authorFriedrich Beckmann <friedrich.beckmann@gmx.de>2025-06-14 13:48:40 +0200
committerFriedrich Beckmann <friedrich.beckmann@gmx.de>2025-06-14 13:48:40 +0200
commite4a8a804aa5353bcaa4403da291e02bd9fcd22db (patch)
tree140e3b62e66c10952392c6c1bb36104d40d4e24a /themes/fredo/layouts/_partials/post-short.html
initial version
Diffstat (limited to 'themes/fredo/layouts/_partials/post-short.html')
-rw-r--r--themes/fredo/layouts/_partials/post-short.html40
1 files changed, 40 insertions, 0 deletions
diff --git a/themes/fredo/layouts/_partials/post-short.html b/themes/fredo/layouts/_partials/post-short.html
new file mode 100644
index 0000000..808297d
--- /dev/null
+++ b/themes/fredo/layouts/_partials/post-short.html
@@ -0,0 +1,40 @@
+<article class="post">
+ <div class="thumb">
+ {{ if .Param "image" }}
+ {{ $imagename := .Param "image" }}
+ {{ $myimg := resources.Get $imagename }}
+ {{ if $myimg }}
+ {{ $myimg := $myimg.Resize "512x" }}
+ <a class="thumbnail" href="{{ .RelPermalink }}">
+ <picture>
+ <source type="image/jpeg" srcset="{{ $myimg.RelPermalink }}">
+ <img class="gallery-photo" alt="{{ .Title }}" src="{{ $myimg.RelPermalink }}"/>
+ </picture>
+ </a>
+ {{ else }}
+ {{ errorf "Can not find image: %s" $imagename }}
+ {{ end }}
+ {{ end }}
+ </div>
+ <div class="post-short">
+ <section class="post-date">
+ {{ $showdate := .Date }}
+ {{ if .Param "eventdate" }}
+ {{ $showdate = .Param "eventdate" }}
+ {{ end }}
+ <p> {{ $showdate | time.Format ":date_long" }},
+ {{ range .Param "bands" }}
+ <a href="/posts/{{ . }}">{{ . }}</a>
+ {{ end }}
+ </p>
+ </section>
+ <header class="post-header">
+ <h2 class="post-title">
+ <a href="{{ .RelPermalink }}">{{ .Title }}</a>
+ </h2>
+ </header>
+ <section class="post-excerpt">
+ <p>{{ .Param "summary" }}</p>
+ </section>
+ </div>
+</article>