add motd editor and motd display

This commit is contained in:
2026-05-27 02:02:55 +03:00
parent e74b9403e9
commit 303750a281
8 changed files with 96 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
{% from 'common/macros.html' import timestamp, subheader, pager %}
{% from 'common/macros.html' import timestamp, subheader, pager, motd %}
{% from 'common/icons.html' import icn_locked, icn_stickied %}
{%- extends 'base.html' -%}
{%- block title -%}browsing topic {{topic.name}}{%- endblock -%}
@@ -46,6 +46,7 @@
{%- if threads | length == 0 -%}
<div class="plank"><p>There are no threads in this topic yet.{%- if is_logged_in() and get_active_user().can_post_to_thread_or_topic(topic) %} Be the first to start a discussion!{%- endif -%}</p></div>
{%- endif -%}
{{ motd(get_motds()) }}
{%- for thread in threads -%}
<div class="topic-info plank">
<div class="title-container">

View File

@@ -1,4 +1,4 @@
{% from 'common/macros.html' import timestamp, subheader %}
{% from 'common/macros.html' import timestamp, subheader, motd %}
{% from 'common/icons.html' import icn_locked %}
{%- extends 'base.html' -%}
{%- block content -%}
@@ -7,10 +7,11 @@
<fieldset class="plank even no-shadow minimal thread-actions">
<legend>Moderation actions</legend>
<a href="{{url_for('mod.new_topic')}}" class="linkbutton">New topic</a>
<a href="{{url_for('mod.sort_topics')}}" class="linkbutton">Sort topics</a>
<a href="{{url_for('mod.index', _anchor='sort-topics')}}" class="linkbutton">Sort topics</a>
</fieldset>
{%- endif -%}
{%- endcall -%}
{{ motd(get_motds()) }}
{%- for topic in topics -%}
<div class="topic-info plank">
<div class="title-container">