MarseyWorld/files/templates/root.html

82 lines
3.8 KiB
HTML

{% set root_scope = namespace() %}
{% block template_config %}
{% set root_scope.include_cf_2fa_verify = false %}
{% endblock %}
{%- import 'util/macros.html' as macros with context -%}
{%- import 'util/html_head.html' as html_head with context -%}
{%- if IS_HOMOWEEN() -%}
{% set primary="f66a3c" %}
{%- elif IS_FISTMAS() -%}
{% set primary="cc4145" %}
{%- elif IS_DKD() -%}
{% set primary="2aaa8a" %}
{%- elif v -%}
{% set primary=v.themecolor %}
{%- else -%}
{% set primary=DEFAULT_COLOR %}
{%- endif -%}
{% set primary_rgb = primary|rgb %}
<!DOCTYPE html>
<html lang="en" style="--primary:#{{primary}};--primary_rgb:{{primary_rgb}}">
<head>
{% block head %}
<meta charset="utf-8">
{% block title -%}
<title>{% block pagetitle %}if you see this pls report it as a bug &lt;3{% endblock %} - {{SITE_NAME}}</title>
{%- endblock %}
{{html_head.seo()}}
{{html_head.page_meta(self.pagetitle() or none)}}
{{html_head.javascript()}}
{{html_head.stylesheets()}}
{{html_head.cf_2fa_verify() if root_scope.include_2fa_verify}}
{% block head_final %}{% endblock %}
{% endblock %}
</head>
<body {% block body_attributes %}id="{% block pagetype %}{% endblock %}"{% endblock %}>
{% if IS_HOMOWEEN() and ((v and v.jumpscare) or request.path.startswith('/shop/')) %}
{% set image_src = SITE_FULL_IMAGES ~ "/assets/events/homoween/images/jumpscares/" ~ listdir("files/assets/events/homoween/images/jumpscares")|random() ~ "?x=45" %}
<img src="{{image_src}}" id="jumpscare-img" style="display: none">
{% set audio_src = "/assets/events/homoween/audio/jumpscares/" ~ listdir("files/assets/events/homoween/audio/jumpscares")|random() ~ "?x=45" %}
<audio id="jumpscare-audio" preload="none" src="{{audio_src}}"></audio>
<script defer src="{{'events/homoween/js/jumpscare.js' | asset}}"></script>
{% endif %}
<input hidden id="gnonce" value="{{g.nonce}}">
<input hidden id="gbrowser" value="{{g.browser}}">
<input hidden id="IMAGE_FORMATS" value="{{IMAGE_FORMATS}}">
<input hidden id="approved_embed_hosts" value="{{approved_embed_hosts}}">
<input hidden id="SITE_FULL_IMAGES" value="{{SITE_FULL_IMAGES}}">
{% if v %}
<input hidden id="MAX_IMAGE_AUDIO_SIZE_MB" value="{{MAX_IMAGE_AUDIO_SIZE_MB}}">
<input hidden id="MAX_IMAGE_AUDIO_SIZE_MB_PATRON" value="{{MAX_IMAGE_AUDIO_SIZE_MB_PATRON}}">
<input hidden id="MAX_VIDEO_SIZE_MB" value="{{MAX_VIDEO_SIZE_MB}}">
<input hidden id="MAX_VIDEO_SIZE_MB_PATRON" value="{{MAX_VIDEO_SIZE_MB_PATRON}}">
<input hidden id="vpatron" value="{{v.patron}}">
{% endif %}
<script src="{{'js/top.js' | asset}}"></script>
{% block body required %}{% endblock %}
<script defer src="{{'js/bottom.js' | asset}}"></script>
{% if (v and v.cursormarsey) or (not v and CURSORMARSEY_DEFAULT) %}
<div id="cursormarsey"></div>
<div id="cursormarsey-heart" class="d-none"></div>
<script defer src="{{'js/cursormarsey.js' | asset}}"></script>
{% endif %}
<script defer src="{{'js/pwa_pulltorefresh.js' | asset}}"></script>
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 10000000000" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body bg-success text-center text-white">
<i class="fas fa-comment-alt-smile mr-2"></i><span id="toast-post-success-text">Action successful!</span>
</div>
</div>
<div class="toast" id="toast-post-error" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 10000000000" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body bg-danger text-center text-white">
<i class="fas fa-exclamation-circle mr-2"></i><span id="toast-post-error-text">Error, please refresh the page and try again.</span>
</div>
</div>
</body>
</html>