aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hergès <william@herges.fr>2025-10-27 17:32:41 +0100
committerWilliam Hergès <william@herges.fr>2025-10-27 17:32:41 +0100
commit1e2ad3a8f8cd2c12786b92210616325a33d1b209 (patch)
tree8f38b973a8dd3fc22bbd28498004940451621b41
parent3ce41d99d688410a361d83767b50b64a35b569d4 (diff)
feat(home): better display of sections
-rw-r--r--backend/templates/home.html14
-rw-r--r--frontend/scss/home.scss6
2 files changed, 14 insertions, 6 deletions
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 @@
<h1>{{ .Name }}</h1>
<p>{{ .PageDescription }}</p>
</div>
- {{ range .Sections }}
- <div>
- <h2>{{ .Name }}</h2>
- <p>{{ .Description }}</p>
- {{ template "section_display" . }}
+ <div class="sections">
+ {{ range .Sections }}
+ <section>
+ <h2>{{ .Name }}</h2>
+ <p>{{ .Description }}</p>
+ {{ template "section_display" . }}
+ </section>
+ {{ end }}
</div>
- {{ end }}
</main>
{{end}}
diff --git a/frontend/scss/home.scss b/frontend/scss/home.scss
index 6fa4192..075896e 100644
--- a/frontend/scss/home.scss
+++ b/frontend/scss/home.scss
@@ -2,6 +2,12 @@
margin: var(--margin-header) 0;
}
+.sections {
+ display: flex;
+ flex-direction: column;
+ gap: calc(1.5 * var(--margin-header));
+}
+
article article {
margin-bottom: var(--margin-header);
&:last-child {