aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/templates/base.html2
-rw-r--r--backend/templates/logs_display.html8
-rw-r--r--frontend/scss/home.scss33
-rw-r--r--main.go6
4 files changed, 39 insertions, 10 deletions
diff --git a/backend/templates/base.html b/backend/templates/base.html
index 5d62ffa..8466bc0 100644
--- a/backend/templates/base.html
+++ b/backend/templates/base.html
@@ -39,7 +39,7 @@
<footer>
<p>&copy; 2025 - Anhgelus Morthuuzh</p>
<p>«&thinsp;{{ .Quote }}&thinsp;»</p>
- <p><a href="/legal">Mentions légales</a>, <a href="https://git.anhgelus.world/anhgelus/small-web">Code source</a></p>
+ <p><a href="/legal">Mentions légales</a>, <a href="https://git.anhgelus.world/anhgelus/small-web">Code source</a>.</p>
</footer>
</body>
</html>
diff --git a/backend/templates/logs_display.html b/backend/templates/logs_display.html
index d76d7c2..adafacf 100644
--- a/backend/templates/logs_display.html
+++ b/backend/templates/logs_display.html
@@ -14,9 +14,11 @@
{{ 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>
+ {{ 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>
</div>
{{ end }}
</article>
diff --git a/frontend/scss/home.scss b/frontend/scss/home.scss
index bb64a95..29a0116 100644
--- a/frontend/scss/home.scss
+++ b/frontend/scss/home.scss
@@ -11,12 +11,35 @@ article article {
.pagination {
display: flex;
- flex-direction: row;
- justify-content: center;
align-items: center;
- gap: var(--margin-base);
+ justify-content: center;
- & p {
- margin-bottom: 0;
+
+ & > div {
+ display: inline-grid;
+ grid-template-columns: 2fr 1fr 2fr;
+ justify-content: center;
+ align-items: center;
+ align-content: center;
+ gap: var(--margin-base);
+
+ @media only screen and (max-width: 350px) {
+ display: flex;
+ flex-direction: column-reverse;
+ }
+
+ & > *:nth-child(1) {
+ text-align: right;
+ }
+ & > *:nth-child(2) {
+ text-align: center;
+ }
+ & > *:nth-child(3) {
+ text-align: left;
+ }
+
+ & p {
+ margin-bottom: 0;
+ }
}
}
diff --git a/main.go b/main.go
index 480a501..3fba254 100644
--- a/main.go
+++ b/main.go
@@ -75,7 +75,11 @@ func main() {
backend.HandleRoot(r, cfg)
backend.HandleLogs(r)
- backend.HandleStaticFiles(r, "/assets", backend.UsableEmbedFS("dist", embeds))
+ if dev {
+ backend.HandleStaticFiles(r, "/assets", os.DirFS("dist"))
+ } else {
+ backend.HandleStaticFiles(r, "/assets", backend.UsableEmbedFS("dist", embeds))
+ }
backend.HandleStaticFiles(r, "/static", os.DirFS(publicDir))
slog.Info("starting http server")