aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hergès <william@herges.fr>2025-10-27 13:44:41 +0100
committerWilliam Hergès <william@herges.fr>2025-10-27 13:44:41 +0100
commitef3f8de38795a92dfc5d232a533c37d53794f1c8 (patch)
treef65a1095724fd0f257158532f496d2d45a6f8fb5
parentf1e008670cd865520eb5f21fe6e7b56f02076a23 (diff)
fix(section): cannot execute home_logs
-rw-r--r--backend/templates/components.html9
-rw-r--r--backend/templates/home.html6
-rw-r--r--backend/templates/home_log.html9
3 files changed, 17 insertions, 7 deletions
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"}}
<article>
- {{ $uri := .URI }}
- {{ range .Data }}
+ {{ $uri := .URI }} {{ range .Data }}
<article>
- <h2><a href="/{{ $uri }}/{{ .Slug }}">{{ .DataTitle }}</a></h2>
+ <h2><a href="/{{ $uri }}/{{ .Slug }}">{{ .DataTitle }}</a></h2>
<figure>
<a href="/{{ $uri }}/{{ .Slug }}"><img src="{{ static .Img.Src }}" alt="{{ .Img.Alt }}" /></a>
<figcaption>{{ .Img.Legend }}</figcaption>
@@ -11,6 +10,8 @@
<p>{{ .Description }}</p>
</article>
{{ end }}
- <a href="/{{ $uri }}/">Voir plus</a>
+ <div class="pagination">
+ <a href="/{{ $uri }}/">Voir plus</a>
+ </div>
</article>
{{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"}}
<main id="content">
<div class="introduction">
- <h1>logs</h1>
+ <h1>{{ .Name }}</h1>
<p>{{ .PageDescription }}</p>
</div>
{{ range .Sections }}
<div>
- {{ template "logs_display" . }}
+ <h2>{{ .Name }}</h2>
+ <p>{{ .Description }}</p>
+ {{ template "logs_display" . }}
</div>
{{ end }}
</main>
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"}}
-<main id="content">{{ template "logs_display" . }}</main>
+<main id="content">
+ {{ range .Sections }}
+ <div class="introduction">
+ <h1>{{ .Name }}</h1>
+ <p>{{ .Description }}</p>
+ </div>
+ {{ template "logs_display" . }} {{ end }}
+</main>
{{end}}