aboutsummaryrefslogtreecommitdiff
path: root/backend/templates/home_log.html
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-10-03 10:42:07 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2025-10-03 10:42:07 +0200
commit620b03459751a17632f6165b289206dc6d86ed7c (patch)
tree186ab77201da3ad82e5a118561eb199a76955bc6 /backend/templates/home_log.html
parent2d131a363645e4a32e47036742087acc4bf1379f (diff)
feat(backend): handle display all log
Diffstat (limited to 'backend/templates/home_log.html')
-rw-r--r--backend/templates/home_log.html23
1 files changed, 23 insertions, 0 deletions
diff --git a/backend/templates/home_log.html b/backend/templates/home_log.html
new file mode 100644
index 0000000..dd5fdc1
--- /dev/null
+++ b/backend/templates/home_log.html
@@ -0,0 +1,23 @@
+{{define "body"}}
+<article>
+ {{ range .Logs }}
+ <article>
+ <h2><a href="/log/{{ .Slug }}">{{ .LogTitle }}</a></h2>
+ <figure>
+ <a href="/log/{{ .Slug }}"><img src="{{ .Img.Src }}" alt="{{ .Img.Alt }}"></a>
+ <figcaption>{{ .Img.Legend }}</figcaption>
+ </figure>
+ <p>
+ {{ .Description }}
+ </p>
+ </article>
+ {{ end }}
+ {{ if ne .PagesNumber 1 }}
+ <div class="pagination">
+ {{ if ne .CurrentPage 1 }}<a href="?page={{ before .CurrentPage }}">Précédent</a>{{else}}<p></p>{{end}}
+ <p>{{ .CurrentPage }}/{{ .PagesNumber }}</p>
+ {{ if ne .CurrentPage .PagesNumber }}<a href="?page={{ next .CurrentPage }}">Suivant</a>{{else}}<p></p>{{end}}
+ </div>
+ {{ end }}
+</article>
+{{end}}