diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-06 11:59:09 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-06 11:59:09 +0200 |
| commit | 0ac33061f8275a6808276adfa8ea8b8dcd92d7c9 (patch) | |
| tree | b3075f8bb56e833647444e93945b3ccd7dd8e13c /backend | |
| parent | da56ce47d2e275db58e429a3d8ab85290541ca6f (diff) | |
feat(frontend): better link style in light theme
and rename /log route to /logs/
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/logs.go | 3 | ||||
| -rw-r--r-- | backend/templates/components.html | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/backend/logs.go b/backend/logs.go index 7a6db3e..db69462 100644 --- a/backend/logs.go +++ b/backend/logs.go @@ -108,9 +108,10 @@ func readLogDir(path string, dir []os.DirEntry) error { } func HandleLogs(r *chi.Mux) { - r.Route("/log", func(r chi.Router) { + r.Route("/logs", func(r chi.Router) { r.Get("/", handleLogList) r.Get("/{slug:[a-zA-Z0-9-]+}", handleLog) + r.Get("/{slug:[a-zA-Z0-9-]+}/", handleLog) }) } diff --git a/backend/templates/components.html b/backend/templates/components.html index 280fa3d..2758a8b 100644 --- a/backend/templates/components.html +++ b/backend/templates/components.html @@ -2,9 +2,9 @@ <article> {{ range .Logs }} <article> - <h2><a href="/log/{{ .Slug }}">{{ .Title }}</a></h2> + <h2><a href="/logs/{{ .Slug }}">{{ .Title }}</a></h2> <figure> - <a href="/log/{{ .Slug }}"><img src="{{ static .Img.Src }}" alt="{{ .Img.Alt }}"></a> + <a href="/logs/{{ .Slug }}"><img src="{{ static .Img.Src }}" alt="{{ .Img.Alt }}"></a> <figcaption>{{ .Img.Legend }}</figcaption> </figure> <p>{{ .Description }}</p> |
