master
kek7198 2021-11-24 10:53:40 -06:00
parent 782074d3ea
commit b92db319b1
1 changed files with 67 additions and 63 deletions

View File

@ -4,77 +4,80 @@
{% block pagetype %}{% endblock %}
{% block PseudoSubmitForm %}{% endblock %}
{% block navbar %}
<div class="font-weight-bold py-3"></div>
{% endblock %}
{% block content %}
<div class="row border-bottom bg-white w-200 pr-0" style="overflow: visible;">
<div class="col p-0 w-100">
<ul class="nav settings-nav" style="padding:0 30px;">
<li class="nav-item">
<a class="nav-link py-3{% if not '=true' in request.full_path %} active{% endif %}" href="/notifications">
{% block subHeader %}
<div class="relative max-w-screen-2xl mx-auto px-4 py-4 grid grid-cols-12 rounded-t-md">
<div class="absolute top-0 left-0 w-full h-full bg-gradient-to-t from-gray-800 to-gray-700 rounded-t-md sub-header-shadow"></div>
<div class="relative col-span-full flex items-center">
<div>
<h1 class="font-bold text-xl font-heading leading-normal">
Inbox
</h1>
<ul class="mt-1 text-gray-400 text-sm flex items-center space-x-3 leading-normal">
<li>
<a class="{% if not '=true' in request.full_path %}font-bold text-pink-600{% endif %}" href="/notifications">
All
</a>
</li>
<li class="nav-item">
<a class="nav-link py-3{% if '/notifications?posts=true' in request.full_path %} active{% endif %}" href="/notifications?posts=true">
Posts{% if v.post_notifications_count %} <span class="text-primary font-weight-bold">({{v.post_notifications_count}})</span>{% endif %}
<li>
<a class="{% if '/notifications?posts=true' in request.full_path %}font-bold text-pink-600{% endif %}" href="/notifications?posts=true">
Posts
{% if v.post_notifications_count %}
<span class="text-gray-600">({{v.post_notifications_count}})</span>
{% endif %}
</a>
</li>
<li class="nav-item">
<a class="nav-link py-3{% if '/notifications?messages=true' in request.full_path %} active{% endif %}" href="/notifications?messages=true">
<li>
<a class="{% if '/notifications?messages=true' in request.full_path %}font-bold text-pink-600{% endif %}" href="/notifications?messages=true">
Messages
</a>
</li>
{% if v.admin_level > 1 %}
<li class="nav-item">
<a class="nav-link py-3{% if '/notifications?modmail=true' in request.full_path %} active{% endif %}" href="/notifications?modmail=true">
Modmail
<li>
<a class="{% if '/notifications?modmail=true' in request.full_path %}font-bold text-pink-600{% endif %}" href="/notifications?modmail=true">
Mod Mail
</a>
</li>
{% endif %}
</ul>
</div>
<div class="ml-auto">
<button class="block px-4 py-2 bg-gradient-to-t from-gray-800 to-gray-700 focus:from-gray-700 focus:to-gray-800 border border-gray-900 rounded-md text-shadow shadow-inset-t-white-10 text-sm font-bold text-gray-300 focus:text-gray-500 focus:shadow-inner focus:outline-none" onclick="post_toast('/clear')">
<i class="fas fa-check-double text-gray-500 fa-sm fa-fw mr-1"></i>
Mark all as read
</button>
</div>
</div>
</div>
{% endblock %}
{% block content %}
<a class="btn btn-primary mt-3 ml-3" href="javascript:void(0)" onclick="post_toast('/clear')">Clear all notifications</a>
<div class="notifs p-3 p-md-0">
<div class="col-span-full">
{% with comments=notifications %}
{% include "comments.html" %}
{% endwith %}
{% if not notifications %}
<div class="text-center py-7 py-md-8">
<span class="fa-stack fa-2x text-muted mb-4">
<i class="fas fa-square text-gray-400 fa-stack-2x"></i>
<i class="fas text-gray-600 fa-envelope fa-stack-1x text-lg"></i>
</span>
<div class="h5">No unread messages</div>
<div class="text-small text-muted mb-3">When someone comments or replies, it will show up here.</div>
<a href="/notifications" class="btn btn-primary ">View entire inbox</a>
<div class="flex flex-col items-center justify-center py-24 md:py-48">
<img loading="lazy" src="https://c.tenor.com/NhDy-AkelhQAAAAM/marsey-drama.gif" class="w-20 h-20 mb-4 rounded-md object-cover">
<h2 class="text-xl font-bold leading-normal font-heading">No unread messages</h2>
<p class="text-gray-500 text-sm">
When someone comments or replies, it will show up here.
</p>
<a href="/notifications" class="block mt-3 px-4 py-2 bg-gradient-to-t from-pink-700 to-pink-600 focus:from-pink-600 focus:to-pink-700 border border-gray-900 rounded-md text-shadow shadow-inset-t-white-10 text-sm font-bold text-gray-300 focus:text-gray-500 focus:shadow-inner focus:outline-none">
View entire inbox
</a>
</div>
{% endif %}
</div>
{% endblock %}
{% block pagenav %}
{% if notifications %}
<nav aria-label="Page navigation">
<ul class="pagination pagination-sm mb-0">
<div class="col-span-full">
<ul class="flex flex-wrap items-center mb-4">
{% if page>1 %}
<li class="page-item">
<li>
{% if "?page=" in request.full_path %}
{% set path = request.full_path.split("?page=")[0] %}
{% elif "&page=" in request.full_path %}
@ -83,17 +86,17 @@
{% set path = request.full_path %}
{% endif %}
{% if request.full_path == "/notifications" %}
<small><a class="page-link" href="{{path}}?page={{page-1}}">Previous</a></small>
<small><a class="block px-2 py-1 text-sm font-bold text-pink-600 bg-gray-900" href="{{path}}?page={{page-1}}">Previous</a></small>
{% else %}
<small><a class="page-link" href="{{path}}&page={{page-1}}">Previous</a></small>
<small><a class="block px-2 py-1 text-sm font-bold text-pink-600 bg-gray-900" href="{{path}}&page={{page-1}}">Previous</a></small>
{% endif %}
</li>
{% else %}
<li class="page-item disabled"><span class="page-link">Prev</span></li>
<li><span class="block px-2 py-1 text-sm font-bold text-gray-700 bg-gray-800 disabled">Prev</span></li>
{% endif %}
{% if next_exists %}
<li class="page-item">
<li>
{% if "?page=" in request.full_path %}
{% set path = request.full_path.split("?page=")[0] %}
{% elif "&page=" in request.full_path %}
@ -102,17 +105,18 @@
{% set path = request.full_path %}
{% endif %}
{% if request.full_path == "/notifications" %}
<small><a class="page-link" href="{{path}}?page={{page+1}}">Next</a></small>
<small><a class="block px-2 py-1 text-sm font-bold text-pink-600 bg-gray-900" href="{{path}}?page={{page+1}}">Next</a></small>
{% else %}
<small><a class="page-link" href="{{path}}&page={{page+1}}">Next</a></small>
<small><a class="block px-2 py-1 text-sm font-bold text-pink-600 bg-gray-900" href="{{path}}&page={{page+1}}">Next</a></small>
{% endif %}
</li>
{% else %}
<li class="page-item disabled"><span class="page-link">Next</span></li>
<li><span class="block px-2 py-1 text-sm font-bold text-gray-700 bg-gray-800 disabled">Next</span></li>
{% endif %}
</ul>
</nav>
</div>
{% endif %}
{% endblock %}
{% block GIFpicker %}