From 93b4246cd1755c1998f7b6477bb98d69441cd201 Mon Sep 17 00:00:00 2001 From: jtbx Date: Tue, 17 Oct 2023 22:07:39 +0200 Subject: [PATCH] Home: Rework structure --- content/home/{1-visit.md => 1-visit/index.md} | 0 .../home/{2-kalender.md => 2-kalender/index.md} | 0 content/home/{3-gruppen.md => 3-gruppen/index.md} | 0 content/home/{4-kontakt.md => 4-kontakt/index.md} | 0 .../{images => 9-freunde}/cryptoparty-300x100.png | Bin .../home/{images => 9-freunde}/ffhhlogo_neu.png | Bin content/home/{images => 9-freunde}/fiff.png | Bin content/home/{images => 9-freunde}/frappant.png | Bin content/home/{images => 9-freunde}/fux_logo.png | Bin .../home/{images => 9-freunde}/gaengeviertel.png | Bin content/home/{images => 9-freunde}/hbgu.png | Bin content/home/{9-freunde.md => 9-freunde/index.md} | 14 +++++++------- themes/ccchh/layouts/index.html | 7 ++++--- 13 files changed, 11 insertions(+), 10 deletions(-) rename content/home/{1-visit.md => 1-visit/index.md} (100%) rename content/home/{2-kalender.md => 2-kalender/index.md} (100%) rename content/home/{3-gruppen.md => 3-gruppen/index.md} (100%) rename content/home/{4-kontakt.md => 4-kontakt/index.md} (100%) rename content/home/{images => 9-freunde}/cryptoparty-300x100.png (100%) rename content/home/{images => 9-freunde}/ffhhlogo_neu.png (100%) rename content/home/{images => 9-freunde}/fiff.png (100%) rename content/home/{images => 9-freunde}/frappant.png (100%) rename content/home/{images => 9-freunde}/fux_logo.png (100%) rename content/home/{images => 9-freunde}/gaengeviertel.png (100%) rename content/home/{images => 9-freunde}/hbgu.png (100%) rename content/home/{9-freunde.md => 9-freunde/index.md} (68%) diff --git a/content/home/1-visit.md b/content/home/1-visit/index.md similarity index 100% rename from content/home/1-visit.md rename to content/home/1-visit/index.md diff --git a/content/home/2-kalender.md b/content/home/2-kalender/index.md similarity index 100% rename from content/home/2-kalender.md rename to content/home/2-kalender/index.md diff --git a/content/home/3-gruppen.md b/content/home/3-gruppen/index.md similarity index 100% rename from content/home/3-gruppen.md rename to content/home/3-gruppen/index.md diff --git a/content/home/4-kontakt.md b/content/home/4-kontakt/index.md similarity index 100% rename from content/home/4-kontakt.md rename to content/home/4-kontakt/index.md diff --git a/content/home/images/cryptoparty-300x100.png b/content/home/9-freunde/cryptoparty-300x100.png similarity index 100% rename from content/home/images/cryptoparty-300x100.png rename to content/home/9-freunde/cryptoparty-300x100.png diff --git a/content/home/images/ffhhlogo_neu.png b/content/home/9-freunde/ffhhlogo_neu.png similarity index 100% rename from content/home/images/ffhhlogo_neu.png rename to content/home/9-freunde/ffhhlogo_neu.png diff --git a/content/home/images/fiff.png b/content/home/9-freunde/fiff.png similarity index 100% rename from content/home/images/fiff.png rename to content/home/9-freunde/fiff.png diff --git a/content/home/images/frappant.png b/content/home/9-freunde/frappant.png similarity index 100% rename from content/home/images/frappant.png rename to content/home/9-freunde/frappant.png diff --git a/content/home/images/fux_logo.png b/content/home/9-freunde/fux_logo.png similarity index 100% rename from content/home/images/fux_logo.png rename to content/home/9-freunde/fux_logo.png diff --git a/content/home/images/gaengeviertel.png b/content/home/9-freunde/gaengeviertel.png similarity index 100% rename from content/home/images/gaengeviertel.png rename to content/home/9-freunde/gaengeviertel.png diff --git a/content/home/images/hbgu.png b/content/home/9-freunde/hbgu.png similarity index 100% rename from content/home/images/hbgu.png rename to content/home/9-freunde/hbgu.png diff --git a/content/home/9-freunde.md b/content/home/9-freunde/index.md similarity index 68% rename from content/home/9-freunde.md rename to content/home/9-freunde/index.md index 95bb3dd..5b18d3c 100644 --- a/content/home/9-freunde.md +++ b/content/home/9-freunde/index.md @@ -4,25 +4,25 @@ date: 2022-11-20T09:03:20-08:00 draft: false headless: true resources: -- src: images/cryptoparty-300x100.png +- src: cryptoparty-300x100.png params: url: https://cryptoparty-hamburg.de -- src: images/ffhhlogo_neu.png +- src: ffhhlogo_neu.png params: url: https://hamburg.freifunk.net/ -- src: images/fux_logo.png +- src: fux_logo.png params: url: https://www.fux-eg.org/ -- src: images/fiff.png +- src: fiff.png params: url: https://www.fiff.de/ -- src: images/hbgu.png +- src: hbgu.png params: url: https://www.stop-watching-hamburg.de/ -- src: images/frappant.png +- src: frappant.png params: url: https://frappant.org/ -- src: images/gaengeviertel.png +- src: gaengeviertel.png params: url: https://das-gaengeviertel.info/ diff --git a/themes/ccchh/layouts/index.html b/themes/ccchh/layouts/index.html index 4c58c3e..994d007 100644 --- a/themes/ccchh/layouts/index.html +++ b/themes/ccchh/layouts/index.html @@ -23,16 +23,17 @@ {{- end }} - {{- $home_sections := .Site.GetPage "/home" }} - {{- range sort ($home_sections.Resources.Match "*.md") ".Name" }} + {{- $home := .Site.GetPage "/home" }} + {{- range sort ($home.Resources.ByType "page") "File.Path" "asc" }}

{{ .Title }}

{{ .Content -}} + {{- $sec := .CurrentSection }} {{- with .Params.Resources }}
{{- range . }} - {{- $img := $home_sections.Resources.GetMatch (printf "%s" .src) }} + {{- $img := $sec.Resources.GetMatch (printf "*/%s" .src) }} {{- end }}