Compare commits

...

2 Commits

Author SHA1 Message Date
cube
d76a02ed26 fix #53 2026-04-03 16:22:51 +01:00
cube
ab734d7ef1 no need to use br tags on blog posts 2026-04-03 01:34:35 +01:00
3 changed files with 12 additions and 4 deletions

View File

@@ -69,8 +69,13 @@ def page(mid):
all_icons = db.execute("SELECT icon_location FROM icons WHERE member_id=(?)",(mid,)).fetchall()
blinkies = db.execute("SELECT blinkie_location FROM blinkies WHERE member_id=(?)",(mid,)).fetchall()
stamps = db.execute("SELECT stamp_location FROM stamps WHERE member_id=(?)",(mid,)).fetchall()
blog_public = db.execute("SELECT * FROM blog WHERE member_id=(?) AND public=(?)",(mid,1)).fetchall()
return render_template('page.html', member=member, blog=blog, icon=icon, all_icons=all_icons, blinkies=blinkies, stamps=stamps)
blog_public_show = False
if len(blog_public) > 0:
blog_public_show = True
return render_template('page.html', member=member, blog=blog, icon=icon, all_icons=all_icons, blinkies=blinkies, stamps=stamps, blog_public_show=blog_public_show)
@bp.route("/groups")
def groups():

View File

@@ -23,7 +23,7 @@
<div class="title">{{post[3]|safe}}</div>
<div class="timestamp">{{ get_datetime_str(post[2]) }} - <a href="{{ url_for('home.page', mid=post[1]) }}">{{op[3]}}</a> {% if g.user %}{% if op[9]==0 %}(Private){% else %}(Public)</b>{% endif %}{% endif %}</div>
<div class="content">
{{post[4]|safe}}
{{post[4].replace('\n', '<br>')|safe}}
</div>
<br class="clear" />
{% if g.user %}

View File

@@ -28,7 +28,10 @@
<br class="clear" />
{% if blog|length > 0 %}
<div class="heading big">{{member[3]}}'s blog</div>
{% if not g.user and not blog_public_show %}
{% else %}
<div class="heading big">{{member[3]}}'s blog</div>
{% endif %}
<div id="blog">
{% for post in blog %}
{% if not g.user and post[5]==0 %}
@@ -37,7 +40,7 @@
<div class="title">{{post[3]|safe}}</div>
<div class="timestamp">{{post[2]}} {% if g.user %}{% if post[5]==0 %}(Private){% else %}(Public){% endif %}{% endif %}</div>
<div class="content">
{{post[4]|safe}}
{{post[4].replace('\n', '<br>')|safe}}
</div>
{% if g.user %}<a href="{{url_for('blog.toggle',pid=post[0], location=member[0])}}">Toggle privacy</a> | <a href="{{url_for('blog.edit',pid=post[0],location=member[0])}}">Edit Post</a> | <a href="{{url_for('blog.delete', pid=post[0], location=member[0])}}" class="danger">Delete post</a>{% endif %}
</div>