This commit is contained in:
cube
2026-05-19 21:29:44 +01:00
parent 062216e4c7
commit c184a8d0ff
2 changed files with 32 additions and 2 deletions

View File

@@ -56,8 +56,25 @@ def create_app():
if os.path.isfile(os.path.join(app.config["STATIC_FOLDER"], "favicon.ico")):
return True
return False
def get_pins_public():
db = get_db()
pins = db.execute("SELECT * FROM member WHERE homepage=(?) AND public=(?) ORDER BY member_name",(1, 1)).fetchall()
return pins
def get_pins_all():
db = get_db()
pins = db.execute("SELECT * FROM member WHERE homepage=(?) ORDER BY member_name",(1,)).fetchall()
return pins
return dict(get_themes=get_themes, server_time=w_server_time, get_datetime_str=w_get_datetime_str, get_member=get_member, remove_html=remove_html, get_pages=get_pages, get_system_name=get_system_name, get_pages_name=get_pages_name, check_favicon=check_favicon)
return dict(get_themes=get_themes,
server_time=w_server_time,
get_datetime_str=w_get_datetime_str,
get_member=get_member,
remove_html=remove_html,
get_pages=get_pages,
get_system_name=get_system_name,
get_pages_name=get_pages_name,
check_favicon=check_favicon,
get_pins_public=get_pins_public,
get_pins_all=get_pins_all)
return app

View File

@@ -37,6 +37,19 @@
<div class="navitem">> <a href="{{ url_for('manage.admin') }}">Site Administration</a></div>
{% endif %}
{% if g.user %}
{% set pins = get_pins_all() %}
{% else %}
{% set pins = get_pins_public() %}
{% endif %}
{% if pins %}
<div class="heading">Pinned</div>
{% for pin in pins %}
<div class="navitem">> <a href="{{ url_for('home.page', mid=pin[0]) }}">{{pin[3]|safe}}</a></div>
{% endfor %}
{% endif %}
{% set pages = get_pages() %}
{% if pages %}
<div class="heading">{{ get_pages_name() }}</div>