2021-12-19 13:01:28 +00:00
{% extends "CHRISTMAS/default.html" %}
2021-12-14 22:48:37 +00:00
{% block fixedMobileBarJS %}{% endblock %}
{% block pagetype %}{% endblock %}
{% block subHeader %}
< div class = "relative max-w-screen-2xl mx-auto px-4 py-4 grid grid-cols-12 rounded-t" >
2021-12-19 22:10:11 +00:00
< div class = "absolute top-0 left-0 w-full h-full bg-gradient-to-t from-gray-300 to-gray-200 dark:bg-none dark:bg-gray-800 rounded-t sub-header-shadow dark:border-b dark:border-gray-700" > < / div >
2021-12-14 22:48:37 +00:00
< div class = "relative col-span-full flex items-center" >
< div >
< h1 class = "font-bold text-xl font-heading leading-normal mb-0" >
Inbox
< / h1 >
< ul class = "text-xs flex items-center space-x-3 leading-normal mb-0" >
< li >
2021-12-20 22:46:46 +00:00
< a class = "{{ 'font-bold text-primary' if not '=true' in request.full_path else 'text-gray-500' }}" href = "/notifications" >
2021-12-14 22:48:37 +00:00
All
< / a >
< / li >
< li >
2021-12-20 22:46:46 +00:00
< a class = "{{ 'font-bold text-primary' if '/notifications?posts=true' in request.full_path else 'text-gray-500' }}" href = "/notifications?posts=true" >
2021-12-14 22:48:37 +00:00
Posts
{% if v.post_notifications_count %}
< span class = "text-gray-600" > ({{v.post_notifications_count}})< / span >
{% endif %}
< / a >
< / li >
< li >
2021-12-20 22:46:46 +00:00
< a class = "{{ 'font-bold text-primary' if '/notifications?messages=true' in request.full_path else 'text-gray-500' }}" href = "/notifications?messages=true" >
2021-12-14 22:48:37 +00:00
Messages
< / a >
< / li >
{% if v.admin_level > 1 %}
< li >
2021-12-20 22:46:46 +00:00
< a class = "{{ 'font-bold text-primary' if '/notifications?modmail=true' in request.full_path else 'text-gray-500' }}" href = "/notifications?modmail=true" >
2021-12-14 22:48:37 +00:00
Mod Mail
< / a >
< / li >
{% endif %}
< / ul >
< / div >
< div class = "ml-auto" >
2021-12-24 19:06:15 +00:00
< button class = "btn btn-gray" onclick = "post_toast('/clear')" >
2021-12-14 22:48:37 +00:00
< 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 %}
< div class = "col-span-full" >
< div class = "col-span-full px-2.5 md:px-0" >
{% with comments=notifications %}
2021-12-19 13:01:28 +00:00
{% include "CHRISTMAS/comments.html" %}
2021-12-14 22:48:37 +00:00
{% endwith %}
< / div >
{% if not notifications %}
< 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 = "mt-3 btn btn-gray" >
View entire inbox
< / a >
< / div >
{% endif %}
< / div >
{% if notifications %}
< div class = "col-span-full" >
< ul class = "flex flex-wrap items-center mb-4" >
{% if page>1 %}
< li >
{% if "?page=" in request.full_path %}
{% set path = request.full_path.split("?page=")[0] %}
{% elif "& page=" in request.full_path %}
{% set path = request.full_path.split("& page=")[0] %}
{% else %}
{% set path = request.full_path %}
{% endif %}
{% if request.full_path == "/notifications" %}
2021-12-22 04:19:56 +00:00
< small > < a class = "block px-2 py-1 text-sm font-bold text-primary bg-gray-900" href = "{{path}}?page={{page-1}}" > Back< / a > < / small >
2021-12-14 22:48:37 +00:00
{% else %}
2021-12-22 04:19:56 +00:00
< small > < a class = "block px-2 py-1 text-sm font-bold text-primary bg-gray-900" href = "{{path}}&page={{page-1}}" > Back< / a > < / small >
2021-12-14 22:48:37 +00:00
{% endif %}
< / li >
{% else %}
2021-12-22 04:19:56 +00:00
< li > < button disabled class = "block px-2 py-1 text-sm font-bold text-gray-700 bg-gray-800 cursor-not-allowed" > Back< / button > < / li >
2021-12-14 22:48:37 +00:00
{% endif %}
{% if next_exists %}
< li >
{% if "?page=" in request.full_path %}
{% set path = request.full_path.split("?page=")[0] %}
{% elif "& page=" in request.full_path %}
{% set path = request.full_path.split("& page=")[0] %}
{% else %}
{% set path = request.full_path %}
{% endif %}
{% if request.full_path == "/notifications" %}
2021-12-20 22:46:46 +00:00
< small > < a class = "block px-2 py-1 text-sm font-bold text-primary bg-gray-900" href = "{{path}}?page={{page+1}}" > Next< / a > < / small >
2021-12-14 22:48:37 +00:00
{% else %}
2021-12-20 22:46:46 +00:00
< small > < a class = "block px-2 py-1 text-sm font-bold text-primary bg-gray-900" href = "{{path}}&page={{page+1}}" > Next< / a > < / small >
2021-12-14 22:48:37 +00:00
{% endif %}
< / li >
{% else %}
2021-12-22 04:19:27 +00:00
< li > < button disabled class = "block px-2 py-1 text-sm font-bold text-gray-700 bg-gray-800 cursor-not-allowed" > Next< / button > < / li >
2021-12-14 22:48:37 +00:00
{% endif %}
< / ul >
< / div >
{% endif %}
{% endblock %}
{% block GIFpicker %}
{% endblock %}