summaryrefslogtreecommitdiff
path: root/themes/fredo/layouts/_partials
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
initial version
Diffstat (limited to 'themes/fredo/layouts/_partials')
-rw-r--r--themes/fredo/layouts/_partials/nav.html20
-rw-r--r--themes/fredo/layouts/_partials/post-short.html40
2 files changed, 60 insertions, 0 deletions
diff --git a/themes/fredo/layouts/_partials/nav.html b/themes/fredo/layouts/_partials/nav.html
new file mode 100644
index 0000000..583eefe
--- /dev/null
+++ b/themes/fredo/layouts/_partials/nav.html
@@ -0,0 +1,20 @@
+<div id="topbar">
+ <div id="logo">
+ <a href="/">
+ <picture>
+ <img src="/favicon.png"></img>
+ </picture>
+ </a>
+ </div>
+ <nav id="nav">
+ {{ $currentpage := . }}
+ {{ range site.Menus.main }}
+ {{ $url := relLangURL .URL }}
+ {{ $navlinkclass := "navlink" }}
+ {{- if or ( $currentpage.IsMenuCurrent "main" .) ( $currentpage.HasMenuCurrent "main" .) }}
+ {{ $navlinkclass = "navlink active" }}
+ {{ end }}
+ <a class={{ $navlinkclass }} href="{{ $url }}">{{ .Name }}</a>
+ {{ end }}
+ </nav>
+</div>
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>