diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-27 16:32:58 +0000 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-27 16:32:58 +0000 |
| commit | db0b5c34432b4c0135af8c5c885fd6ad348c3691 (patch) | |
| tree | 8f38b973a8dd3fc22bbd28498004940451621b41 /backend/templates/components.html | |
| parent | 7bd309f3ca44930c5207b94acc2d425b24d4b369 (diff) | |
| parent | 1e2ad3a8f8cd2c12786b92210616325a33d1b209 (diff) | |
Merge pull request '[Feat] Custom sections' (#1) from feat/custom-sections into main
Reviewed-on: https://git.anhgelus.world/anhgelus/small-web/pulls/1
Diffstat (limited to 'backend/templates/components.html')
| -rw-r--r-- | backend/templates/components.html | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/backend/templates/components.html b/backend/templates/components.html index da133a6..5365445 100644 --- a/backend/templates/components.html +++ b/backend/templates/components.html @@ -1,16 +1,17 @@ -{{define "logs_display"}} +{{define "section_display"}} <article> - {{ range .Logs }} + {{ $uri := .URI }} {{ range .Data }} <article> - <h2><a href="/logs/{{ .Slug }}">{{ .LogTitle }}</a></h2> + <h3><a href="/{{ $uri }}/{{ .Slug }}">{{ .DataTitle }}</a></h3> <figure> - <a href="/logs/{{ .Slug }}"><img src="{{ static .Img.Src }}" alt="{{ .Img.Alt }}" /></a> + <a href="/{{ $uri }}/{{ .Slug }}"><img src="{{ static .Img.Src }}" alt="{{ .Img.Alt }}" /></a> <figcaption>{{ .Img.Legend }}</figcaption> </figure> <p>{{ .Description }}</p> </article> - {{ end }} {{ if ne .PagesNumber 1 }} + {{ end }} <div class="pagination"> + {{ if .Paginate }} <nav> {{ if ne .CurrentPage 1 }}<a href="?page={{ before .CurrentPage }}">Précédent</a>{{else}} <p></p> @@ -20,7 +21,9 @@ <p></p> {{end}} </nav> + {{ else }} + <a href="/{{ $uri }}/">Voir plus</a> + {{ end }} </div> - {{ end }} </article> {{end}} |
