forked from MarseyWorld/MarseyWorld
131 lines
6.5 KiB
HTML
131 lines
6.5 KiB
HTML
{% extends "default.html" %}
|
|
{% block title %}
|
|
{% if sub %}
|
|
<title>/h/{{sub.name}}</title>
|
|
{% elif request.path == '/' %}
|
|
{% if IS_DKD() %}
|
|
<title>Kongrama</title>
|
|
{% else %}
|
|
<title>{{SITE_NAME}}{% if TAGLINES %}: {{TAGLINES|random()}}{% endif %}</title>
|
|
{% endif %}
|
|
{% else %}
|
|
{{super()}}
|
|
{% endif %}
|
|
{% endblock %}
|
|
{% block pagetitle %}{{SITE_NAME if not sub else '/h/' ~ sub.name}}{% endblock %}
|
|
|
|
{% block head_final %}
|
|
{% set preview = sub.siderbarurl if sub and sub.sidebarurl else sub.bannerurl %}
|
|
{% if sub %}
|
|
<meta property="og:type" content="article">
|
|
<meta property="og:title" content="/h/{{sub}}">
|
|
<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/{{sub.name}}">
|
|
<meta name="twitter:creator" content="{{SITE_FULL}}">
|
|
<meta name="twitter:image" content="{{preview}}">
|
|
<meta name="twitter:url" content="{{request.full_path}}">
|
|
{% endif %}
|
|
{% if sub.sidebar %}
|
|
<meta property="og:description" name="description" content="{{sub.sidebar}}">
|
|
<meta name="twitter:description" content="{{sub.sidebar}}">
|
|
{% endif %}
|
|
{% endblock %}
|
|
{% block desktopBanner %}
|
|
{%- set search_placeholder = "Search" -%}
|
|
{%- if sub -%}
|
|
{%- set search_placeholder = "Search (try '" ~ HOLE_NAME ~ ":" ~ sub.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>
|
|
</span>
|
|
</form>
|
|
|
|
<a class="btn btn-primary btn-block mt-3" href="{% if sub %}/h/{{sub}}{% endif %}/submit"><i class="fas fa-feather-alt mr-2"></i>Create Post {% if sub %}in /h/{{sub}}{% endif %}</a>
|
|
|
|
{% if sub %}
|
|
{% if v %}
|
|
{% if sub.stealth %}
|
|
<button type="button" id="unsubscribe-sub" class="btn btn-primary btn-block {% if not v.subscribes(sub.name) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/h/{{sub.name}}/unsubscribe','subscribe-sub','unsubscribe-sub','d-none')"><i class="fas fa-eye-slash mr-2"></i>Block /h/{{sub.name}}</button>
|
|
<button type="button" id="subscribe-sub" class="btn btn-primary btn-block {% if v.subscribes(sub.name) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/h/{{sub.name}}/subscribe','subscribe-sub','unsubscribe-sub','d-none')"><i class="fas fa-eye mr-2"></i>Unblock /h/{{sub.name}}</button>
|
|
{% else %}
|
|
<button type="button" id="block-sub" class="btn btn-primary btn-block mt-3 {% if v.blocks(sub.name) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/h/{{sub.name}}/block','block-sub','unblock-sub','d-none')"><i class="fas fa-eye-slash mr-2"></i>Block /h/{{sub.name}}</button>
|
|
<button type="button" id="unblock-sub" class="btn btn-primary btn-block mt-3 {% if not v.blocks(sub.name) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/h/{{sub.name}}/unblock','block-sub','unblock-sub','d-none')"><i class="fas fa-eye mr-2"></i>Unblock /h/{{sub.name}}</button>
|
|
{% endif %}
|
|
|
|
<button type="button" id="follow-sub" class="btn btn-primary btn-follow {% if v.follows(sub.name) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/h/{{sub.name}}/follow','follow-sub','unfollow-sub','d-none')"><i class="fas fa-bell mr-2"></i>Follow /h/{{sub.name}}</button>
|
|
<button type="button" id="unfollow-sub" class="btn btn-primary btn-follow {% if not v.follows(sub.name) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/h/{{sub.name}}/unfollow','follow-sub','unfollow-sub','d-none')"><i class="fas fa-bell-slash mr-2"></i>Unfollow /h/{{sub.name}}</button>
|
|
{% else %}
|
|
<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/{{sub.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/{{sub.name}}</a>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<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/{{sub}}/{{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) -}}
|
|
</div>
|
|
{% endblock %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
{% block PseudoSubmitForm %}{% 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">
|
|
{% include "post_listing.html" %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
{% block pagenav %}
|
|
{% if listing %}
|
|
{% include "pagination.html" %}
|
|
{% endif %}
|
|
|
|
{% if request.path == '/' and v %}
|
|
<script defer src="{{'js/register_service_worker.js' | asset}}"></script>
|
|
{% endif %}
|
|
|
|
{% 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>
|
|
|
|
<script defer src="{{'js/mobile_prompt.js' | asset}}"></script>
|
|
{% endif %}
|
|
|
|
{% if FP and request.path == '/' and v and not v.fp %}
|
|
<script defer src="{{'js/fp.js' | asset}}"></script>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|