2021-12-19 13:01:28 +00:00
|
|
|
{% extends "CHRISTMAS/default.html" %}
|
2021-12-14 22:48:37 +00:00
|
|
|
|
|
|
|
{% block subHeader %}
|
|
|
|
<div class="relative max-w-screen-2xl mx-auto px-4 py-4 grid grid-cols-12 rounded-t">
|
2021-12-31 14:43:54 +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 sub-header"></div>
|
2021-12-14 22:48:37 +00:00
|
|
|
<div class="relative col-span-full flex items-center">
|
|
|
|
<div>
|
2021-12-19 03:18:55 +00:00
|
|
|
<h1 class="font-bold text-xl font-heading leading-normal mb-0">
|
2021-12-14 22:48:37 +00:00
|
|
|
Home
|
|
|
|
</h1>
|
2021-12-19 00:21:37 +00:00
|
|
|
<small class="block text-gray-700 dark:text-gray-400">
|
2021-12-14 22:48:37 +00:00
|
|
|
<span class="capitalize font-bold">{{ sort }}</span>
|
|
|
|
posts {{ 'from all time' if t=='all' else 'in the last' }}
|
|
|
|
{% if t != 'all' %}<span class="font-bold">{{ t }}{% endif %}
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
<div class="ml-auto">
|
2021-12-19 13:01:28 +00:00
|
|
|
{% include "CHRISTMAS/dropdowns/SubmissionSorts.html" %}
|
2021-12-14 22:48:37 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block desktopBanner %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2021-12-20 04:18:18 +00:00
|
|
|
<div class="col-span-full xl:col-span-9 dark:bg-gray-700 md:dark:bg-gray-800">
|
2021-12-14 22:48:37 +00:00
|
|
|
|
|
|
|
<ul class="flex flex-col sm:py-4 my-2.5 sm:my-0" id="posts">
|
2022-01-02 21:54:58 +00:00
|
|
|
{% include "CHRISTMAS/submission/SubmissionList.html" %}
|
2021-12-14 22:48:37 +00:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
{% if listing %}
|
|
|
|
<nav aria-label="Page navigation">
|
2022-01-04 04:10:18 +00:00
|
|
|
<ul class="flex flex-wrap items-center mb-0 py-4 px-2.5 md:px-0">
|
2022-01-04 04:08:23 +00:00
|
|
|
<li>
|
|
|
|
{% if page > 1 %}
|
|
|
|
<small>
|
|
|
|
<a class="block px-2 py-1 text-sm font-bold text-primary bg-gray-900" href="?sort={{sort}}&page={{page-1}}&t={{t}}{% if only %}&only={{only}}{% endif %}" tabindex="-1">
|
|
|
|
Back
|
|
|
|
</a>
|
|
|
|
</small>
|
|
|
|
{% else %}
|
|
|
|
<button disabled class="block px-2 py-1 text-sm font-bold text-gray-700 bg-gray-800 cursor-not-allowed">Back</button>
|
|
|
|
{% endif %}
|
2021-12-14 22:48:37 +00:00
|
|
|
</li>
|
2022-01-04 04:08:23 +00:00
|
|
|
<li>
|
|
|
|
{% if next_exists %}
|
|
|
|
<small>
|
|
|
|
<a class="block px-2 py-1 text-sm font-bold text-primary bg-gray-900" href="?sort={{sort}}&page={{page+1}}&t={{t}}{% if only %}&only={{only}}{% endif %}">
|
|
|
|
Next
|
|
|
|
</a>
|
|
|
|
</small>
|
|
|
|
{% else %}
|
|
|
|
<button disabled class="block px-2 py-1 text-sm font-bold text-gray-700 bg-gray-800 cursor-not-allowed">Next</button>
|
|
|
|
{% endif %}
|
2021-12-14 22:48:37 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
<!-- Sidebar -->
|
|
|
|
{% block sidebar %}
|
2021-12-19 13:01:28 +00:00
|
|
|
{% include "CHRISTMAS/sidebars/HomeSidebar.html" %}
|
2021-12-14 22:48:37 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block modals %}
|
|
|
|
{% if v %}
|
2021-12-19 13:01:28 +00:00
|
|
|
{% include "CHRISTMAS/award_modal.html" %}
|
2021-12-14 22:48:37 +00:00
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block scripts %}
|
|
|
|
|
|
|
|
{% if v %}
|
2021-12-24 23:02:34 +00:00
|
|
|
<script src="/assets/CHRISTMAS/js/award_modal.js?a=1"></script>
|
|
|
|
<script src="/assets/CHRISTMAS/js/pusher.js?a=1"></script>
|
2021-12-14 22:48:37 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2021-12-29 03:51:58 +00:00
|
|
|
<script src="/assets/CHRISTMAS/js/submission_listing.js?a=6"></script>
|
2021-12-14 22:48:37 +00:00
|
|
|
|
2021-12-17 04:44:25 +00:00
|
|
|
{% if v and not v.fp %}
|
2021-12-14 22:48:37 +00:00
|
|
|
<script>
|
|
|
|
function fp(fp) {
|
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
|
xhr.open("POST", '{{request.host_url}}fp/'+fp, true);
|
|
|
|
var form = new FormData()
|
|
|
|
form.append("formkey", formkey());
|
|
|
|
xhr.withCredentials=true;
|
|
|
|
xhr.send(form);
|
|
|
|
};
|
|
|
|
|
|
|
|
const fpPromise = new Promise((resolve, reject) => {
|
|
|
|
const script = document.createElement('script');
|
|
|
|
script.onload = resolve;
|
|
|
|
script.onerror = reject;
|
|
|
|
script.async = true;
|
|
|
|
script.src = 'https://cdn.jsdelivr.net/npm/@fingerprintjs/fingerprintjs-pro@3/dist/fp.min.js';
|
|
|
|
document.head.appendChild(script);
|
|
|
|
})
|
|
|
|
.then(() => FingerprintJS.load({token: '{{environ.get("FP")}}'}));
|
|
|
|
|
|
|
|
fpPromise
|
|
|
|
.then(fp => fp.get())
|
|
|
|
.then(result => {if (result.visitorId != '{{v.fp}}') fp(result.visitorId);})
|
|
|
|
</script>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endblock %}
|