From 620f4be9fbc49fd3d4e7eb02e19886f030e79344 Mon Sep 17 00:00:00 2001 From: cube Date: Wed, 18 Mar 2026 02:57:54 +0000 Subject: [PATCH] pages also display members icons QUICK GIVE ME CUSTOM HTML INCLUDING IMAGES IDEAS RN (it might end up being that they use external sources or we manual edit html files in production. hmm) --- myriad/home.py | 4 +++- myriad/templates/page.html | 23 +++++++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/myriad/home.py b/myriad/home.py index f67da24..aa07f9b 100644 --- a/myriad/home.py +++ b/myriad/home.py @@ -48,5 +48,7 @@ def page(mid): db = get_db() member = db.execute("SELECT * FROM member WHERE id=(?)",(mid,)).fetchone() blog = db.execute("SELECT * FROM blog WHERE member_id=(?) ORDER BY created DESC",(mid,)).fetchall() + icon = db.execute("SELECT icon_location FROM icons WHERE id=(?)",(member[6],)).fetchone() + all_icons = db.execute("SELECT icon_location FROM icons WHERE member_id=(?)",(mid,)).fetchall() - return render_template('page.html', member=member, blog=blog) \ No newline at end of file + return render_template('page.html', member=member, blog=blog, icon=icon, all_icons=all_icons) \ No newline at end of file diff --git a/myriad/templates/page.html b/myriad/templates/page.html index 3f53cdb..0c8adad 100644 --- a/myriad/templates/page.html +++ b/myriad/templates/page.html @@ -3,9 +3,20 @@ {% block content %} + {% if icon %} + + {% else %} + + {% endif %} +
{{member[3]}}
+
+ {{member[5]}} +
+
+ + {% if blog|length > 0 %}
{{member[3]}}'s blog
- {% for post in blog %}
{{post[3]}}
@@ -15,7 +26,15 @@
{% endfor %} - + {% endif %} + + {% if all_icons|length > 0 %} +
{{member[3]}}'s icons
+ {% for i in all_icons %} + + {% endfor %} + {% endif %} + {% endblock %} \ No newline at end of file