From 18464414651b6473cf66b92394c5f6de9e9f0be0 Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 7 Nov 2026 13:40:09 +0100 Subject: [PATCH] refactor: Mobile footer directly shows menu options --- .gitmodules | 3 +- data/lucideicons.json | 7 +++ layouts/_partials/head/extra.html | 1 + layouts/_partials/icon.html | 12 +++++ .../_partials/language-selector-inline.html | 14 +++++ layouts/_partials/mobilemenu.html | 54 ++++++++++++------- static/icons/lucide/calendar.svg | 16 ++++++ static/icons/lucide/circle-question-mark.svg | 15 ++++++ static/icons/lucide/house.svg | 14 +++++ static/icons/lucide/languages.svg | 18 +++++++ static/icons/lucide/newspaper.svg | 16 ++++++ themes/zen | 2 +- 12 files changed, 151 insertions(+), 21 deletions(-) create mode 100644 data/lucideicons.json create mode 100644 layouts/_partials/icon.html create mode 100644 layouts/_partials/language-selector-inline.html create mode 100644 static/icons/lucide/calendar.svg create mode 100644 static/icons/lucide/circle-question-mark.svg create mode 100644 static/icons/lucide/house.svg create mode 100644 static/icons/lucide/languages.svg create mode 100644 static/icons/lucide/newspaper.svg diff --git a/.gitmodules b/.gitmodules index dc19131..4242125 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "themes/zen"] path = themes/zen - url = https://github.com/frjo/hugo-theme-zen.git + url = ssh://forgejo@git.hamburg.ccc.de/ViMaSter/hackertours-theme.git + branch = hackertours-mobile-nav diff --git a/data/lucideicons.json b/data/lucideicons.json new file mode 100644 index 0000000..ff446d1 --- /dev/null +++ b/data/lucideicons.json @@ -0,0 +1,7 @@ +{ + "house": "", + "rss": "", + "calendar": "", + "circle-question-mark": "", + "languages": "" +} \ No newline at end of file diff --git a/layouts/_partials/head/extra.html b/layouts/_partials/head/extra.html index 9bc15d9..bc6605d 100644 --- a/layouts/_partials/head/extra.html +++ b/layouts/_partials/head/extra.html @@ -48,3 +48,4 @@ og:image:alt. {{- end -}} {{- end -}} {{- end -}} + diff --git a/layouts/_partials/icon.html b/layouts/_partials/icon.html new file mode 100644 index 0000000..6329e76 --- /dev/null +++ b/layouts/_partials/icon.html @@ -0,0 +1,12 @@ +{{- /* +Render a Lucide icon from the local icons data file. +Usage: {{ partial "icon" "house" }} +Icons are fetched from data/lucideicons.json at build time +*/ -}} +{{- $iconName := . -}} +{{- with index hugo.Data.lucideicons $iconName -}} + {{- . | safeHTML -}} +{{- else -}} + {{- /* Fallback if icon not found */ -}} + +{{- end -}} diff --git a/layouts/_partials/language-selector-inline.html b/layouts/_partials/language-selector-inline.html new file mode 100644 index 0000000..3a6b0b6 --- /dev/null +++ b/layouts/_partials/language-selector-inline.html @@ -0,0 +1,14 @@ +{{- /* Inline language selector for mobile bottom nav */ -}} + diff --git a/layouts/_partials/mobilemenu.html b/layouts/_partials/mobilemenu.html index af2cf49..e77bced 100644 --- a/layouts/_partials/mobilemenu.html +++ b/layouts/_partials/mobilemenu.html @@ -1,22 +1,38 @@ - + {{ if hugo.IsMultilingual }} +
  • + {{ if eq .Lang "en" }} + + {{ partial "icon" "languages" }} + Deutsch + + {{ else }} + + {{ partial "icon" "languages" }} + English + + {{ end }} +
  • + {{ end }} + + diff --git a/static/icons/lucide/calendar.svg b/static/icons/lucide/calendar.svg new file mode 100644 index 0000000..4679497 --- /dev/null +++ b/static/icons/lucide/calendar.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/static/icons/lucide/circle-question-mark.svg b/static/icons/lucide/circle-question-mark.svg new file mode 100644 index 0000000..cf7e6ef --- /dev/null +++ b/static/icons/lucide/circle-question-mark.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/static/icons/lucide/house.svg b/static/icons/lucide/house.svg new file mode 100644 index 0000000..10e4097 --- /dev/null +++ b/static/icons/lucide/house.svg @@ -0,0 +1,14 @@ + + + + diff --git a/static/icons/lucide/languages.svg b/static/icons/lucide/languages.svg new file mode 100644 index 0000000..c3c1486 --- /dev/null +++ b/static/icons/lucide/languages.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/static/icons/lucide/newspaper.svg b/static/icons/lucide/newspaper.svg new file mode 100644 index 0000000..faf0fb5 --- /dev/null +++ b/static/icons/lucide/newspaper.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/themes/zen b/themes/zen index 6d4ee82..945820e 160000 --- a/themes/zen +++ b/themes/zen @@ -1 +1 @@ -Subproject commit 6d4ee822a88a3dbe2443b2c985523e376f47056f +Subproject commit 945820ec5b526065c796ede14dc44a4a4f0a3335