aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorWilliam Hergès <william@herges.fr>2025-10-03 19:15:58 +0200
committerWilliam Hergès <william@herges.fr>2025-10-03 19:15:58 +0200
commitcb19ff62a7ddbe130f2b3723ba16599a66e3df67 (patch)
treeceab92c4d695e19e128ff47f15b8d594ad8b6e8f /backend
parent24ec3f328981a7dad54d3aae48e8feae932aed87 (diff)
feat(frontend): update quote after htmx reload
Diffstat (limited to 'backend')
-rw-r--r--backend/data.go1
-rw-r--r--backend/templates/base.html2
2 files changed, 2 insertions, 1 deletions
diff --git a/backend/data.go b/backend/data.go
index fe5aa96..741a5c4 100644
--- a/backend/data.go
+++ b/backend/data.go
@@ -87,6 +87,7 @@ func (d *data) handleGeneric(w http.ResponseWriter, r *http.Request, name string
if r.Context().Value(isUpdateKey).(bool) {
exec = "body"
w.Header().Set("Updated-Title", d.Title())
+ w.Header().Set("Updated-Quote", d.Quote)
}
if custom == nil {
err = t.ExecuteTemplate(w, exec, d)
diff --git a/backend/templates/base.html b/backend/templates/base.html
index fec24ef..a79f4c1 100644
--- a/backend/templates/base.html
+++ b/backend/templates/base.html
@@ -38,7 +38,7 @@
{{ template "body" . }}
<footer>
<p>&copy; 2025 - Anhgelus Morthuuzh</p>
- <p>«&thinsp;{{ .Quote }}&thinsp;»</p>
+ <p id="quote">«&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>
</footer>
<script src="{{ assets "index.js" }}" defer></script>