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 From ef3f8de38795a92dfc5d232a533c37d53794f1c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Mon, 27 Oct 2025 13:44:41 +0100 Subject: fix(section): cannot execute home_logs --- backend/templates/components.html | 9 +++++---- backend/templates/home.html | 6 ++++-- backend/templates/home_log.html | 9 ++++++++- 3 files changed, 17 insertions(+), 7 deletions(-) (limited to 'backend/templates') diff --git a/backend/templates/components.html b/backend/templates/components.html index 9792784..8f1bcc2 100644 --- a/backend/templates/components.html +++ b/backend/templates/components.html @@ -1,9 +1,8 @@ {{define "logs_display"}} {{end}} diff --git a/backend/templates/home.html b/backend/templates/home.html index ce4f4e8..3ff9ce3 100644 --- a/backend/templates/home.html +++ b/backend/templates/home.html @@ -1,12 +1,14 @@ {{define "body"}}
-

logs

+

{{ .Name }}

{{ .PageDescription }}

{{ range .Sections }}
- {{ template "logs_display" . }} +

{{ .Name }}

+

{{ .Description }}

+ {{ template "logs_display" . }}
{{ end }}
diff --git a/backend/templates/home_log.html b/backend/templates/home_log.html index 485661c..28bf36a 100644 --- a/backend/templates/home_log.html +++ b/backend/templates/home_log.html @@ -1,3 +1,10 @@ {{define "body"}} -
{{ template "logs_display" . }}
+
+ {{ range .Sections }} +
+

{{ .Name }}

+

{{ .Description }}

+
+ {{ template "logs_display" . }} {{ end }} +
{{end}} -- cgit v1.2.3 From 8d000018e132583bf4797ac9cb4ce2c4e96ed8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Mon, 27 Oct 2025 14:40:26 +0100 Subject: feat(section): display paginate in full list --- backend/templates/components.html | 14 +++++++++++++- backend/templates/home.html | 2 +- backend/templates/home_log.html | 10 ---------- backend/templates/log.html | 11 ----------- 4 files changed, 14 insertions(+), 23 deletions(-) delete mode 100644 backend/templates/home_log.html delete mode 100644 backend/templates/log.html (limited to 'backend/templates') diff --git a/backend/templates/components.html b/backend/templates/components.html index 8f1bcc2..72bf40e 100644 --- a/backend/templates/components.html +++ b/backend/templates/components.html @@ -1,4 +1,4 @@ -{{define "logs_display"}} +{{define "section_display"}}
{{ $uri := .URI }} {{ range .Data }}
@@ -11,7 +11,19 @@
{{ end }}
{{end}} diff --git a/backend/templates/home.html b/backend/templates/home.html index 3ff9ce3..d5dbb28 100644 --- a/backend/templates/home.html +++ b/backend/templates/home.html @@ -8,7 +8,7 @@

{{ .Name }}

{{ .Description }}

- {{ template "logs_display" . }} + {{ template "section_display" . }}
{{ end }} diff --git a/backend/templates/home_log.html b/backend/templates/home_log.html deleted file mode 100644 index 28bf36a..0000000 --- a/backend/templates/home_log.html +++ /dev/null @@ -1,10 +0,0 @@ -{{define "body"}} -
- {{ range .Sections }} -
-

{{ .Name }}

-

{{ .Description }}

-
- {{ template "logs_display" . }} {{ end }} -
-{{end}} diff --git a/backend/templates/log.html b/backend/templates/log.html deleted file mode 100644 index a384459..0000000 --- a/backend/templates/log.html +++ /dev/null @@ -1,11 +0,0 @@ -{{define "body"}} -
-

{{ .DataTitle }}

-

{{ .Description }}

-
- {{ .Img.Alt }} -
{{ .Img.Legend }}
-
- {{ .Content }} -
-{{end}} -- cgit v1.2.3 From 9c2d960a3b7728b7857ad71ed656be4a02d58599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Mon, 27 Oct 2025 14:42:36 +0100 Subject: fix(backend): missing files --- backend/templates/data.html | 11 +++++++++++ backend/templates/home_section.html | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 backend/templates/data.html create mode 100644 backend/templates/home_section.html (limited to 'backend/templates') diff --git a/backend/templates/data.html b/backend/templates/data.html new file mode 100644 index 0000000..a384459 --- /dev/null +++ b/backend/templates/data.html @@ -0,0 +1,11 @@ +{{define "body"}} +
+

{{ .DataTitle }}

+

{{ .Description }}

