This commit is contained in:
2025-06-29 23:13:26 +03:00
parent dfb662c646
commit fb2a96e94d
17 changed files with 256 additions and 3 deletions

View File

@ -0,0 +1,10 @@
{% macro infobox(message, kind=InfoboxKind.INFO) %}
<div class="{{ "infobox " + InfoboxHTMLClass[kind] }}">
<span>
<div class="infobox-icon-container">
<img src="{{ InfoboxIcons[kind] }}">
</div>
{{ message }}
</span>
</div>
{% endmacro %}

View File

@ -0,0 +1,22 @@
<nav id="topnav">
<span>
<a class="site-title" href="{{url_for('topics.all_topics')}}">Porom</a>
</span>
<span>
{% if not is_logged_in() %}
Welcome, guest. Please <a href="{{url_for('users.sign_up')}}">sign up</a> or <a href="{{url_for('users.log_in')}}">log in</a>
{% else %}
{% with user = get_active_user() %}
Welcome, <a href="{{ url_for("users.page", username = user.username) }}">{{user.username}}</a>
&bullet;
<a href="{{ url_for("users.settings", username = user.username) }}">Settings</a>
&bullet;
<a href="{{ url_for("users.inbox", username = user.username) }}">Inbox</a>
{% if user.is_mod() %}
&bullet;
<a href="{{ url_for("users.user_list") }}">User list</a>
{% endif %}
{% endwith %}
{% endif %}
</span>
</nav>