2022-05-04 23:09:46 +00:00
{% extends "default.html" %}
2023-10-29 12:51:00 +00:00
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-29 12:51:00 +00:00
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-11-04 22:03:26 +00:00
{% set preview = hole.random_sidebar if hole and hole.sidebarurls else hole.bannerurl %}
2023-10-29 12:51:00 +00:00
{% if hole %}
< meta property = "og:type" content = "article" >
< meta property = "og:title" content = "/h/{{hole}}" >
< 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}}" >
< meta name = "twitter:title" content = "/h/{{hole.name}}" >
< meta name = "twitter:creator" content = "{{SITE_FULL}}" >
< meta name = "twitter:image" content = "{{preview}}" >
< meta name = "twitter:url" content = "{{request.full_path}}" >
{% endif %}
{% if hole.sidebar %}
< meta property = "og:description" name = "description" content = "{{hole.sidebar}}" >
< meta name = "twitter:description" content = "{{hole.sidebar}}" >
{% endif %}
2022-11-21 08:52:22 +00:00
{% endblock %}
2023-10-29 12:51:00 +00:00
2022-05-04 23:09:46 +00:00
{% block desktopBanner %}
2023-10-29 12:51:00 +00:00
{%- set search_placeholder = "Search" -%}
{%- if hole -%}
{%- set search_placeholder = "Search (try 'hole:" ~ hole.name ~ "')" -%}
{%- endif -%}
< div class = "row" style = "overflow: visible;padding-top:5px" >
< div class = "col" >
< 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 >
2023-02-06 05:10:42 +00:00
< / span >
2023-10-29 12:51:00 +00:00
< / form >
< 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 >
{% if hole %}
{% if v %}
{% 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 >
{% else %}
2024-01-12 07:31:32 +00:00
< button type = "button" id = "block-hole" 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-hole','unblock-hole','d-none')" > < i class = "fas fa-eye-slash mr-2" > < / i > Block /h/{{hole.name}}< / button >
< button type = "button" id = "unblock-hole" 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-hole','unblock-hole','d-none')" > < i class = "fas fa-eye mr-2" > < / i > Unblock /h/{{hole.name}}< / button >
2023-10-29 12:51:00 +00:00
{% endif %}
2024-01-12 07:31:55 +00:00
< button type = "button" id = "follow-hole" 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-hole','unfollow-hole','d-none')" > < i class = "fas fa-bell mr-2" > < / i > Follow /h/{{hole.name}}< / button >
< button type = "button" id = "unfollow-hole" 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-hole','unfollow-hole','d-none')" > < i class = "fas fa-bell-slash mr-2" > < / i > Unfollow /h/{{hole.name}}< / button >
2022-05-04 23:09:46 +00:00
{% else %}
2023-10-29 12:51:00 +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-05-04 23:09:46 +00:00
{% endif %}
2022-08-24 21:11:54 +00:00
{% endif %}
2022-05-04 23:09:46 +00:00
2023-10-29 12:51:00 +00:00
< div class = "d-flex justify-content-between align-items-center pt-3 pb-2 sorting fl-r" >
{% block navbar %}
< div class = "d-flex align-items-center" >
{% set pcolor = "primary" if pins else "secondary" %}
< form action = "/toggle_pins/{{hole}}/{{sort}}" method = "post" data-nonce = "{{g.nonce}}" data-onsubmit = "sendFormXHRReload(this)" >
< 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 >
< / form >
{%- import 'util/macros.html' as macros with context -%}
{{- macros.time_filter_buttons() -}}
{{- macros.sorting_buttons(POST_SORTS, True) -}}
< / div >
{% endblock %}
< / div >
2022-05-04 23:09:46 +00:00
< / div >
< / div >
{% endblock %}
2022-11-21 08:52:22 +00:00
{% block PseudoSubmitForm %}{% endblock %}
2022-05-04 23:09:46 +00:00
{% block content %}
2023-10-29 12:51:00 +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" >
{% include "post_listing.html" %}
< / div >
2022-05-04 23:09:46 +00:00
< / div >
< / div >
{% endblock %}
{% block pagenav %}
2023-10-29 12:51:00 +00:00
{% if listing %}
{% include "pagination.html" %}
{% endif %}
2022-05-04 23:09:46 +00:00
2023-10-29 12:51:00 +00:00
{% if request.path == '/' and v %}
< script defer src = "{{'js/register_service_worker.js' | asset}}" > < / script >
{% endif %}
2022-05-04 23:09:46 +00:00
2023-10-29 12:51:00 +00:00
{% if request.path == '/' and g.browser != 'webview' and time.time() > session.get('tooltip_dismissed',0)+86400*30 %}
< div id = "mobile-prompt-container" class = "fixed-top" >
< 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 >
< / div >
2022-05-04 23:09:46 +00:00
2023-10-29 12:51:00 +00:00
< script defer src = "{{'js/mobile_prompt.js' | asset}}" > < / script >
{% endif %}
2022-05-29 02:11:04 +00:00
{% endblock %}