forked from rDrama/rDrama
232 lines
11 KiB
HTML
232 lines
11 KiB
HTML
{% extends "default.html" %}
|
|
|
|
{% block desktopBanner %}
|
|
|
|
{% if v and environ.get("FP") %}
|
|
{% if not v.fp %}
|
|
<script>
|
|
function fp(fp) {
|
|
const xhr = new XMLHttpRequest();
|
|
xhr.open("POST", '{{SITE_FULL}}/fp/'+fp);
|
|
xhr.setRequestHeader('xhr', 'xhr');
|
|
var form = new FormData()
|
|
form.append("formkey", formkey());
|
|
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 = "/static/assets/js/fp.js?v=240";
|
|
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 %}
|
|
{% endif %}
|
|
|
|
<div class="row" style="overflow: visible;padding-top:5px;">
|
|
<div class="col">
|
|
<div class="d-flex justify-content-between align-items-center pt-3 pb-2 sorting" style="float:right">
|
|
|
|
{% block navbar %}
|
|
<div class="d-flex align-items-center">
|
|
{% if v %}
|
|
<style>
|
|
@media (max-width: 500px) {
|
|
.text-small-m {
|
|
font-size: min(3.3vw,12px) !important;
|
|
margin-right: min(1.5vw,0.5rem) !important;
|
|
padding: min(1vw,0.75rem) !important;
|
|
}
|
|
.ddd {
|
|
margin-right: 0 !important;
|
|
margin-left: min(1.1vw,0.5rem) !important;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
{% if v.paid_dues %}
|
|
{% if ccmode=="true"%}
|
|
<a data-bs-toggle="tooltip" data-bs-placement="bottom" title="Only show country club posts" class="btn btn-primary text-primary text-small-m mx-2 ddd" href="?sort={{sort}}&t={{t}}&ccmode=false"><i class="fas fa-golf-club mr-2 text-small-m"></i>CC</a>
|
|
{% else %}
|
|
<a data-bs-toggle="tooltip" data-bs-placement="bottom" title="Only show country club posts" class="btn btn-secondary text-small-m mx-2 ddd" href="?sort={{sort}}&t={{t}}&ccmode=true"><i class="fas fa-golf-club mr-2 text-small-m"></i>CC</a>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<div class="dropdown dropdown-actions mx-2 ddd">
|
|
<button class="btn btn-secondary dropdown-toggle text-small-m ddd" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
<i class="fas fa-user-group mr-2 text-small-m"></i>
|
|
{% if v.subs == 1 %}
|
|
Include subscribed holes
|
|
{% elif v.subs == 2 %}
|
|
Include all holes
|
|
{% elif v.subs == 3 %}
|
|
View subscribed holes only
|
|
{% elif v.subs == 4 %}
|
|
View holes only
|
|
{% endif %}
|
|
</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 v.subs != 1 %}<a class="dropdown-item text-small-m" href="/sub_toggle/1"><i class="fas fa-user-group mr-2 text-small-m"></i>Include subscribed holes</a>{% endif %}
|
|
{% if v.subs != 2 %}<a class="dropdown-item text-small-m" href="/sub_toggle/2"><i class="fas fa-user-group mr-2 text-small-m"></i>Include all holes</a>{% endif %}
|
|
{% if v.subs != 3 %}<a class="dropdown-item text-small-m" href="/sub_toggle/3"><i class="fas fa-user-group mr-2 text-small-m"></i>View subscribed holes only</a>{% endif %}
|
|
{% if v.subs != 4 %}<a class="dropdown-item text-small-m" href="/sub_toggle/4"><i class="fas fa-user-group mr-2 text-small-m"></i>View holes only</a>{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="dropdown dropdown-actions mx-2 ddd">
|
|
<button class="btn btn-secondary dropdown-toggle text-small-m ddd" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
{% if t=="hour" %}<i class="fas fa-clock mr-2 text-small-m"></i>
|
|
{% elif t=="day" %}<i class="fas fa-calendar-day mr-2 text-small-m"></i>
|
|
{% elif t=="week" %}<i class="fas fa-calendar-week mr-2 text-small-m"></i>
|
|
{% elif t=="month" %}<i class="fas fa-calendar-alt mr-2 text-small-m"></i>
|
|
{% elif t=="year" %}<i class="fas fa-calendar mr-2 text-small-m"></i>
|
|
{% elif t=="all" %}<i class="fas fa-infinity mr-2 text-small-m"></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 text-small-m" href="?sort={{sort}}&t=hour&ccmode={{ccmode}}"><i class="fas fa-clock mr-2 text-small-m"></i>Hour</a>{% endif %}
|
|
{% if t != "day" %}<a class="dropdown-item text-small-m" href="?sort={{sort}}&t=day&ccmode={{ccmode}}"><i class="fas fa-calendar-day mr-2 text-small-m"></i>Day</a>{% endif %}
|
|
{% if t != "week" %}<a class="dropdown-item text-small-m" href="?sort={{sort}}&t=week&ccmode={{ccmode}}"><i class="fas fa-calendar-week mr-2 text-small-m"></i>Week</a>{% endif %}
|
|
{% if t != "month" %}<a class="dropdown-item text-small-m" href="?sort={{sort}}&t=month&ccmode={{ccmode}}"><i class="fas fa-calendar-alt mr-2 text-small-m"></i>Month</a>{% endif %}
|
|
{% if t != "year" %}<a class="dropdown-item text-small-m" href="?sort={{sort}}&t=year&ccmode={{ccmode}}"><i class="fas fa-calendar mr-2 text-small-m"></i>Year</a>{% endif %}
|
|
{% if t != "all" %}<a class="dropdown-item text-small-m" href="?sort={{sort}}&t=all&ccmode={{ccmode}}"><i class="fas fa-infinity mr-2 text-small-m"></i>All</a>{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="dropdown dropdown-actions ml-2 ddd">
|
|
<button class="btn btn-secondary dropdown-toggle text-small-m ddd" type="button" id="dropdownMenuButton2" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
{% if sort=="hot" %}<i class="fas fa-fire mr-2 text-small-m"></i>{% endif %}
|
|
{% if sort=="bump" %}<i class="fas fa-arrow-up mr-2 text-small-m"></i>{% endif %}
|
|
{% if sort=="top" %}<i class="fas fa-arrow-alt-circle-up mr-2 text-small-m"></i>{% endif %}
|
|
{% if sort=="bottom" %}<i class="fas fa-arrow-alt-circle-down mr-2 text-small-m"></i>{% endif %}
|
|
{% if sort=="new" %}<i class="fas fa-sparkles mr-2 text-small-m"></i>{% endif %}
|
|
{% if sort=="old" %}<i class="fas fa-book mr-2 text-small-m"></i>{% endif %}
|
|
{% if sort=="controversial" %}<i class="fas fa-bullhorn mr-2 text-small-m"></i>{% endif %}
|
|
{% if sort=="comments" %}<i class="fas fa-comments mr-2 text-small-m"></i>{% endif %}
|
|
{{sort | capitalize}}
|
|
</button>
|
|
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton2" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 31px, 0px);">
|
|
{% if sort != "hot" %}<a class="dropdown-item text-small-m" href="?sort=hot&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-fire mr-2 text-small-m"></i>Hot</a>{% endif %}
|
|
{% if sort != "bump" %}<a class="dropdown-item text-small-m" href="?sort=bump&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-arrow-up mr-2 text-small-m"></i>Bump</a>{% endif %}
|
|
{% if sort != "top" %}<a class="dropdown-item text-small-m" href="?sort=top&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-arrow-alt-circle-up mr-2 text-small-m"></i>Top</a>{% endif %}
|
|
{% if sort != "bottom" %}<a class="dropdown-item text-small-m" href="?sort=bottom&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-arrow-alt-circle-down mr-2 text-small-m"></i>Bottom</a>{% endif %}
|
|
{% if sort != "new" %}<a class="dropdown-item text-small-m" href="?sort=new&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-sparkles mr-2 text-small-m"></i>New</a>{% endif %}
|
|
{% if sort != "old" %}<a class="dropdown-item text-small-m" href="?sort=old&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-book mr-2 text-small-m"></i>Old</a>{% endif %}
|
|
{% if sort != "controversial" %}<a class="dropdown-item text-small-m" href="?sort=controversial&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-bullhorn mr-2 text-small-m"></i>Controversial</a>{% endif %}
|
|
{% if sort != "comments" %}<a class="dropdown-item text-small-m" href="?sort=comments&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-comments mr-2 text-small-m"></i>Comments</a>{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
{% block PseudoSubmitForm %}
|
|
|
|
<div class="row no-gutters d-none d-lg-flex mt-3 {% if not v %}mb-3{% endif %}">
|
|
|
|
<div class="col">
|
|
<div class="card pseudo-submit-form border">
|
|
<div class="card-header bg-gray-100">
|
|
<div class="mb-0">CREATE A POST</div>
|
|
<ul class="list-inline no-bullets mb-0 d-none">
|
|
<li class="list-inline-item active mr-4"><i class="fas fa-align-left text-gray-400"></i></li>
|
|
<li class="list-inline-item"><i class="fas fa-link text-gray-400"></i></li>
|
|
</ul>
|
|
</div>
|
|
<div class="card-body">
|
|
{% if v %}
|
|
<a href="{% if sub %}/h/{{sub.name}}{% endif %}/submit">
|
|
<input autocomplete="off" type="text" class="form-control"
|
|
aria-label="Username"
|
|
aria-describedby="basic-addon1">
|
|
</a>
|
|
{% else %}
|
|
<a href="/signup">
|
|
<input autocomplete="off" type="text" class="form-control"
|
|
aria-label="Username"
|
|
aria-describedby="basic-addon1">
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="row no-gutters {% if listing %}mt-md-3{% elif not listing %}my-md-3{% endif %}">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="posts" id="posts">
|
|
|
|
{% include "submission_listing.html" %}
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
{% block pagenav %}
|
|
{% if listing %}
|
|
<nav aria-label="Page navigation">
|
|
<ul class="pagination pagination-sm mb-0">
|
|
{% if page>1 %}
|
|
<li class="page-item">
|
|
<small><a class="page-link" href="?sort={{sort}}&page={{page-1}}&t={{t}}&ccmode={{ccmode}}" tabindex="-1">Prev</a></small>
|
|
</li>
|
|
{% else %}
|
|
<li class="page-item disabled"><span class="page-link">Prev</span></li>
|
|
{% endif %}
|
|
{% if next_exists %}
|
|
<li class="page-item">
|
|
<small><a class="page-link" href="?sort={{sort}}&page={{page+1}}&t={{t}}&ccmode={{ccmode}}">Next</a></small>
|
|
</li>
|
|
{% else %}
|
|
<li class="page-item disabled"><span class="page-link">Next</span></li>
|
|
{% endif %}
|
|
</ul>
|
|
</nav>
|
|
{% endif %}
|
|
|
|
<script>
|
|
function post(url) {
|
|
const xhr = new XMLHttpRequest();
|
|
xhr.open("POST", url);
|
|
xhr.setRequestHeader('xhr', 'xhr');
|
|
var form = new FormData()
|
|
form.append("formkey", formkey());
|
|
xhr.onload = function() {location.reload()}
|
|
xhr.send(form);
|
|
};
|
|
</script>
|
|
|
|
{% if PUSHER_ID != '3435tdfsdudebussylmaoxxt43' and v %}
|
|
<div class="d-none" id="strid">{{request.host}}{{v.id}}</div>
|
|
<div class="d-none" id="pusherid">{{PUSHER_ID}}</div>
|
|
<script src="/static/assets/js/pusher.js?v=242"></script>
|
|
<script>
|
|
if (typeof Android !== 'undefined') {
|
|
Android.Subscribe('{{request.host}}{{v.id}}');
|
|
}
|
|
</script>
|
|
{% endif %}
|
|
|
|
{% endblock %} |