From f1e008670cd865520eb5f21fe6e7b56f02076a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Mon, 27 Oct 2025 13:32:39 +0100 Subject: feat(config): supports multiple sections --- backend/templates/components.html | 20 +++++--------------- backend/templates/home.html | 4 ++++ backend/templates/log.html | 2 +- backend/templates/rss.xml | 12 ++++++------ 4 files changed, 16 insertions(+), 22 deletions(-) (limited to 'backend/templates') diff --git a/backend/templates/components.html b/backend/templates/components.html index da133a6..9792784 100644 --- a/backend/templates/components.html +++ b/backend/templates/components.html @@ -1,26 +1,16 @@ {{define "logs_display"}}
- {{ range .Logs }} + {{ $uri := .URI }} + {{ range .Data }} - {{ end }} {{ if ne .PagesNumber 1 }} - {{ end }} + Voir plus
{{end}} diff --git a/backend/templates/home.html b/backend/templates/home.html index 7a76e48..ce4f4e8 100644 --- a/backend/templates/home.html +++ b/backend/templates/home.html @@ -4,6 +4,10 @@

logs

{{ .PageDescription }}

+ {{ range .Sections }} +
{{ template "logs_display" . }} +
+ {{ end }} {{end}} diff --git a/backend/templates/log.html b/backend/templates/log.html index 75e0a42..a384459 100644 --- a/backend/templates/log.html +++ b/backend/templates/log.html @@ -1,6 +1,6 @@ {{define "body"}}
-

{{ .LogTitle }}

+

{{ .DataTitle }}

{{ .Description }}

{{ .Img.Alt }} diff --git a/backend/templates/rss.xml b/backend/templates/rss.xml index c8390da..6d99272 100644 --- a/backend/templates/rss.xml +++ b/backend/templates/rss.xml @@ -3,18 +3,18 @@ {{ .Title }} - https://{{ .Domain }}/logs/ + https://{{ .Domain }}/{{ .URI }}/ {{ .PageDescription }} fr-fr {{ $domain := .Domain }} - {{ range .Logs }} + {{ range .Section.Data }} - {{ .LogTitle }} - https://{{ $domain }}/logs/{{ .Slug }} - https://{{ $domain }}/logs/{{ .Slug }} + {{ .DataTitle }} + https://{{ $domain }}/{{ .URI }}/{{ .Slug }} + https://{{ $domain }}/{{ .URI }}/{{ .Slug }} {{ .Description }} {{ .PubDateRSS }} {{ end }} - \ No newline at end of file + -- cgit v1.2.3