32 lines
1.3 KiB
HTML
32 lines
1.3 KiB
HTML
<nav id="topnav">
|
|
<span>
|
|
<a class="site-title" href="{{url_for('topics.all_topics')}}">{{config.SITE_NAME}}</a>
|
|
</span>
|
|
<span>
|
|
{% if not is_logged_in() %}
|
|
{% if not config.DISABLE_SIGNUP %}
|
|
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 %}
|
|
Welcome, guest. Please <a href="{{url_for('users.log_in')}}">log in</a>
|
|
{% endif %}
|
|
{% else %}
|
|
{% with user = get_active_user() %}
|
|
Welcome, <a href="{{ url_for("users.page", username = user.username) }}">{{user.username}}</a>
|
|
<ul>
|
|
<li><a href="{{ url_for("users.settings", username = user.username) }}">Settings</a></li>
|
|
<li><a href="{{ url_for("users.inbox", username = user.username) }}">Inbox</a></li>
|
|
{% if config.DISABLE_SIGNUP and user.can_invite() %}
|
|
<li><a href="{{ url_for('users.invite_links', username=user.username )}}">Invite to {{ config.SITE_NAME }}</a></li>
|
|
{% endif %}
|
|
{% if not user.is_guest() %}
|
|
<li><a href="{{ url_for('users.bookmarks', username=user.username) }}">Bookmarks</a></li>
|
|
{% endif %}
|
|
{% if user.is_mod() %}
|
|
<li><a href="{{ url_for("mod.panel") }}">Moderation</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
{% endwith %}
|
|
{% endif %}
|
|
</span>
|
|
</nav>
|