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)
This commit is contained in:
@@ -48,5 +48,7 @@ def page(mid):
|
|||||||
db = get_db()
|
db = get_db()
|
||||||
member = db.execute("SELECT * FROM member WHERE id=(?)",(mid,)).fetchone()
|
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()
|
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)
|
return render_template('page.html', member=member, blog=blog, icon=icon, all_icons=all_icons)
|
||||||
@@ -3,9 +3,20 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
{% if icon %}
|
||||||
|
<img class="icon" src="{{ url_for('static', filename='icons/'+icon[0]) }}">
|
||||||
|
{% else %}
|
||||||
|
<img class="icon" src="{{ url_for('static', filename='any.jpg') }}">
|
||||||
|
{% endif %}
|
||||||
|
<div class="title">{{member[3]}}</div>
|
||||||
|
<div class="maintext">
|
||||||
|
{{member[5]}}
|
||||||
|
</div>
|
||||||
|
<br class="clear" />
|
||||||
|
|
||||||
|
{% if blog|length > 0 %}
|
||||||
<div class="heading big">{{member[3]}}'s blog</div>
|
<div class="heading big">{{member[3]}}'s blog</div>
|
||||||
<div id="blog">
|
<div id="blog">
|
||||||
|
|
||||||
{% for post in blog %}
|
{% for post in blog %}
|
||||||
<div class="post">
|
<div class="post">
|
||||||
<div class="title">{{post[3]}}</div>
|
<div class="title">{{post[3]}}</div>
|
||||||
@@ -15,7 +26,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if all_icons|length > 0 %}
|
||||||
|
<div class="heading big">{{member[3]}}'s icons</div>
|
||||||
|
{% for i in all_icons %}
|
||||||
|
<img class="icon" src="{{ url_for('static', filename='icons/'+i[0]) }}">
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user