From 1bf4d8aca6f81f2dddd0262e74b278cd9985b53d Mon Sep 17 00:00:00 2001 From: Arne Rief Date: Fri, 8 Aug 2025 20:50:19 +0200 Subject: initial commit, basic setup --- layouts/partials/footer.html | 3 +++ layouts/partials/head/css.html | 10 +++++++++ layouts/partials/head/js.html | 17 ++++++++++++++ layouts/partials/head/meta.html | 22 ++++++++++++++++++ layouts/partials/head/seo.html | 50 +++++++++++++++++++++++++++++++++++++++++ layouts/partials/header.html | 7 ++++++ layouts/partials/navmenu.html | 45 +++++++++++++++++++++++++++++++++++++ 7 files changed, 154 insertions(+) create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/head/css.html create mode 100644 layouts/partials/head/js.html create mode 100644 layouts/partials/head/meta.html create mode 100644 layouts/partials/head/seo.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/navmenu.html (limited to 'layouts/partials') diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..a74a6a4 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,3 @@ + diff --git a/layouts/partials/head/css.html b/layouts/partials/head/css.html new file mode 100644 index 0000000..8e6c145 --- /dev/null +++ b/layouts/partials/head/css.html @@ -0,0 +1,10 @@ +{{- with resources.Get "css/main.css" }} + {{- if hugo.IsDevelopment }} + + {{- else }} + {{- with . | minify | fingerprint }} + + {{- end }} + {{- end }} +{{- end }} + diff --git a/layouts/partials/head/js.html b/layouts/partials/head/js.html new file mode 100644 index 0000000..6123e7f --- /dev/null +++ b/layouts/partials/head/js.html @@ -0,0 +1,17 @@ +{{- with resources.Get "js/main.js" }} + {{- $opts := dict + "minify" (not hugo.IsDevelopment) + "sourceMap" (cond hugo.IsDevelopment "external" "") + "targetPath" "js/main.js" + }} + {{- with . | js.Build $opts }} + {{- if hugo.IsDevelopment }} + + {{- else }} + {{- with . | fingerprint }} + + {{- end }} + {{- end }} + {{- end }} +{{- end }} + diff --git a/layouts/partials/head/meta.html b/layouts/partials/head/meta.html new file mode 100644 index 0000000..d0358a1 --- /dev/null +++ b/layouts/partials/head/meta.html @@ -0,0 +1,22 @@ + + + + + + + + + + +{{- with .Params.images }} + +{{- end }} + + + + + +{{- with .Params.images }} + +{{- end }} + diff --git a/layouts/partials/head/seo.html b/layouts/partials/head/seo.html new file mode 100644 index 0000000..2c617e1 --- /dev/null +++ b/layouts/partials/head/seo.html @@ -0,0 +1,50 @@ +{{ if .IsPage }} + +{{ else if .IsHome }} + +{{ end }} + diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..a496628 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,7 @@ +
+ + {{ site.Title }} + + + {{ partial "navmenu.html" (dict "menuID" "main" "page" .) }} +
diff --git a/layouts/partials/navmenu.html b/layouts/partials/navmenu.html new file mode 100644 index 0000000..05fd64f --- /dev/null +++ b/layouts/partials/navmenu.html @@ -0,0 +1,45 @@ +{{- /* +Renders a menu for the given menu ID. + +@context {page} page The current page. +@context {string} menuID The menu ID. + +@example: {{ partial "navmenu.html" (dict "menuID" "main" "page" .) }} +*/}} + +{{- $page := .page }} +{{- $menuID := .menuID }} + +{{- with index site.Menus $menuID }} + +{{- end }} + -- cgit v1.2.3