Add favicon and make profile picture editable per page

- Favicon: emoji-based inline SVG (🍯), the old /images/favicon/favicon.ico
  reference never resolved to an actual file.
- Profile picture (the circular image at the top) is now a per-page
  "profile_image" field editable in /admin, instead of a hardcoded
  URL in the template.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
marcandClaude Sonnet 5 committed 2026-07-24 12:05:35 +02:00
1 parent ada56f846b
commit 2a45abc0eb
4 files changed
+11 -2

No files matched your search

+3
View File
@@ -24,6 +24,7 @@ DEFAULT_DATA = {
"subtitle2": "", "subtitle2": "",
"footer_label": "", "footer_label": "",
"footer_href": "", "footer_href": "",
"profile_image": "",
"sections": [], "sections": [],
} }
} }
@@ -119,6 +120,7 @@ def edit_header(page_key):
page["subtitle2"] = request.form.get("subtitle2", page.get("subtitle2", "")).strip() page["subtitle2"] = request.form.get("subtitle2", page.get("subtitle2", "")).strip()
page["footer_label"] = request.form.get("footer_label", page.get("footer_label", "")).strip() 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["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()
save_data(data) save_data(data)
return redirect(url_for("admin_dashboard")) return redirect(url_for("admin_dashboard"))
@@ -137,6 +139,7 @@ def add_page():
"subtitle2": "", "subtitle2": "",
"footer_label": "", "footer_label": "",
"footer_href": "", "footer_href": "",
"profile_image": "",
"sections": [], "sections": [],
} }
save_data(data) save_data(data)
+2
View File
@@ -5,6 +5,7 @@
"subtitle2": "Here are all my important links for you!", "subtitle2": "Here are all my important links for you!",
"footer_label": "Cinnamon Version", "footer_label": "Cinnamon Version",
"footer_href": "honey.html", "footer_href": "honey.html",
"profile_image": "https://c.tenor.com/rfib5QqA0ncAAAAd/tenor.gif",
"sections": [ "sections": [
{ {
"id": "s_important", "id": "s_important",
@@ -96,6 +97,7 @@
"subtitle2": "Some Stuff", "subtitle2": "Some Stuff",
"footer_label": "Honey Version", "footer_label": "Honey Version",
"footer_href": "index.html", "footer_href": "index.html",
"profile_image": "https://c.tenor.com/rfib5QqA0ncAAAAd/tenor.gif",
"sections": [ "sections": [
{ {
"id": "s_pangolin", "id": "s_pangolin",
+4
View File
@@ -137,6 +137,10 @@
<label class="checkbox">Footer-Link-Text</label> <label class="checkbox">Footer-Link-Text</label>
<input type="text" name="footer_label" value="{{ page.footer_label or '' }}" placeholder="z.B. Honey Version"> <input type="text" name="footer_label" value="{{ page.footer_label or '' }}" placeholder="z.B. Honey Version">
</div> </div>
<div>
<label class="checkbox">Profilbild-URL</label>
<input type="text" name="profile_image" value="{{ page.profile_image or '' }}" placeholder="https://...">
</div>
<button type="submit">Header speichern</button> <button type="submit">Header speichern</button>
</form> </form>
+2 -2
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Honey | Links</title> <title>Honey | Links</title>
<link rel="icon" type="image/x-icon" href="/images/favicon/favicon.ico"> <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🍯</text></svg>">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet"/> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet"/>
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head> </head>
@@ -22,7 +22,7 @@
</div> </div>
<!-- Content on top --> <!-- Content on top -->
<img src="https://c.tenor.com/rfib5QqA0ncAAAAd/tenor.gif" alt="Profile Picture" class="profile-pic" /> {% if page.profile_image %}<img src="{{ page.profile_image }}" alt="Profile Picture" class="profile-pic" />{% endif %}
<h1 class="fade-in">{{ page.title }}</h1> <h1 class="fade-in">{{ page.title }}</h1>
{% if page.subtitle %}<p class="bio fade-in">{{ page.subtitle }}</p>{% endif %} {% if page.subtitle %}<p class="bio fade-in">{{ page.subtitle }}</p>{% endif %}
{% if page.subtitle2 %}<p class="bio2 fade-in">{{ page.subtitle2 }}</p>{% endif %} {% if page.subtitle2 %}<p class="bio2 fade-in">{{ page.subtitle2 }}</p>{% endif %}