MarseyWorld/files/templates/userpage/header.html

44 lines
2.1 KiB
HTML
Raw Normal View History

{% set path = request.path.replace("/@" + u.username, '') %}
<div class="row no-gutters">
<div class="col">
<div class="flex-row box-shadow-bottom d-flex justify-content-center justify-content-md-between align-items-center">
<ul class="nav settings-nav" id="content">
2023-01-22 23:38:00 +00:00
<li class="nav-item mr-1">
2023-10-13 12:37:13 +00:00
<a class="nav-link{% if path == '' or path.startswith('/wall/comment/') %} active{% endif %}" href="/@{{u.username}}">Wall</a>
</li>
<li class="nav-item">
<a class="nav-link{% if path == '/posts' %} active{% endif %}" href="/@{{u.username}}/posts">Posts <span class="count">({{u.real_post_count(v)}})</span></a>
</li>
<li class="nav-item">
<a class="nav-link{% if path == '/comments' %} active{% endif %}" href="/@{{u.username}}/comments">Comments <span class="count">({{u.real_comment_count(v)}})</span></a>
</li>
{% if u.id == v.id %}
<li class="nav-item">
<a class="nav-link{% if path == '/saved/posts' %} active{% endif %}" href="/@{{u.username}}/saved/posts">Saved Posts <span class="count">({{u.saved_count}})</span></a>
</li>
<li class="nav-item">
<a class="nav-link{% if path == '/saved/comments' %} active{% endif %}" href="/@{{u.username}}/saved/comments">Saved Comments <span class="count">({{u.saved_comment_count}})</span></a>
</li>
<li class="nav-item">
<a class="nav-link{% if path == '/subscribed/posts' %} active{% endif %}" href="/@{{u.username}}/subscribed/posts">Subscribed <span class="count">({{u.subscribed_count}})</span></a>
</li>
{% endif %}
</ul>
</div>
</div>
</div>
{% if u.is_visible_to(v) and "/saved/" not in request.path and "/subscribed/" not in request.path and not path == '' and '/wall/comment/' not in path %}
<div class="d-flex justify-content-between align-items-center" style="padding-top:10px">
<div class="d-flex align-items-center">
2023-09-05 14:32:36 +00:00
{%- import 'util/macros.html' as macros with context -%}
{{- macros.time_filter_buttons() -}}
{% if "/posts" in request.path %}
{{- macros.sorting_buttons(POST_SORTS) -}}
{% else %}
{{- macros.sorting_buttons(COMMENT_SORTS) -}}
{% endif %}
</div>
</div>
{% endif %}