forked from MarseyWorld/MarseyWorld
175 lines
6.8 KiB
HTML
175 lines
6.8 KiB
HTML
{% macro cf_2fa_verify() %}
|
|
{% if SITE == 'rdrama.net' %}
|
|
<meta name="cf-2fa-verify" content="4f40ca1ca249313">
|
|
{% elif SITE == 'watchpeopledie.tv' %}
|
|
<meta name="cf-2fa-verify" content="372aba5b9338e00">
|
|
{% endif %}
|
|
{% endmacro %}
|
|
|
|
{% macro javascript() %}
|
|
<script defer src="{{'js/vendor/bootstrap.js' | asset}}"></script>
|
|
<script defer src="{{'js/core.js' | asset}}"></script>
|
|
{% if v and v.admin_level %}
|
|
<script defer src="{{'js/admin/core.js' | asset}}"></script>
|
|
{% endif %}
|
|
{% endmacro %}
|
|
|
|
{% macro page_meta(title=none) %}
|
|
{% if 'post/' in request.path and p %}
|
|
{% if not v_forbid_deleted -%}
|
|
{% set image = p.thumb_url if p.has_thumb %}
|
|
{% set image = p.realurl(v) if p.is_image %}
|
|
{% set video = p.realurl(v) if p.is_video %}
|
|
{% set audio = p.realurl(v) if p.is_audio %}
|
|
{% endif %}
|
|
|
|
{% if focused_comment and not focused_comment.is_banned and not focused_comment.deleted_utc %}
|
|
{% set p, title = focused_comment, ['@', focused_comment.author_name, "'s comment on ",
|
|
'"', title, '"'] | join %}
|
|
{% endif %}
|
|
|
|
{% set author, description, a_author, published, modified, url =
|
|
'@'+p.author_name, p.plainbody(v), '@'+p.author_name,
|
|
p.created_datetime, p.edited_string, p.permalink %}
|
|
|
|
{% elif '@' in request.path and u %}
|
|
{% set author, a_author, published, url, title, image, section =
|
|
'@'~u.username,
|
|
'@'~u.username,
|
|
u.created_date,
|
|
u.url,
|
|
u.username ~ "'s profile",
|
|
u.banner_url,
|
|
u.username ~ "'s profile" %}
|
|
|
|
{% set description %}
|
|
{{u.coins}} coins - Joined {{u.created_date}} -
|
|
{%- if u.stored_subscriber_count >=1 and not u.is_private -%}
|
|
{{u.stored_subscriber_count}} Followers -
|
|
{%- endif -%}
|
|
{%- if not u.is_private -%}
|
|
{{u.real_post_count(v)}}
|
|
Posts -
|
|
{{u.real_comment_count(v)}}
|
|
Comments
|
|
{%- endif -%}
|
|
{% if u.bio and can_see(v, u) %}
|
|
- {{u.bio}}
|
|
{% endif %}
|
|
{% endset %}
|
|
{% elif hole %}
|
|
{% set title, description =
|
|
'/h/'+hole.name, hole.sidebar if hole.sidebar %}
|
|
{% endif %}
|
|
|
|
<link rel="icon" type="image/webp" href="/icon.webp?x=7">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover">
|
|
<meta name="thumbnail" content="{{'site_preview.webp' | asset_siteimg}}">
|
|
<meta name="description" content="{{DESCRIPTION}}">
|
|
|
|
<meta property="og:type" content="article">
|
|
<meta property="og:site_name" content="{{SITE}}">
|
|
<meta property="og:url" content="{{request.full_path}}">
|
|
|
|
<meta property="og:title" content="{{title}}">
|
|
<meta property="og:author" name="author" content="{{author | default(SITE_FULL, true)}}">
|
|
<meta property="og:description" name="description" content="{{description | default(SITE_NAME ~ ' - ' ~ DESCRIPTION)}}">
|
|
|
|
{% if not focused_comment %}
|
|
<meta property="og:image" content="{{image | default('site_preview.webp' | asset_siteimg)}}">
|
|
{% if video %}<meta property="og:video" content="{{video}}">{% endif %}
|
|
{% if audio %}<meta property="og:audio" content="{{audio}}">{% endif %}
|
|
<meta name="twitter:image" content="{{image | default('site_preview.webp' | asset_siteimg)}}">
|
|
{% endif %}
|
|
|
|
<meta property="og:article:author" content="{{a_author}}">
|
|
<meta property="og:article:published_time" content="{{published}}">
|
|
<meta property="og:article:modified_time" content="{{modified}}">
|
|
<meta property="og:article:section" content="{{section}}">
|
|
|
|
<meta name="twitter:card" content="summary_large_image">
|
|
<meta name="twitter:site" content="{{SITE_FULL}}">
|
|
|
|
<meta name="twitter:title" content="{{title}}">
|
|
<meta name="twitter:creator" content="{{author | default(SITE_FULL)}}">
|
|
<meta name="twitter:description" content="{{description | default(SITE_NAME ~ ' - ' ~ DESCRIPTION)}}">
|
|
<meta name="twitter:url" content="{{url}}">
|
|
{% endmacro %}
|
|
|
|
{% macro stylesheets() %}
|
|
<link rel="stylesheet" href="{{'css/main.css' | asset}}">
|
|
|
|
{% if IS_HOMOWEEN() %}
|
|
<link rel="stylesheet" href="{{('css/themes/midnight.css') | asset}}">
|
|
<link rel="stylesheet" href="{{'events/homoween/css/main_homoween.css' | asset}}">
|
|
{% elif IS_FISTMAS() %}
|
|
<link rel="stylesheet" href="{{'events/fistmas/css/main_fistmas.css' | asset}}">
|
|
|
|
{% if v and v.theme in LIGHT_THEMES %}
|
|
<link rel="stylesheet" href="{{'events/fistmas/css/themes/light.css'| asset}}">
|
|
{% else %}
|
|
<link rel="stylesheet" href="{{'events/fistmas/css/themes/dark.css'| asset}}">
|
|
{% endif %}
|
|
{% elif v %}
|
|
{% if v.theme == 'classic_dark' %}
|
|
<link rel="stylesheet" href="{{('css/themes/classic.css') | asset}}">
|
|
{% endif %}
|
|
|
|
<link rel="stylesheet" href="{{('css/themes/'~v.theme~'.css') | asset}}">
|
|
|
|
{% if v.themecolor == '30409f' %}
|
|
<link rel="stylesheet" href="{{('css/30409f.css') | asset}}">
|
|
{% endif %}
|
|
{% else %}
|
|
<link rel="stylesheet" href="{{('css/themes/'~DEFAULT_THEME~'.css') | asset}}">
|
|
{% endif %}
|
|
|
|
{% if v and v.chud %}
|
|
<link rel="stylesheet" href="{{('css/chud.css') | asset}}">
|
|
{% endif %}
|
|
|
|
{% if not (v and v.poor) %}
|
|
<link rel="stylesheet" href="{{'css/awards.css' | asset}}">
|
|
{% endif %}
|
|
|
|
{% if not (request.path.startswith('/@') and u) %}
|
|
{% if (v and v.background) or (SITE_NAME == 'rDrama' and v and v.chud) %}
|
|
<link rel="stylesheet" href="{{('css/transparent.css') | asset}}">
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% if hole and hole.css and not request.path.endswith('settings') and not request.values.get('nocss') %}
|
|
<link rel="stylesheet" href="/h/{{hole}}/css">
|
|
{% endif %}
|
|
|
|
{% if v and (v.css or v.background) and not request.path.startswith('/settings') %}
|
|
<link rel="stylesheet" href="/@{{v.username}}/css">
|
|
{% endif %}
|
|
{% endmacro %}
|
|
|
|
{% macro seo() %}
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-touch-fullscreen" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
<meta name="format-detection" content="telephone=no">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1, viewport-fit=cover">
|
|
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/icon.webp?x=7">
|
|
<link rel="manifest" href="/assets/manifest_{{SITE_NAME}}.json?x=8">
|
|
<link rel="mask-icon" href="/icon.webp?x=7">
|
|
<link rel="shortcut icon" href="/icon.webp?x=7">
|
|
<meta name="apple-mobile-web-app-title" content="{{SITE_NAME}}">
|
|
<meta name="application-name" content="{{SITE_NAME}}">
|
|
<meta name="msapplication-TileColor" content="#{% if v %}{{v.themecolor}}{% else %}{{DEFAULT_COLOR}}{% endif %}">
|
|
<meta name="msapplication-config" content="/assets/browserconfig.xml?x=7">
|
|
<meta name="theme-color" content="#{{primary}}">
|
|
|
|
{% for size in ('320x480', '640x960', '640x1136', '750x1334', '768x1004', '828x1792',
|
|
'1024x748', '1024x768', '1125x2436', '1242x2208', '1356x2048',
|
|
'1668x2224', '1792x828', '2048x1496', '2048x2732', '2208x1242',
|
|
'2224x1668', '2436x1125', '2668x1242', '2737x2048') %}
|
|
<link rel="apple-touch-startup-image" sizes="{{size}}" href="/icon.webp?x=7">
|
|
{% endfor %}
|
|
{% endmacro %}
|