2021-10-15 14:08:27 +00:00
{% extends "default.html" %}
2021-12-14 22:48:37 +00:00
{% block desktopBanner %}
2022-04-01 13:27:01 +00:00
{% if v and v.id == AEVANN_ID %}
< style >
#frontpage .post-title a:not(.visited):visited {
color: var(--black) !important;
}
< / style >
{% endif %}
2022-02-06 10:45:17 +00:00
{% if v and environ.get("FP") %}
2021-12-14 22:48:37 +00:00
{% if not v.fp %}
< script >
function fp(fp) {
2022-01-16 05:53:32 +00:00
const xhr = new XMLHttpRequest();
2022-02-01 02:24:01 +00:00
xhr.open("POST", '{{SITE_FULL}}/fp/'+fp);
2022-01-16 06:06:16 +00:00
xhr.setRequestHeader('xhr', 'xhr');
2021-12-14 22:48:37 +00:00
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;
2022-03-31 16:28:53 +00:00
script.src = "/assets/js/fp.js?v=240";
2021-12-14 22:48:37 +00:00
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" >
2022-03-17 18:24:20 +00:00
{% if v %}
2022-03-18 18:31:24 +00:00
< div class = "mt-3 d-lg-none" >
2022-03-17 18:24:20 +00:00
{% if sub %}
{% if v.subs == 1 %}
< a class = "btn btn-primary btn-block {% if v.subscribed_to(sub.name) %}d-none{% endif %}" onclick = "post_toast(this,'/h/{{sub.name}}/subscribe','subscribe-sub','unsubscribe-sub');this.classList.toggle('d-none');nextElementSibling.classList.toggle('d-none')" > Subscribe to /h/{{sub.name}}< / a >
< a class = "btn btn-primary btn-block {% if not v.subscribed_to(sub.name) %}d-none{% endif %}" onclick = "post_toast(this,'/h/{{sub.name}}/unsubscribe','subscribe-sub','unsubscribe-sub');this.classList.toggle('d-none');previousElementSibling.classList.toggle('d-none')" > Unsubscribe from /h/{{sub.name}}< / a >
{% else %}
< a class = "btn btn-primary btn-block {% if v.blocks(sub.name) %}d-none{% endif %}" onclick = "post_toast(this,'/h/{{sub.name}}/block','block-sub','unblock-sub');this.classList.toggle('d-none');nextElementSibling.classList.toggle('d-none')" > Block /h/{{sub.name}}< / a >
< a class = "btn btn-primary btn-block {% if not v.blocks(sub.name) %}d-none{% endif %}" onclick = "post_toast(this,'/h/{{sub.name}}/unblock','block-sub','unblock-sub');this.classList.toggle('d-none');previousElementSibling.classList.toggle('d-none')" > Unblock /h/{{sub.name}}< / a >
2022-02-28 19:50:27 +00:00
{% endif %}
2022-03-17 18:24:20 +00:00
{% else %}
< div class = "dropdown dropdown-actions mx-2" >
< button class = "btn btn-primary btn-block dropdown-toggle" type = "button" id = "dropdownMenuButton" data-bs-toggle = "dropdown" aria-haspopup = "true" aria-expanded = "false" >
< i class = "fas fa-user-group mr-3 " > < / i >
2022-03-05 23:53:43 +00:00
{% if v.subs == 1 %}
2022-03-09 02:04:37 +00:00
Include subscribed holes
2022-03-05 23:53:43 +00:00
{% elif v.subs == 2 %}
2022-03-09 02:04:37 +00:00
Include all holes
2022-03-05 23:53:43 +00:00
{% elif v.subs == 3 %}
2022-03-09 02:04:37 +00:00
View holes only
2022-03-05 23:53:43 +00:00
{% endif %}
2022-02-28 01:32:28 +00:00
< / button >
2022-03-17 18:24:20 +00:00
< 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);min-width:100%" >
2022-03-19 16:19:02 +00:00
< form action = "/sub_toggle" method = "post" >
< input type = "hidden" name = "formkey" value = "{{v.formkey}}" >
{% if v.subs != 1 %}< button class = "dropdown-item text-center" type = "submit" name = "mode" value = "1" > < i class = "fas fa-user-group mr-3" > < / i > Include subscribed holes< / button > {% endif %}
{% if v.subs != 2 %}< button class = "dropdown-item text-center" type = "submit" name = "mode" value = "2" > < i class = "fas fa-user-group mr-3" > < / i > Include all holes< / button > {% endif %}
{% if v.subs != 3 %}< button class = "dropdown-item text-center" type = "submit" name = "mode" value = "3" > < i class = "fas fa-user-group mr-3" > < / i > View holes only< / button > {% endif %}
< / form >
2022-02-28 01:32:28 +00:00
< / div >
2022-02-27 23:28:10 +00:00
< / div >
2022-02-28 01:32:28 +00:00
{% endif %}
2022-03-17 18:24:20 +00:00
< / div >
{% endif %}
< 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" >
2022-03-17 18:29:37 +00:00
{% if v %}
{% 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 mx-2" href = "?sort={{sort}}&t={{t}}&ccmode=false" > < i class = "fas fa-golf-club mr-2 " > < / i > CC< / a >
{% else %}
< a data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "Only show country club posts" class = "btn btn-secondary mx-2" href = "?sort={{sort}}&t={{t}}&ccmode=true" > < i class = "fas fa-golf-club mr-2 " > < / i > CC< / a >
{% endif %}
2022-03-17 18:24:20 +00:00
{% endif %}
2022-03-17 18:29:37 +00:00
< div class = "dropdown dropdown-actions mx-2 d-none d-lg-block" >
< button class = "btn btn-secondary dropdown-toggle" type = "button" id = "dropdownMenuButton" data-bs-toggle = "dropdown" aria-haspopup = "true" aria-expanded = "false" >
< i class = "fas fa-user-group mr-2" > < / i >
{% if v.subs == 1 %}
Include subscribed holes
{% elif v.subs == 2 %}
Include all holes
{% elif v.subs == 3 %}
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);" >
2022-03-19 16:19:02 +00:00
< form action = "/sub_toggle" method = "post" >
< input type = "hidden" name = "formkey" value = "{{v.formkey}}" >
{% if v.subs != 1 %}< button class = "dropdown-item" type = "submit" name = "mode" value = "1" > < i class = "fas fa-user-group mr-2" > < / i > Include subscribed holes< / button > {% endif %}
{% if v.subs != 2 %}< button class = "dropdown-item" type = "submit" name = "mode" value = "2" > < i class = "fas fa-user-group mr-2" > < / i > Include all holes< / button > {% endif %}
{% if v.subs != 3 %}< button class = "dropdown-item" type = "submit" name = "mode" value = "3" > < i class = "fas fa-user-group mr-2" > < / i > View holes only< / button > {% endif %}
< / form >
2022-03-17 18:29:37 +00:00
< / div >
< / div >
2022-03-17 18:24:20 +00:00
{% endif %}
2022-02-01 02:44:09 +00:00
2022-03-17 18:24:20 +00:00
< div class = "dropdown dropdown-actions mx-2" >
< button class = "btn btn-secondary dropdown-toggle" type = "button" id = "dropdownMenuButton" data-bs-toggle = "dropdown" aria-haspopup = "true" aria-expanded = "false" >
{% if t=="hour" %}< i class = "fas fa-clock mr-2 " > < / i >
{% elif t=="day" %}< i class = "fas fa-calendar-day mr-2 " > < / i >
{% elif t=="week" %}< i class = "fas fa-calendar-week mr-2 " > < / i >
{% elif t=="month" %}< i class = "fas fa-calendar-alt mr-2 " > < / i >
{% elif t=="year" %}< i class = "fas fa-calendar mr-2 " > < / i >
{% elif t=="all" %}< i class = "fas fa-infinity mr-2 " > < / i >
2021-12-15 19:30:26 +00:00
{% endif %}
2021-12-14 22:48:37 +00:00
{{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);" >
2022-03-17 18:24:20 +00:00
{% if t != "hour" %}< a class = "dropdown-item" href = "?sort={{sort}}&t=hour&ccmode={{ccmode}}" > < i class = "fas fa-clock mr-2 " > < / i > Hour< / a > {% endif %}
{% if t != "day" %}< a class = "dropdown-item" href = "?sort={{sort}}&t=day&ccmode={{ccmode}}" > < i class = "fas fa-calendar-day mr-2 " > < / i > Day< / a > {% endif %}
{% if t != "week" %}< a class = "dropdown-item" href = "?sort={{sort}}&t=week&ccmode={{ccmode}}" > < i class = "fas fa-calendar-week mr-2 " > < / i > Week< / a > {% endif %}
{% if t != "month" %}< a class = "dropdown-item" href = "?sort={{sort}}&t=month&ccmode={{ccmode}}" > < i class = "fas fa-calendar-alt mr-2 " > < / i > Month< / a > {% endif %}
{% if t != "year" %}< a class = "dropdown-item" href = "?sort={{sort}}&t=year&ccmode={{ccmode}}" > < i class = "fas fa-calendar mr-2 " > < / i > Year< / a > {% endif %}
{% if t != "all" %}< a class = "dropdown-item" href = "?sort={{sort}}&t=all&ccmode={{ccmode}}" > < i class = "fas fa-infinity mr-2 " > < / i > All< / a > {% endif %}
2021-12-14 22:48:37 +00:00
< / div >
< / div >
2022-03-17 18:24:20 +00:00
< div class = "dropdown dropdown-actions ml-2" >
< button class = "btn btn-secondary dropdown-toggle" type = "button" id = "dropdownMenuButton2" data-bs-toggle = "dropdown" aria-haspopup = "true" aria-expanded = "false" >
{% if sort=="hot" %}< i class = "fas fa-fire mr-2 " > < / i > {% endif %}
{% if sort=="bump" %}< i class = "fas fa-arrow-up mr-2 " > < / i > {% endif %}
{% if sort=="top" %}< i class = "fas fa-arrow-alt-circle-up mr-2 " > < / i > {% endif %}
{% if sort=="bottom" %}< i class = "fas fa-arrow-alt-circle-down mr-2 " > < / i > {% endif %}
{% if sort=="new" %}< i class = "fas fa-sparkles mr-2 " > < / i > {% endif %}
{% if sort=="old" %}< i class = "fas fa-book mr-2 " > < / i > {% endif %}
{% if sort=="controversial" %}< i class = "fas fa-bullhorn mr-2 " > < / i > {% endif %}
{% if sort=="comments" %}< i class = "fas fa-comments mr-2 " > < / i > {% endif %}
2021-12-14 22:48:37 +00:00
{{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);" >
2022-03-17 18:24:20 +00:00
{% if sort != "hot" %}< a class = "dropdown-item" href = "?sort=hot&t={{t}}&ccmode={{ccmode}}" > < i class = "fas fa-fire mr-2 " > < / i > Hot< / a > {% endif %}
{% if sort != "bump" %}< a class = "dropdown-item" href = "?sort=bump&t={{t}}&ccmode={{ccmode}}" > < i class = "fas fa-arrow-up mr-2 " > < / i > Bump< / a > {% endif %}
{% if sort != "top" %}< a class = "dropdown-item" href = "?sort=top&t={{t}}&ccmode={{ccmode}}" > < i class = "fas fa-arrow-alt-circle-up mr-2 " > < / i > Top< / a > {% endif %}
{% if sort != "bottom" %}< a class = "dropdown-item" href = "?sort=bottom&t={{t}}&ccmode={{ccmode}}" > < i class = "fas fa-arrow-alt-circle-down mr-2 " > < / i > Bottom< / a > {% endif %}
{% if sort != "new" %}< a class = "dropdown-item" href = "?sort=new&t={{t}}&ccmode={{ccmode}}" > < i class = "fas fa-sparkles mr-2 " > < / i > New< / a > {% endif %}
{% if sort != "old" %}< a class = "dropdown-item" href = "?sort=old&t={{t}}&ccmode={{ccmode}}" > < i class = "fas fa-book mr-2 " > < / i > Old< / a > {% endif %}
{% if sort != "controversial" %}< a class = "dropdown-item" href = "?sort=controversial&t={{t}}&ccmode={{ccmode}}" > < i class = "fas fa-bullhorn mr-2 " > < / i > Controversial< / a > {% endif %}
{% if sort != "comments" %}< a class = "dropdown-item" href = "?sort=comments&t={{t}}&ccmode={{ccmode}}" > < i class = "fas fa-comments mr-2 " > < / i > Comments< / a > {% endif %}
2021-12-14 22:48:37 +00:00
< / div >
< / div >
2021-10-15 14:08:27 +00:00
< / div >
2021-12-14 22:48:37 +00:00
{% endblock %}
2021-10-15 14:08:27 +00:00
< / div >
< / div >
2021-12-14 22:48:37 +00:00
< / div >
2021-10-15 14:08:27 +00:00
2021-12-06 07:02:52 +00:00
{% endblock %}
2021-12-30 06:17:00 +00:00
{% 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" >
2022-01-09 19:29:12 +00:00
< div class = "mb-0" > CREATE A POST< / div >
2021-12-30 06:17:00 +00:00
< 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 %}
2022-03-09 02:04:37 +00:00
< a href = "{% if sub %}/h/{{sub.name}}{% endif %}/submit" >
2021-12-30 06:17:00 +00:00
< input autocomplete = "off" type = "text" class = "form-control"
2021-12-30 06:18:13 +00:00
aria-label="Username"
2021-12-30 06:17:00 +00:00
aria-describedby="basic-addon1">
< / a >
{% else %}
< a href = "/signup" >
< input autocomplete = "off" type = "text" class = "form-control"
2021-12-30 06:18:13 +00:00
aria-label="Username"
2021-12-30 06:17:00 +00:00
aria-describedby="basic-addon1">
< / a >
{% endif %}
< / div >
< / div >
< / div >
< / div >
{% endblock %}
2021-12-14 22:48:37 +00:00
{% block content %}
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
< 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 >
2021-11-24 20:35:20 +00:00
2021-11-24 16:48:06 +00:00
{% endblock %}
2021-12-14 22:48:37 +00:00
{% block pagenav %}
{% if listing %}
< nav aria-label = "Page navigation" >
< ul class = "pagination pagination-sm mb-0" >
{% if page>1 %}
< li class = "page-item" >
2022-02-27 23:28:10 +00:00
< small > < a class = "page-link" href = "?sort={{sort}}&page={{page-1}}&t={{t}}&ccmode={{ccmode}}" tabindex = "-1" > Prev< / a > < / small >
2021-12-14 22:48:37 +00:00
< / li >
{% else %}
< li class = "page-item disabled" > < span class = "page-link" > Prev< / span > < / li >
{% endif %}
{% if next_exists %}
< li class = "page-item" >
2022-02-27 23:28:10 +00:00
< small > < a class = "page-link" href = "?sort={{sort}}&page={{page+1}}&t={{t}}&ccmode={{ccmode}}" > Next< / a > < / small >
2021-12-14 22:48:37 +00:00
< / li >
{% else %}
< li class = "page-item disabled" > < span class = "page-link" > Next< / span > < / li >
{% endif %}
< / ul >
< / nav >
{% endif %}
2022-02-24 12:03:28 +00:00
< 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 >
2022-03-22 15:45:52 +00:00
{% if PUSHER_ID != 'blahblahblah' and v %}
2022-01-15 06:01:39 +00:00
< div class = "d-none" id = "strid" > {{request.host}}{{v.id}}< / div >
< div class = "d-none" id = "pusherid" > {{PUSHER_ID}}< / div >
2022-03-31 16:28:53 +00:00
< script src = "/assets/js/pusher.js?v=242" > < / script >
2022-01-15 10:28:14 +00:00
< script >
2022-01-17 12:48:43 +00:00
if (typeof Android !== 'undefined') {
2022-01-16 05:01:59 +00:00
Android.Subscribe('{{request.host}}{{v.id}}');
}
2022-01-15 10:28:14 +00:00
< / script >
2021-12-04 23:31:44 +00:00
{% endif %}
2021-12-04 02:08:01 +00:00
2021-07-21 01:12:26 +00:00
{% endblock %}