 {% if v and v.theme2 %}
 	{% set theme = v.theme2 %}
 {% else %}
 	{% set theme = 'theme-iron dark' %}
 {% endif %}

<!DOCTYPE html>
<html lang="en" class="{{ theme }}">
<head>  
	{% if v and v.agendaposter %}
		<script src="/assets/CHRISTMAS/js/agendaposter.js"></script>
		<noscript>
			<style>
				body {
					-moz-transform: scale(-1, -1);
					-o-transform: scale(-1, -1);
					-webkit-transform: scale(-1, -1);
					transform: scale(-1, -1);
				}
			</style>
		</noscript>
	{% endif %}

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<meta name="thumbnail" content="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/preview.gif">

	<link rel="icon" type="image/png" href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1">
	{% block title %}
	<title>{{'SITE_NAME' | app_config}}</title>

	<meta property="og:type" content="article" >
	<meta property="og:title" content="{{'SITE_NAME' | app_config}}" >
	<meta property="og:site_name" content="{{request.host}}" >
	<meta property="og:image" content="{{'SITE_NAME' | app_config}}/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/preview.gif" >
	<meta property="og:url" content="{{request.path | full_link}}">
	<meta property="og:description" name="description" content="{{'SITE_NAME' | app_config}} - {{'SLOGAN' | app_config}}">
	<meta property="og:author" name="author" content="@{{request.host_url}}" >
	<meta property="og:site_name" content="{{request.host}}" >

	<meta name="twitter:card" content="summary_large_image">
	<meta name="twitter:site" content="@{{request.host_url}}">
	<meta name="twitter:title" content="{{'SITE_NAME' | app_config}}" >
	<meta name="twitter:creator" content="@{{request.host_url}}">
	<meta name="twitter:description" content="{{'SITE_NAME' | app_config}} - {{'SLOGAN' | app_config}}" >
	<meta name="twitter:image" content="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/preview.gif" >
	<meta name="twitter:url" content="{{request.path | full_link}}" >
	{% endblock %}

	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-touch-fullscreen" content="yes">
	<meta name="format-detection" content="telephone=no">
	<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">

	<link rel="apple-touch-icon" sizes="180x180" href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1">
	<!---<link rel="icon" type="image/png" sizes="32x32" href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1">
		<link rel="icon" type="image/png" sizes="16x16" href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1">--->
		<link rel="manifest" href="/assets/CHRISTMAS/manifest.json">
		<link rel="mask-icon" href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1" color="#{{'DEFAULT_COLOR' | app_config}}">
		<link rel="shortcut icon" href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1">
		<meta name="apple-mobile-web-app-title" content="{{'SITE_NAME' | app_config}}">
		<meta name="application-name" content="{{'SITE_NAME' | app_config}}">
		<meta name="msapplication-TileColor" content="#{{'DEFAULT_COLOR' | app_config}}">
		<meta name="msapplication-config" content="/assets/CHRISTMAS/images/browserconfig.xml">
		<meta name="theme-color" content="#{{'DEFAULT_COLOR' | app_config}}">

		<link
		rel="apple-touch-startup-image"
		sizes="320x480"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="640x960"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-icon"
		sizes="640x1136"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-icon"
		sizes="750x1334"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="768x1004"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="768x1024"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="828x1792"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="1024x748"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="1024x768"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="1125x2436"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="1242x2208"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="1242x2688"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="1334x750"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="1536x2008"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="1536x2048"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="1668x2224"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="1792x828"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="2048x1496"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="2048x1536"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="2048x2732"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="2208x1242"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="2224x1668"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="2436x1125"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="2668x1242"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>
		<link
		rel="apple-touch-startup-image"
		sizes="2737x2048"
		href="/assets/CHRISTMAS/images/{{'SITE_NAME' | app_config}}/icon.webp?a=1"
		>

		{% block stylesheets %}

		<link rel="stylesheet" href="/static/assets/CHRISTMAS/css/main.css?a=10">

      	<link rel="stylesheet" href="/static/dist/main.css?a=15">

		{% if v %}
			<style>:root{--primary:#dc2626}</style>
			<!-- <style>:root{--primary:#{{v.themecolor}}}</style> -->
			<!-- <link rel="stylesheet" href="/assets/CHRISTMAS/css/{{v.theme}}.css?a=1"> -->
			{% if v.agendaposter %}
			<link rel="stylesheet" href="/static/assets/CHRISTMAS/css/agendaposter.css?a=1">
			{% elif v.css %}
			<link rel="stylesheet" href="/@{{v.username}}/css">
			{% endif %}
		{% else %}
			<style>:root{--primary:#dc2626}</style>
			<!-- <style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}}</style> -->
			<!-- <link rel="stylesheet" href="/assets/CHRISTMAS/css/{{'DEFAULT_THEME' | app_config}}.css?a=1"> -->
		{% endif %}

		{% endblock %}

		<link href="/static/assets/CHRISTMAS/css/fa.css?a=1" rel="stylesheet"> 

 </head>

 <body id="{% if request.path != '/comments' %}{% block pagetype %}frontpage{% endblock %}{% endif %}" class="overflow-hidden overflow-y-auto antialiased text-black bg-gray-700 dark:text-gray-100">

{% block Banner %}
{% endblock %}

{% include "CHRISTMAS/header-tw.html" %}

{% block mobileUserBanner %}
{% endblock %}

{% block mobileBanner %}
{% endblock %}

{% block postNav %}
{% endblock %}

<div class="flex h-full pt-20 bg-gray-500 dark:bg-gray-700 dark:text-gray-200">
	<div class="w-full">

			{% block desktopUserBanner %}
			{% endblock %}

			{% block desktopBanner %}
			{% endblock %}

		<div class="md:px-4 bg-gray-700" id="sub-header-row">
			{% block subHeader %}
			{% endblock %}
		</div>

		{% block subHeader2 %}
		{% endblock %}

		<div class="w-full md:px-4">
			<div class="w-full max-w-screen-2xl mx-auto mb-4 md:px-4 grid grid-cols-12 gap-6 bg-gray-300 md:bg-gray-200 dark:bg-gray-800 rounded-b" id="main-content-row">

				{% block searchText %}
				{% endblock %}

				{% block content %}
				{% endblock %}

				{% block pagenav %}
				{% endblock %}

				{% block sidebar %}
				{% endblock %}
			</div>
		</div>

		{% include "CHRISTMAS/footer.html" %}
	</div>
</div>

{% if v %}
	<div id="formkey" class="hidden">{{ v.formkey }}</div>
{% endif %}

{% include "CHRISTMAS/ProfilePopover.html" %}

{% block mobilenavbar %}
	{% include "CHRISTMAS/mobile_navigation_bar.html" %}
{% endblock %}

{% block actionsModal %}{% endblock %}

{% block reportCommentModal %}{% endblock %}

{% block GIFtoast %}{% endblock %}

{% block GIFpicker %}{% endblock %}

<!-- Import toast notifications -->
{% include "CHRISTMAS/toasts/toasts.html" %}

{% block modals %}{% endblock %}

{% if v %}
	{% include "CHRISTMAS/modals/ModalThemePicker.html" %}
	{% include "CHRISTMAS/modals/ModalDirectMessage.html" %}
{% endif %}

{% block popovers %}{% endblock %}

{% block fixedMobileBarJS %}{% endblock %}

{% block scripts %}{% endblock %}

<!-- Scripts -->
<script src="/static/assets/CHRISTMAS/js/header.js?a=2"></script>

<!-- Lazy Loading -->
<script src="/static/assets/CHRISTMAS/js/lozad.js?a=1"></script>
<script>
	const observer = lozad();
	observer.observe();
</script>

<!-- Bootstrap -->
<script src="/static/assets/CHRISTMAS/js/bootstrap.js"></script>

<!-- Clipboard JS -->
<script src="/static/assets/CHRISTMAS/js/clipboard.js"></script>
<script>
	var clipboard = new ClipboardJS('.copy-link');
	clipboard.on('success', function(e) {
			var myToast = new bootstrap.Toast(document.getElementById('toast-success'));
			myToast.show();
			console.log(e);
	});
</script>

<link rel="stylesheet" href="/static/assets/CHRISTMAS/css/lite-youtube.css?a=1">
<script src="/static/assets/CHRISTMAS/js/lite-youtube.js?a=1"></script>

<script src="/static/assets/CHRISTMAS/js/gif_modal.js?a=1"></script>
<script src="/static/assets/CHRISTMAS/js/emoji_modal.js?a=18"></script>

<script defer src="/static/assets/CHRISTMAS/js/popover.js?a=58"></script>

<script src="/static/assets/CHRISTMAS/js/mobile_navigation_bar.js?a=1"></script>

{% if v %}
	<script>function formkey() {return '{{v.formkey}}';}</script>

	<script>
		var previousTheme = '{{ v.theme2 }}'.split(' ');
		function changeTheme(theme) {
			const root = document.documentElement
			// if previous selection has a value, remove them from root html tag
			if (previousTheme.length) {
				previousTheme.map(v => root.classList.toggle(v));
			}
			// toggle classes in root html tag
			theme.map(v => root.classList.toggle(v));
			// Set global previous selection to current selection
			previousTheme = theme;
		}
	</script>
{% endif %}
	<script src="/static/assets/CHRISTMAS/js/default.js?a=41"></script>

</body>
</html>
