From f8541ef965ca22e746b523eb418e47cb4f78f2d8 Mon Sep 17 00:00:00 2001 From: Arne Rief Date: Fri, 9 Jan 2026 12:24:05 +0100 Subject: Upgrade to new template system from Hugo v0.146.0 --- layouts/partials/footer.html | 41 -------------------- layouts/partials/head/css.html | 21 ----------- layouts/partials/head/js.html | 16 -------- layouts/partials/head/meta.html | 27 -------------- layouts/partials/head/seo.html | 46 ----------------------- layouts/partials/header.html | 14 ------- layouts/partials/list/pagination.html | 28 -------------- layouts/partials/list/post-card.html | 66 --------------------------------- layouts/partials/list/recent-posts.html | 45 ---------------------- layouts/partials/navmenu.html | 48 ------------------------ layouts/partials/select-language.html | 38 ------------------- layouts/partials/select-theme.html | 15 -------- layouts/partials/single/next-prev.html | 44 ---------------------- layouts/partials/single/tags.html | 17 --------- 14 files changed, 466 deletions(-) delete mode 100644 layouts/partials/footer.html delete mode 100644 layouts/partials/head/css.html delete mode 100644 layouts/partials/head/js.html delete mode 100644 layouts/partials/head/meta.html delete mode 100644 layouts/partials/head/seo.html delete mode 100644 layouts/partials/header.html delete mode 100644 layouts/partials/list/pagination.html delete mode 100644 layouts/partials/list/post-card.html delete mode 100644 layouts/partials/list/recent-posts.html delete mode 100644 layouts/partials/navmenu.html delete mode 100644 layouts/partials/select-language.html delete mode 100644 layouts/partials/select-theme.html delete mode 100644 layouts/partials/single/next-prev.html delete mode 100644 layouts/partials/single/tags.html (limited to 'layouts/partials') diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html deleted file mode 100644 index a0a30b2..0000000 --- a/layouts/partials/footer.html +++ /dev/null @@ -1,41 +0,0 @@ - diff --git a/layouts/partials/head/css.html b/layouts/partials/head/css.html deleted file mode 100644 index d4e894e..0000000 --- a/layouts/partials/head/css.html +++ /dev/null @@ -1,21 +0,0 @@ -{{- with resources.Get "css/main.css" -}} - {{- $allStylesheets := slice - . - (resources.Get "css/header.css") - (resources.Get "css/navmenu.css") - (resources.Get "css/footer.css") - (resources.Get "css/post-card.css") - (resources.Get "css/page.css") - (resources.Get "css/post.css") - (resources.Get "css/list-navigation.css") - (resources.Get "css/search.css") - -}} - {{- $cssBundle := $allStylesheets | resources.Concat "css/bundle.css" -}} - - {{- if hugo.IsDevelopment -}} - - {{- else -}} - {{- $css := $cssBundle | minify | fingerprint -}} - - {{- end -}} -{{- end -}} diff --git a/layouts/partials/head/js.html b/layouts/partials/head/js.html deleted file mode 100644 index 0baf831..0000000 --- a/layouts/partials/head/js.html +++ /dev/null @@ -1,16 +0,0 @@ -{{- 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 deleted file mode 100644 index f739838..0000000 --- a/layouts/partials/head/meta.html +++ /dev/null @@ -1,27 +0,0 @@ -{{- /* Basic Meta */ -}} - - - -{{- /* Open Graph */ -}} - - - - - -{{- with site.Params.logo }} - -{{- end }} -{{- if .IsPage }} - - {{- with .Lastmod }} - - {{- end }} -{{- end }} - -{{- /* Twitter Card */ -}} - - - -{{- with site.Params.logo }} - -{{- end }} diff --git a/layouts/partials/head/seo.html b/layouts/partials/head/seo.html deleted file mode 100644 index 628ea2c..0000000 --- a/layouts/partials/head/seo.html +++ /dev/null @@ -1,46 +0,0 @@ - diff --git a/layouts/partials/header.html b/layouts/partials/header.html deleted file mode 100644 index f38b6f2..0000000 --- a/layouts/partials/header.html +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/layouts/partials/list/pagination.html b/layouts/partials/list/pagination.html deleted file mode 100644 index dfe8178..0000000 --- a/layouts/partials/list/pagination.html +++ /dev/null @@ -1,28 +0,0 @@ -{{- $paginator := . }} -{{- if gt $paginator.TotalPages 1 }} - -{{- end }} diff --git a/layouts/partials/list/post-card.html b/layouts/partials/list/post-card.html deleted file mode 100644 index 6444701..0000000 --- a/layouts/partials/list/post-card.html +++ /dev/null @@ -1,66 +0,0 @@ -{{- /* -Card with a summary of and link to a post. Accepts a dict with the following parameters: - -@context {Page} post: The post to display. -@context {bool} show_section: Whether to display a badge with the name of the section the post was published under (default: false). - -@example: {{ partial "list/post-card.html" (dict "post" . "show_section" true) }} -*/ -}} - -{{- $post := .post -}} -{{- $showSection := .show_section | default false -}} -
-
-

- - {{ $post.Title }} - -

-
- - - {{- if $showSection }} - - {{ lang.Translate ($post.Section | singularize) | default ($post.Section | singularize | title) }} - - {{- end }} -
-
- - {{- with $post.Summary }} -
- {{ . }} -
- {{- end }} - - {{- with $post.Params.tags }} -
-
    - {{- range first 3 . }} -
  • - #{{ . }} -
  • - {{- end }} - {{- if gt (len .) 3 }} -
  • - - +{{ sub (len .) 3 }} {{ lang.Translate "more" | default "more" }} - -
  • - {{- end }} -
-
- {{- end }} -
diff --git a/layouts/partials/list/recent-posts.html b/layouts/partials/list/recent-posts.html deleted file mode 100644 index 464e9f7..0000000 --- a/layouts/partials/list/recent-posts.html +++ /dev/null @@ -1,45 +0,0 @@ -{{- /* -List of specified number of the most recent and published posts. Accepts a dict with the following optional parameters: - -@context {int} count: Number of posts to display (default: 10). -@context {string} title: Section title (default: "Recent Articles"). -@context {bool} show_view_all: Whether to show "View All Posts" link (default: true). - -@example: {{ partial "list/recent-posts.html" (dict "count" 20 "title" "Latest updates" "show_view_all" true) }} -*/ -}} - -{{- $count := .count | default 10 -}} -{{- $title := .title | default (lang.Translate "posts_recent" | default "Recent Articles") -}} -{{- $showViewAll := .show_view_all | default true -}} -
-
-

- {{ $title }} -

-
- - {{- $recentPosts := where site.RegularPages "Params.excludeFromLists" "!=" true | first $count }} - {{- if $recentPosts }} -
-
    - {{- range $recentPosts }} -
  • - {{- partial "list/post-card.html" (dict "post" . "show_section" true) }} -
  • - {{- end }} -
- - {{- if $showViewAll }} - {{- with site.GetPage "/all-posts"}} - - {{ lang.Translate "posts_all_view" | default "View all posts" }} » - - {{- end }} - {{- end }} -
- {{ else }} -

- {{ lang.Translate "list_empty" | default "No posts in this section." }} -

- {{- end }} -
diff --git a/layouts/partials/navmenu.html b/layouts/partials/navmenu.html deleted file mode 100644 index af0fc2e..0000000 --- a/layouts/partials/navmenu.html +++ /dev/null @@ -1,48 +0,0 @@ -{{- /* -Simplified version of the `hugo new template` menu.html default. 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" .) }} -*/}} - -{{- $currentPage := .page }} -{{- $menuID := .menuID }} - -{{- with index site.Menus $menuID }} - -{{- end -}} diff --git a/layouts/partials/select-language.html b/layouts/partials/select-language.html deleted file mode 100644 index 6efcc61..0000000 --- a/layouts/partials/select-language.html +++ /dev/null @@ -1,38 +0,0 @@ -{{- /* -Selection of available languages. -Dynamically links to corresponding page/post if a translated version exists, otherwise to homepage of that language as fallback. - -Note: `$activeLang` and `$allTranslationsForPage` are technically unnecessary variables, their values could be called with `$.Lang` and `$.Translations` respectively. -These variables - together with the explicit naming of `.` context variables in other cases - were chosen for better readability and understandability of the code. -*/ -}} - -{{- if gt (len site.Languages) 1 }} -{{- $activeLang := .Lang }} -{{- $allTranslationsForPage := .Translations }} -
- -
-{{- end }} diff --git a/layouts/partials/select-theme.html b/layouts/partials/select-theme.html deleted file mode 100644 index 914eacc..0000000 --- a/layouts/partials/select-theme.html +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/layouts/partials/single/next-prev.html b/layouts/partials/single/next-prev.html deleted file mode 100644 index 55a3fff..0000000 --- a/layouts/partials/single/next-prev.html +++ /dev/null @@ -1,44 +0,0 @@ -{{- /* Navigation for next & previous post and back to top */ -}} -{{- if ne .Params.excludeFromLists true }} - - - - - -{{- end }} diff --git a/layouts/partials/single/tags.html b/layouts/partials/single/tags.html deleted file mode 100644 index 0c10d20..0000000 --- a/layouts/partials/single/tags.html +++ /dev/null @@ -1,17 +0,0 @@ -{{- with .GetTerms "tags" }} -
- - - -
-{{- end }} -- cgit v1.2.3