<!doctype html>

{% load static i18n %}

<html lang="en" data-bs-theme="auto">
<head>
	<meta charset="utf-8">
	<title>Paperless-ngx</title>
	<base href="{% url 'base' %}">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="cookie_prefix" content="{{cookie_prefix}}">
	<meta name="robots" content="noindex,nofollow">
	<meta name="author" content="The Paperless-ngx Team">
	<link rel="icon" type="image/x-icon" href="favicon.ico">
	<link rel="manifest" href="{% static webmanifest %}">
	<link rel="stylesheet" href="{% static styles_css %}">
	<link rel="apple-touch-icon" href="{% static apple_touch_icon %}">
</head>
<body>
	<pngx-root>
		<script type="text/javascript">
			setTimeout(() => {
				let warning = document.getElementsByClassName('warning').item(0)
				if (warning) {
					warning.classList.remove('hide')
					warning.classList.add('show')
				}
			}, 8000)
		</script>
		<style type="text/css">
			html, body {
				width: 100%;
				height: 100%;
			}

			@keyframes pulsate {
				0% {
					opacity: 0.1;
				}
				50% {
					opacity: 0.3;
				}
				100% {
					opacity: 0.1;
				}
			}

			.app-loader svg, .app-loader h6 {
				opacity: 0.1;
				animation: pulsate 2s ease-out;
				animation-iteration-count: infinite;
			}

			svg.logo .leaf {
				fill: var(--bs-body-color) !important;
			}
		</style>
		<div class="bg-light w-100 h-100 d-flex align-items-center">
			<div class="app-loader align-self-center text-center mx-auto">
				{% include "paperless-ngx/snippets/svg_logo.html" with extra_attrs="class='logo mb-2' height='6em'" %}
				<h6 class="m-auto">{% translate "Paperless-ngx is loading..." %}</h6>
				<p class="warning m-auto mt-3 small fade hide">{% translate "Still here?! Hmm, something might be wrong." %} <a href="https://docs.paperless-ngx.com">{% translate "Here's a link to the docs." %}</a></p>
			</div>
		</div>
		<script type="text/javascript">{# Pass Django messages to Angular frontend #}
			window.DJANGO_MESSAGES = [
				{% for message in messages %}
					{ level: "{{ message.level_tag | escapejs }}", message: "{{ message | escapejs }}" },
				{% endfor %}
			]
		</script>
	</pngx-root>
	<script src="{% static runtime_js %}" defer></script>
	<script src="{% static polyfills_js %}" defer></script>
	<script src="{% static main_js %}" defer></script>
</body>
</html>
