From 2a45abc0eb098dfc974dfd5cbdd0fa10d4fce1e8 Mon Sep 17 00:00:00 2001 From: marc Date: Fri, 24 Jul 2026 12:05:35 +0200 Subject: [PATCH] Add favicon and make profile picture editable per page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- app.py | 3 +++ data/links.json | 2 ++ templates/admin.html | 4 ++++ templates/page.html | 4 ++-- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index e01ae86..79b54dc 100644 --- a/app.py +++ b/app.py @@ -24,6 +24,7 @@ DEFAULT_DATA = { "subtitle2": "", "footer_label": "", "footer_href": "", + "profile_image": "", "sections": [], } } @@ -119,6 +120,7 @@ def edit_header(page_key): 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_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) return redirect(url_for("admin_dashboard")) @@ -137,6 +139,7 @@ def add_page(): "subtitle2": "", "footer_label": "", "footer_href": "", + "profile_image": "", "sections": [], } save_data(data) diff --git a/data/links.json b/data/links.json index 8c1bd96..ab1d8a0 100644 --- a/data/links.json +++ b/data/links.json @@ -5,6 +5,7 @@ "subtitle2": "Here are all my important links for you!", "footer_label": "Cinnamon Version", "footer_href": "honey.html", + "profile_image": "https://c.tenor.com/rfib5QqA0ncAAAAd/tenor.gif", "sections": [ { "id": "s_important", @@ -96,6 +97,7 @@ "subtitle2": "Some Stuff", "footer_label": "Honey Version", "footer_href": "index.html", + "profile_image": "https://c.tenor.com/rfib5QqA0ncAAAAd/tenor.gif", "sections": [ { "id": "s_pangolin", diff --git a/templates/admin.html b/templates/admin.html index a8efbb9..b952265 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -137,6 +137,10 @@ +
+ + +
diff --git a/templates/page.html b/templates/page.html index 4988439..5513ef8 100644 --- a/templates/page.html +++ b/templates/page.html @@ -4,7 +4,7 @@ Honey | Links - + @@ -22,7 +22,7 @@ - Profile Picture + {% if page.profile_image %}Profile Picture{% endif %}

{{ page.title }}

{% if page.subtitle %}

{{ page.subtitle }}

{% endif %} {% if page.subtitle2 %}

{{ page.subtitle2 }}

{% endif %}