2022-05-04 23:09:46 +00:00
{% extends "default.html" %}
2022-08-05 23:16:44 +00:00
{% block title %}
2023-10-07 17:55:50 +00:00
{% if hole %}
< title > /h/{{hole.name}}< / title >
2022-11-21 08:52:22 +00:00
{% elif request.path == '/' %}
2023-06-29 20:14:24 +00:00
{% if IS_DKD() %}
2023-04-25 14:34:09 +00:00
< title > Kongrama< / title >
{% else %}
< title > {{SITE_NAME}}{% if TAGLINES %}: {{TAGLINES|random()}}{% endif %}< / title >
{% endif %}
2022-08-05 23:16:44 +00:00
{% else %}
{{super()}}
{% endif %}
{% endblock %}
2023-10-07 17:55:50 +00:00
{% block pagetitle %}{{SITE_NAME if not hole else '/h/' ~ hole.name}}{% endblock %}
2022-08-05 22:28:22 +00:00
2022-11-21 08:52:22 +00:00
{% block head_final %}
2023-10-07 17:55:50 +00:00
{% set preview = hole.siderbarurl if hole and hole.sidebarurl else hole.bannerurl %}
{% if hole %}
2022-11-21 08:52:22 +00:00
< meta property = "og:type" content = "article" >
2023-10-07 17:55:50 +00:00
< meta property = "og:title" content = "/h/{{hole}}" >
2022-11-21 08:52:22 +00:00
< meta property = "og:site_name" content = "{{SITE}}" >
< meta property = "og:image" content = "{{preview}}" >
< meta property = "og:url" content = "{{request.full_path}}" >
< meta property = "og:author" name = "author" content = "{{SITE_FULL}}" >
< meta name = "twitter:card" content = "summary_large_image" >
< meta name = "twitter:site" content = "{{SITE_FULL}}" >
2023-10-07 17:55:50 +00:00
< meta name = "twitter:title" content = "/h/{{hole.name}}" >
2022-11-21 08:52:22 +00:00
< meta name = "twitter:creator" content = "{{SITE_FULL}}" >
< meta name = "twitter:image" content = "{{preview}}" >
< meta name = "twitter:url" content = "{{request.full_path}}" >
2022-11-21 20:02:42 +00:00
{% endif %}
2023-10-07 17:55:50 +00:00
{% if hole.sidebar %}
< meta property = "og:description" name = "description" content = "{{hole.sidebar}}" >
< meta name = "twitter:description" content = "{{hole.sidebar}}" >
2022-11-21 08:52:22 +00:00
{% endif %}
{% endblock %}
2022-05-04 23:09:46 +00:00
{% block desktopBanner %}
2023-02-10 05:54:15 +00:00
{%- set search_placeholder = "Search" -%}
2023-10-07 17:55:50 +00:00
{%- if hole -%}
2023-10-07 18:04:12 +00:00
{%- set search_placeholder = "Search (try 'hole:" ~ hole.name ~ "')" -%}
2023-02-10 05:54:15 +00:00
{%- endif -%}
2023-09-15 11:01:04 +00:00
< div class = "row" style = "overflow: visible;padding-top:5px" >
2022-05-04 23:09:46 +00:00
< div class = "col" >
2023-02-06 05:10:42 +00:00
< form id = "searchform" class = "form-inline d-md-none search flex-nowrap mt-2" action = "/search/posts" method = "get" >
< input autocomplete = "off" class = "form-control form-control-sm w-100" type = "search" placeholder = "{{search_placeholder}}" name = "q" >
< span class = "input-group-append" >
< span class = "input-group-text border-0 bg-transparent" style = "margin-left: -2.5rem" data-nonce = "{{g.nonce}}" onclick_submit >
< i class = "fa fa-search" > < / i >
< / span >
< / span >
< / form >
2023-10-07 17:55:50 +00:00
< a class = "btn btn-primary btn-block mt-3" href = "{% if hole %}/h/{{hole}}{% endif %}/submit" > < i class = "fas fa-feather-alt mr-2" > < / i > Create Post {% if hole %}in /h/{{hole}}{% endif %}< / a >
2022-09-16 20:18:24 +00:00
2023-10-07 17:55:50 +00:00
{% if hole %}
2022-08-24 21:11:54 +00:00
{% if v %}
2023-10-07 17:55:50 +00:00
{% if hole.stealth %}
< button type = "button" id = "unsubscribe-sub" class = "btn btn-primary btn-block {% if not v.subscribes(hole.name) %}d-none{% endif %}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/h/{{hole.name}}/unsubscribe','subscribe-sub','unsubscribe-sub','d-none')" > < i class = "fas fa-eye-slash mr-2" > < / i > Block /h/{{hole.name}}< / button >
< button type = "button" id = "subscribe-sub" class = "btn btn-primary btn-block {% if v.subscribes(hole.name) %}d-none{% endif %}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/h/{{hole.name}}/subscribe','subscribe-sub','unsubscribe-sub','d-none')" > < i class = "fas fa-eye mr-2" > < / i > Unblock /h/{{hole.name}}< / button >
2022-05-04 23:09:46 +00:00
{% else %}
2023-10-07 17:55:50 +00:00
< button type = "button" id = "block-sub" class = "btn btn-primary btn-block mt-3 {% if v.blocks(hole.name) %}d-none{% endif %}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/h/{{hole.name}}/block','block-sub','unblock-sub','d-none')" > < i class = "fas fa-eye-slash mr-2" > < / i > Block /h/{{hole.name}}< / button >
< button type = "button" id = "unblock-sub" class = "btn btn-primary btn-block mt-3 {% if not v.blocks(hole.name) %}d-none{% endif %}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/h/{{hole.name}}/unblock','block-sub','unblock-sub','d-none')" > < i class = "fas fa-eye mr-2" > < / i > Unblock /h/{{hole.name}}< / button >
2022-05-04 23:09:46 +00:00
{% endif %}
2022-08-24 21:11:54 +00:00
2023-10-07 17:55:50 +00:00
< button type = "button" id = "follow-sub" class = "btn btn-primary btn-follow {% if v.follows(hole.name) %}d-none{% endif %}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/h/{{hole.name}}/follow','follow-sub','unfollow-sub','d-none')" > < i class = "fas fa-bell mr-2" > < / i > Follow /h/{{hole.name}}< / button >
< button type = "button" id = "unfollow-sub" class = "btn btn-primary btn-follow {% if not v.follows(hole.name) %}d-none{% endif %}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/h/{{hole.name}}/unfollow','follow-sub','unfollow-sub','d-none')" > < i class = "fas fa-bell-slash mr-2" > < / i > Unfollow /h/{{hole.name}}< / button >
2022-08-24 21:11:54 +00:00
{% else %}
2023-10-07 17:55:50 +00:00
< a class = "btn btn-primary btn-block" href = "/login?redirect={{request.full_path | urlencode}}" > < i class = "fas fa-eye-slash mr-2" > < / i > Block /h/{{hole.name}}< / a >
< a class = "btn btn-primary btn-block" href = "/login?redirect={{request.full_path | urlencode}}" > < i class = "fas fa-bell mr-2" > < / i > Follow /h/{{hole.name}}< / a >
2022-08-24 21:11:54 +00:00
{% endif %}
2022-05-04 23:09:46 +00:00
{% endif %}
2023-02-27 17:29:43 +00:00
< div class = "d-flex justify-content-between align-items-center pt-3 pb-2 sorting fl-r" >
2022-09-16 20:18:24 +00:00
2022-05-04 23:09:46 +00:00
{% block navbar %}
< div class = "d-flex align-items-center" >
2022-11-30 11:40:52 +00:00
{% set pcolor = "primary" if pins else "secondary" %}
2023-10-07 17:55:50 +00:00
< form action = "/toggle_pins/{{hole}}/{{sort}}" method = "post" data-nonce = "{{g.nonce}}" data-onsubmit = "sendFormXHRReload(this)" >
2023-09-07 15:26:31 +00:00
< button type = "submit" class = "btn btn-{{pcolor}} text-{{pcolor}} mx-2" > < i type = "submit" class = "fas fas fa-thumbtack fa-rotate--45 mr-2" > < / i > Pins< / button >
2023-05-05 19:14:58 +00:00
< / form >
2022-11-30 11:40:52 +00:00
2023-09-05 14:32:36 +00:00
{%- import 'util/macros.html' as macros with context -%}
{{- macros.time_filter_buttons() -}}
2023-09-29 02:05:21 +00:00
{{- macros.sorting_buttons(POST_SORTS, True) -}}
2022-05-04 23:09:46 +00:00
< / div >
{% endblock %}
< / div >
< / div >
< / div >
{% endblock %}
2022-11-21 08:52:22 +00:00
{% block PseudoSubmitForm %}{% endblock %}
2022-05-04 23:09:46 +00:00
{% block content %}
< div class = "row no-gutters {% if listing %}mt-md-3{% elif not listing %}my-md-3{% endif %}" >
2022-11-08 00:59:28 +00:00
< div class = "col-12" >
2023-09-08 20:13:04 +00:00
< div class = "posts" >
2023-06-07 23:26:32 +00:00
{% include "post_listing.html" %}
2022-05-04 23:09:46 +00:00
< / div >
< / div >
< / div >
{% endblock %}
{% block pagenav %}
{% if listing %}
2023-05-04 22:15:13 +00:00
{% include "pagination.html" %}
2022-05-04 23:09:46 +00:00
{% endif %}
2022-12-02 22:21:18 +00:00
{% if request.path == '/' and v %}
2022-12-29 14:20:27 +00:00
< script defer src = "{{'js/register_service_worker.js' | asset}}" > < / script >
2022-05-04 23:09:46 +00:00
{% endif %}
2023-07-01 23:03:41 +00:00
{% if request.path == '/' and g.browser != 'webview' and time.time() > session.get('tooltip_dismissed',0)+86400*30 %}
2022-05-04 23:09:46 +00:00
< div id = "mobile-prompt-container" class = "fixed-top" >
2023-07-22 17:08:30 +00:00
< div id = "mobile-prompt" data-bs-toggle = "tooltip" data-bs-container = "#mobile-prompt-container" data-bs-placement = "top" data-bs-trigger = "click" data-bs-html = "true" title = "<i class='dismiss-beg fas fa-x'></i>Click me to install the {{SITE_NAME}} mobile app{% if g.browser == 'iphone' %} and be able to enable push notifications{% endif %}" > < / div >
2022-05-04 23:09:46 +00:00
< / div >
2022-12-29 14:20:27 +00:00
< script defer src = "{{'js/mobile_prompt.js' | asset}}" > < / script >
2022-05-04 23:09:46 +00:00
{% endif %}
2022-12-29 14:20:27 +00:00
{% if FP and request.path == '/' and v and not v.fp %}
< script defer src = "{{'js/fp.js' | asset}}" > < / script >
2022-07-09 08:35:47 +00:00
{% endif %}
2022-05-29 02:11:04 +00:00
{% endblock %}