diff options
| author | William Hergès <william@herges.fr> | 2025-10-03 18:40:45 +0200 |
|---|---|---|
| committer | William Hergès <william@herges.fr> | 2025-10-03 18:40:45 +0200 |
| commit | 0de89e6bc6a467b2cc4261ae65464f40119cc0ff (patch) | |
| tree | 47ca3e894444950152b3ba0cf587f713d5aa7eaa /backend/templates | |
| parent | 270f592fc65cd5553ccf7c0dc81431c3efdf67ab (diff) | |
feat(frontend): use htmx to dynamically navigate between pages
Diffstat (limited to 'backend/templates')
| -rw-r--r-- | backend/templates/base.html | 12 | ||||
| -rw-r--r-- | backend/templates/components.html (renamed from backend/templates/logs_display.html) | 0 | ||||
| -rw-r--r-- | backend/templates/home.html | 2 | ||||
| -rw-r--r-- | backend/templates/home_log.html | 6 | ||||
| -rw-r--r-- | backend/templates/log.html | 2 | ||||
| -rw-r--r-- | backend/templates/simple.html | 6 |
6 files changed, 19 insertions, 9 deletions
diff --git a/backend/templates/base.html b/backend/templates/base.html index 68d3f8d..fec24ef 100644 --- a/backend/templates/base.html +++ b/backend/templates/base.html @@ -28,14 +28,14 @@ <header> <img src="{{ static .Logo.Header }}" alt="Logo"> <nav> - {{ range .Links }}<a href="{{ .URL }}">{{ .Name }}</a>{{end}} + {{ range .Links }} + <a href="{{ .URL }}"> + {{ .Name }} + </a> + {{end}} </nav> </header> -{{ if .Article }} -<main>{{ template "body" . }}</main> -{{ else }} -<article>{{ template "body" . }}</article> -{{ end }} +{{ template "body" . }} <footer> <p>© 2025 - Anhgelus Morthuuzh</p> <p>« {{ .Quote }} »</p> diff --git a/backend/templates/logs_display.html b/backend/templates/components.html index adafacf..adafacf 100644 --- a/backend/templates/logs_display.html +++ b/backend/templates/components.html diff --git a/backend/templates/home.html b/backend/templates/home.html index 1a6b158..de9d2af 100644 --- a/backend/templates/home.html +++ b/backend/templates/home.html @@ -1,4 +1,5 @@ {{define "body"}} +<main id="content"> <div class="introduction"> <h1>logs</h1> <p> @@ -6,4 +7,5 @@ </p> </div> {{ template "logs_display" . }} +</main> {{end}} diff --git a/backend/templates/home_log.html b/backend/templates/home_log.html index 2301ffd..c57272c 100644 --- a/backend/templates/home_log.html +++ b/backend/templates/home_log.html @@ -1 +1,5 @@ -{{define "body"}}{{ template "logs_display" . }}{{end}} +{{define "body"}} +<main id="content"> +{{ template "logs_display" . }} +</main> +{{end}} diff --git a/backend/templates/log.html b/backend/templates/log.html index 57948d4..789bdae 100644 --- a/backend/templates/log.html +++ b/backend/templates/log.html @@ -1,5 +1,5 @@ {{define "body"}} -<article> +<article id="content"> <h1>{{ .LogTitle }}</h1> <p> {{ .Description }} diff --git a/backend/templates/simple.html b/backend/templates/simple.html index dd00397..7b4f6d3 100644 --- a/backend/templates/simple.html +++ b/backend/templates/simple.html @@ -1 +1,5 @@ -{{ define "body" }}{{ .Content }}{{ end }} +{{ define "body" }} +<main id="content"> +{{ .Content }} +</main> +{{ end }} |
