Make favicon editable per page in /admin
Same emoji-based inline SVG favicon as before, but the emoji is now a per-page "favicon" field editable in the header form instead of hardcoded in the template. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2a45abc0eb
commit
3a49d91c2e
4 files changed
+12
-3
No files matched your search
@@ -25,6 +25,7 @@ DEFAULT_DATA = {
|
||||
"footer_label": "",
|
||||
"footer_href": "",
|
||||
"profile_image": "",
|
||||
"favicon": "🍯",
|
||||
"sections": [],
|
||||
}
|
||||
}
|
||||
@@ -121,6 +122,7 @@ def edit_header(page_key):
|
||||
page["footer_label"] = request.form.get("footer_label", page.get("footer_label", "")).strip()
|
||||
page["footer_href"] = request.form.get("footer_href", page.get("footer_href", "")).strip()
|
||||
page["profile_image"] = request.form.get("profile_image", page.get("profile_image", "")).strip()
|
||||
page["favicon"] = request.form.get("favicon", page.get("favicon", "")).strip()
|
||||
save_data(data)
|
||||
return redirect(url_for("admin_dashboard"))
|
||||
|
||||
@@ -140,6 +142,7 @@ def add_page():
|
||||
"footer_label": "",
|
||||
"footer_href": "",
|
||||
"profile_image": "",
|
||||
"favicon": "🍯",
|
||||
"sections": [],
|
||||
}
|
||||
save_data(data)
|
||||
|
||||
Reference in new issue
Block a user