From b53556871f8308423debb577d23f51d628fbe3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lera=20Elvo=C3=A9?= Date: Sat, 25 Apr 2026 21:36:21 +0300 Subject: [PATCH] add more icons --- app/templates/common/icons.html | 12 ++++++++++++ app/templates/common/macros.html | 4 ++-- app/templates/threads/thread.html | 3 ++- app/templates/topics/topic.html | 10 +++++++++- app/templates/topics/topics.html | 5 ++++- 5 files changed, 29 insertions(+), 5 deletions(-) diff --git a/app/templates/common/icons.html b/app/templates/common/icons.html index 52ef0a8..67cbc66 100644 --- a/app/templates/common/icons.html +++ b/app/templates/common/icons.html @@ -9,3 +9,15 @@ {%- macro icn_error(width=48) -%} {%- endmacro -%} + +{%- macro icn_bookmark(width=16) -%} + +{%- endmacro -%} + +{%- macro icn_locked(width=16) -%} +Locked +{%- endmacro -%} + +{%- macro icn_stickied(width=16) -%} +Stickied +{%- endmacro -%} diff --git a/app/templates/common/macros.html b/app/templates/common/macros.html index c63bed9..5415d8e 100644 --- a/app/templates/common/macros.html +++ b/app/templates/common/macros.html @@ -1,4 +1,4 @@ -{%- from 'common/icons.html' import icn_info, icn_warn, icn_error -%} +{%- from 'common/icons.html' import icn_info, icn_warn, icn_error, icn_bookmark -%} {% macro timestamp(unix_ts) -%} {{ unix_ts | ts_datetime('%Y-%m-%d %H:%M')}} ST @@ -154,7 +154,7 @@ {%- if can_delete -%} Delete {%- endif -%} - + {%- endif -%} diff --git a/app/templates/threads/thread.html b/app/templates/threads/thread.html index a6c4f3e..8d67999 100644 --- a/app/templates/threads/thread.html +++ b/app/templates/threads/thread.html @@ -1,4 +1,5 @@ {%- from 'common/macros.html' import subheader, timestamp, pager, babycode_editor_component -%} +{%- from 'common/icons.html' import icn_bookmark -%} {%- from 'common/macros.html' import full_post with context -%} {%- extends 'base.html' -%} {%- block title -%}{{thread.title}}{%- endblock -%} @@ -24,7 +25,7 @@ Edit {%- endif -%} - + {%- endif -%} Subscribe via RSS diff --git a/app/templates/topics/topic.html b/app/templates/topics/topic.html index 11e56ec..226d53f 100644 --- a/app/templates/topics/topic.html +++ b/app/templates/topics/topic.html @@ -1,4 +1,5 @@ {% from 'common/macros.html' import timestamp, subheader, pager %} +{% from 'common/icons.html' import icn_locked, icn_stickied %} {%- extends 'base.html' -%} {%- block title -%}browsing topic {{topic.name}}{%- endblock -%} {%- block content -%} @@ -48,7 +49,14 @@ {%- for thread in threads -%}
- {{thread.title}} + {{thread.title}} + + {%- if thread.is_locked -%} + {{icn_locked(24)}} + {%- endif -%} + {%- if thread.is_stickied -%} + {{icn_stickied(24)}} + {%- endif -%}
    {%- if thread.posts_count / 10 > 1 -%} {{pager(0, (((thread.posts_count / 10) | round(0, 'ceil') )| int), 'flex-last', url=url_for('threads.thread_by_id', thread_id=thread.id))}} diff --git a/app/templates/topics/topics.html b/app/templates/topics/topics.html index 5816dc0..59389db 100644 --- a/app/templates/topics/topics.html +++ b/app/templates/topics/topics.html @@ -1,5 +1,5 @@ {% from 'common/macros.html' import timestamp, subheader %} -{% from 'common/icons.html' import icn_info, icn_warn, icn_error %} +{% from 'common/icons.html' import icn_locked %} {%- extends 'base.html' -%} {%- block content -%} {%- call() subheader('All topics') -%} @@ -15,6 +15,9 @@
    {{topic.name}} + {%- if topic.is_locked -%} + {{icn_locked(24)}} + {%- endif -%}
    {{topic.description}}