+
+ {{ .Img.Alt }} +
{{ .Img.Legend }}
+
+ {{ .Content }} +
+{{end}} diff --git a/backend/templates/home_section.html b/backend/templates/home_section.html new file mode 100644 index 0000000..cf7595d --- /dev/null +++ b/backend/templates/home_section.html @@ -0,0 +1,10 @@ +{{define "body"}} +
+ {{ range .Sections }} +
+

{{ .Name }}

+

{{ .Description }}

+
+ {{ template "section_display" . }} {{ end }} +
+{{end}} -- cgit v1.2.3 From 1f0cf029644861bc31a363ecfdbfcb6ebafff3b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Mon, 27 Oct 2025 15:53:45 +0100 Subject: fix(section): bad description in og --- backend/templates/components.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backend/templates') diff --git a/backend/templates/components.html b/backend/templates/components.html index 72bf40e..5365445 100644 --- a/backend/templates/components.html +++ b/backend/templates/components.html @@ -2,7 +2,7 @@
{{ $uri := .URI }} {{ range .Data }}
-

{{ .DataTitle }}

+

{{ .DataTitle }}

{{ .Img.Alt }}
{{ .Img.Legend }}
-- cgit v1.2.3 From 0c3a89ee546a2a3215eb32d9786dabeda051812d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Mon, 27 Oct 2025 16:04:14 +0100 Subject: fix(section): bad template for RSS --- backend/templates/rss.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'backend/templates') diff --git a/backend/templates/rss.xml b/backend/templates/rss.xml index 6d99272..2abca8e 100644 --- a/backend/templates/rss.xml +++ b/backend/templates/rss.xml @@ -3,15 +3,17 @@ {{ .Title }} - https://{{ .Domain }}/{{ .URI }}/ + {{ $sec := first .Sections }} + {{ $uri := $sec.URI }} + https://{{ .Domain }}/{{ $uri }}/ {{ .PageDescription }} fr-fr {{ $domain := .Domain }} - {{ range .Section.Data }} + {{ range $sec.Data }} {{ .DataTitle }} - https://{{ $domain }}/{{ .URI }}/{{ .Slug }} - https://{{ $domain }}/{{ .URI }}/{{ .Slug }} + https://{{ $domain }}/{{ $uri }}/{{ .Slug }} + https://{{ $domain }}/{{ $uri }}/{{ .Slug }} {{ .Description }} {{ .PubDateRSS }} -- cgit v1.2.3 From 3ce41d99d688410a361d83767b50b64a35b569d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Mon, 27 Oct 2025 17:21:41 +0100 Subject: feat(sections): general rss feed --- backend/templates/base.html | 2 +- backend/templates/rss.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'backend/templates') diff --git a/backend/templates/base.html b/backend/templates/base.html index 0a54096..436a1c2 100644 --- a/backend/templates/base.html +++ b/backend/templates/base.html @@ -1,5 +1,5 @@ - + diff --git a/backend/templates/rss.xml b/backend/templates/rss.xml index 2abca8e..039a2f7 100644 --- a/backend/templates/rss.xml +++ b/backend/templates/rss.xml @@ -4,16 +4,16 @@ {{ .Title }} {{ $sec := first .Sections }} - {{ $uri := $sec.URI }} - https://{{ .Domain }}/{{ $uri }}/ + {{ $uri := uri $sec.URI }} + https://{{ .Domain }}/{{ $uri }} {{ .PageDescription }} - fr-fr + {{ .Language }} {{ $domain := .Domain }} {{ range $sec.Data }} {{ .DataTitle }} - https://{{ $domain }}/{{ $uri }}/{{ .Slug }} - https://{{ $domain }}/{{ $uri }}/{{ .Slug }} + https://{{ $domain }}/{{ $uri }}{{ .Slug }} + https://{{ $domain }}/{{ $uri }}{{ .Slug }} {{ .Description }} {{ .PubDateRSS }} -- cgit v1.2.3 From 1e2ad3a8f8cd2c12786b92210616325a33d1b209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Mon, 27 Oct 2025 17:32:41 +0100 Subject: feat(home): better display of sections --- backend/templates/home.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'backend/templates') diff --git a/backend/templates/home.html b/backend/templates/home.html index d5dbb28..d574525 100644 --- a/backend/templates/home.html +++ b/backend/templates/home.html @@ -4,12 +4,14 @@

{{ .Name }}

{{ .PageDescription }}

- {{ range .Sections }} -
-

{{ .Name }}

-

{{ .Description }}

- {{ template "section_display" . }} +
+ {{ range .Sections }} +
+

{{ .Name }}

+

{{ .Description }}

+ {{ template "section_display" . }} +
+ {{ end }}
- {{ end }} {{end}} -- cgit v1.2.3