From e4a8a804aa5353bcaa4403da291e02bd9fcd22db Mon Sep 17 00:00:00 2001 From: Friedrich Beckmann Date: Sat, 14 Jun 2025 13:48:40 +0200 Subject: initial version --- themes/fredo/layouts/_markup/render-image.html | 12 ++++++++ themes/fredo/layouts/_partials/nav.html | 20 +++++++++++++ themes/fredo/layouts/_partials/post-short.html | 40 ++++++++++++++++++++++++++ themes/fredo/layouts/_shortcodes/audio.html | 10 +++++++ themes/fredo/layouts/_shortcodes/video.html | 6 ++++ themes/fredo/layouts/baseof.html | 39 +++++++++++++++++++++++++ themes/fredo/layouts/list.html | 12 ++++++++ themes/fredo/layouts/single.html | 30 +++++++++++++++++++ 8 files changed, 169 insertions(+) create mode 100644 themes/fredo/layouts/_markup/render-image.html create mode 100644 themes/fredo/layouts/_partials/nav.html create mode 100644 themes/fredo/layouts/_partials/post-short.html create mode 100644 themes/fredo/layouts/_shortcodes/audio.html create mode 100644 themes/fredo/layouts/_shortcodes/video.html create mode 100644 themes/fredo/layouts/baseof.html create mode 100644 themes/fredo/layouts/list.html create mode 100644 themes/fredo/layouts/single.html (limited to 'themes/fredo/layouts') diff --git a/themes/fredo/layouts/_markup/render-image.html b/themes/fredo/layouts/_markup/render-image.html new file mode 100644 index 0000000..86891e7 --- /dev/null +++ b/themes/fredo/layouts/_markup/render-image.html @@ -0,0 +1,12 @@ +{{ $myimg := resources.Get .Destination }} +{{ if $myimg }} + {{ $myimg := $myimg.Resize "1024x" }} +
+ + {{ .PlainText }} + + +
+{{ else }} + {{ errorf "Can not find image: %s" .Destination }} +{{ end }} \ No newline at end of file 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 @@ +
+ + +
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 @@ +
+
+ {{ if .Param "image" }} + {{ $imagename := .Param "image" }} + {{ $myimg := resources.Get $imagename }} + {{ if $myimg }} + {{ $myimg := $myimg.Resize "512x" }} + + + + {{ .Title }} + + + {{ else }} + {{ errorf "Can not find image: %s" $imagename }} + {{ end }} + {{ end }} +
+
+ +
+

+ {{ .Title }} +

+
+
+

{{ .Param "summary" }}

+
+
+
diff --git a/themes/fredo/layouts/_shortcodes/audio.html b/themes/fredo/layouts/_shortcodes/audio.html new file mode 100644 index 0000000..d44de40 --- /dev/null +++ b/themes/fredo/layouts/_shortcodes/audio.html @@ -0,0 +1,10 @@ + + + + + +
{{- .Get "caption" -}}: + +
diff --git a/themes/fredo/layouts/_shortcodes/video.html b/themes/fredo/layouts/_shortcodes/video.html new file mode 100644 index 0000000..debe1d4 --- /dev/null +++ b/themes/fredo/layouts/_shortcodes/video.html @@ -0,0 +1,6 @@ +
+ + +
\ No newline at end of file diff --git a/themes/fredo/layouts/baseof.html b/themes/fredo/layouts/baseof.html new file mode 100644 index 0000000..92c0ca3 --- /dev/null +++ b/themes/fredo/layouts/baseof.html @@ -0,0 +1,39 @@ + + + + + + + + + {{ if .Title }} + {{ site.Title }} | {{ .Title }} + {{ else }} + {{ site.Title }} + {{ end }} + {{ $favicon := resources.Get "favicon.png" }} + + + + + {{ $css := resources.Get "style.css" }} + + {{ $font := resources.Get "Iwona-Regular.otf" }} + + + + + + + + {{ partial "nav.html" . }} +
+
+ {{ block "main" . }}{{ end }} +
+
+ + + diff --git a/themes/fredo/layouts/list.html b/themes/fredo/layouts/list.html new file mode 100644 index 0000000..d041c58 --- /dev/null +++ b/themes/fredo/layouts/list.html @@ -0,0 +1,12 @@ +{{ define "main" }} + {{ $pagelist := .RegularPagesRecursive.ByDate.Reverse }} + {{ if .IsHome }} + {{ $pagelist = where .RegularPagesRecursive.ByDate.Reverse "Section" "posts"}} + {{ end }} + {{ range $pagelist }} + {{ partial "post-short.html" . }} + {{ end }} +
+ {{ .Content }} +
+{{ end }} \ No newline at end of file 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" }} +
+ {{ if eq .Type "posts" }} + + {{ end }} + {{ if .Param "Image" }} + {{ $imagename := .Param "image" }} + {{ $myimg := resources.Get $imagename }} + {{ if $myimg }} + {{ $myimg := $myimg.Resize "1024x" }} +
+ + + {{ .Title }} + + +
+ {{ else }} + {{ errorf "Can not find image: %s" $imagename }} + {{ end }} + {{ end }} + + +

{{ .Title }}

+ {{ .Content }} +
+ +{{ end }} \ No newline at end of file -- cgit v1.2.3