98 lines
4.6 KiB
HTML
98 lines
4.6 KiB
HTML
{% extends "userpage_submissions.html" %}
|
||
{%- import 'component/sorting_time.html' as sorting_time -%}
|
||
|
||
{% block content %}
|
||
|
||
<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">
|
||
<li class="nav-item">
|
||
<a class="nav-link {% if not 'saved' in request.path %}active{% endif %}" style="font-size: .9rem !important; padding: .75rem .4rem !important" href="/@{{u.username}}">Comments <span class="count">({{u.comment_count}})</span></a>
|
||
</li>
|
||
<li class="nav-item">
|
||
<a class="nav-link" style="font-size: .9rem !important; padding: .75rem .4rem !important" href="/@{{u.username}}/posts">Posts <span class="count">({{u.post_count}})</span></a>
|
||
</li>
|
||
{% if u.id == v.id %}
|
||
<li class="nav-item">
|
||
<a class="nav-link {% if 'saved' in request.path %}active{% endif %}" style="font-size: .9rem !important; padding: .75rem .4rem !important" 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" style="font-size: .9rem !important; padding: .75rem .4rem !important" href="/@{{u.username}}/saved/posts">Saved Posts <span class="count">({{u.saved_count}})</span></a>
|
||
</li>
|
||
{% endif %}
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
{% if not "saved" in request.full_path %}
|
||
<div class="d-flex justify-content-between align-items-center" style="padding-top:10px">
|
||
|
||
<div class="d-flex align-items-center">
|
||
<div class="text-small font-weight-bold mr-2"></div>
|
||
<div class="dropdown dropdown-actions">
|
||
<button class="btn btn-secondary dropdown-toggle" role="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||
{% if t=="hour" %}<i class="fas fa-clock mr-1"></i>
|
||
{% elif t=="day" %}<i class="fas fa-calendar-day mr-1"></i>
|
||
{% elif t=="week" %}<i class="fas fa-calendar-week mr-1"></i>
|
||
{% elif t=="month" %}<i class="fas fa-calendar-alt mr-1"></i>
|
||
{% elif t=="year" %}<i class="fas fa-calendar mr-1"></i>
|
||
{% elif t=="all" %}<i class="fas fa-infinity mr-1"></i>
|
||
{% endif %}
|
||
{{t | capitalize}}
|
||
</button>
|
||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 31px, 0px);">
|
||
{% if t != "hour" %}<a class="dropdown-item" href="?sort={{sort}}&t=hour"><i class="fas fa-clock mr-2"></i>Hour</a>{% endif %}
|
||
{% if t != "day" %}<a class="dropdown-item" href="?sort={{sort}}&t=day"><i class="fas fa-calendar-day mr-2"></i>Day</a>{% endif %}
|
||
{% if t != "week" %}<a class="dropdown-item" href="?sort={{sort}}&t=week"><i class="fas fa-calendar-week mr-2"></i>Week</a>{% endif %}
|
||
{% if t != "month" %}<a class="dropdown-item" href="?sort={{sort}}&t=month"><i class="fas fa-calendar-alt mr-2"></i>Month</a>{% endif %}
|
||
{% if t != "year" %}<a class="dropdown-item" href="?sort={{sort}}&t=year"><i class="fas fa-calendar mr-2"></i>Year</a>{% endif %}
|
||
{% if t != "all" %}<a class="dropdown-item" href="?sort={{sort}}&t=all"><i class="fas fa-infinity mr-2"></i>All</a>{% endif %}
|
||
</div>
|
||
</div>
|
||
|
||
<div class="text-small font-weight-bold ml-3 mr-2"></div>
|
||
{{sorting_time.sort_dropdown(sort, t, SORTS_COMMENTS)}}
|
||
</div>
|
||
</div>
|
||
{% endif %}
|
||
|
||
<div class="row no-gutters {% if listing %}mt-md-3{% elif not listing %}my-md-3{% endif %}" style="margin-top: 10px;">
|
||
|
||
<div class="col">
|
||
|
||
{% if listing %}
|
||
<div class="posts p-3 p-md-0">
|
||
{% with comments=listing %}
|
||
{% include "comments.html" %}
|
||
{% endwith %}
|
||
</div>
|
||
{% else %}
|
||
<div class="text-center px-3 my-3">
|
||
<span class="fa-stack fa-2x text-muted mb-4">
|
||
<i class="fas fa-square text-gray-500 opacity-25 fa-stack-2x"></i>
|
||
<i class="fas text-gray-500 fa-scroll-old fa-stack-1x text-lg"></i>
|
||
</span>
|
||
{% if '/saved/' in request.path %}
|
||
<h2 class="h5">You haven't saved any comments yet</h2>
|
||
{% elif v and v.id == u.id %}
|
||
<h2 class="h5">You haven't made any comments yet</h2>
|
||
<p class="text-muted mb-md-5">Your commenting history will show here.</p>
|
||
{% else %}
|
||
<h2 class="h5">@{{u.username}} hasn't made any comments yet</h2>
|
||
<p class="text-muted">Their commenting history will show here.</p>
|
||
{% endif %}
|
||
</div>
|
||
|
||
{% endif %}
|
||
</div>
|
||
</div>
|
||
|
||
{% if v %}
|
||
<div id='tax' class="d-none">{% if v.patron or u.patron %}0{% else %}0.03{% endif %}</div>
|
||
<script src="{{ 'js/userpage_v.js' | asset }}"></script>
|
||
<div id="username" class="d-none">{{u.username}}</div>
|
||
{% endif %}
|
||
|
||
{% endblock %}
|