<!DOCTYPE html>
<html lang="{{ trans('config.html_language') }}">
<head>
    <base href="{{ route('index') }}/">
    <meta charset="UTF-8">
    <meta name="robots" content="noindex, nofollow, noarchive, noodp, NoImageIndex, noydir">
    <title>Firefly III</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <meta name="apple-mobile-web-app-capable" content="yes">

    {# CSS things #}

    {# libraries #}
    <link href="v1/lib/bs/css/bootstrap.min.css?v={{ FF_BUILD_TIME }}" rel="stylesheet" type="text/css" nonce="{{ JS_NONCE }}">
    <link href="v1/lib/fa/css/font-awesome.min.css?v={{ FF_BUILD_TIME }}" rel="stylesheet" type="text/css" nonce="{{ JS_NONCE }}">

    {# the theme #}
    <link href="v1/lib/adminlte/css/AdminLTE.min.css?v={{ FF_BUILD_TIME }}" rel="stylesheet" type="text/css" nonce="{{ JS_NONCE }}">
    {% if 'browser' == darkMode %}
        <meta name="color-scheme" content="light dark">
        <script nonce="{{ JS_NONCE }}">
            // If `prefers-color-scheme` is not supported, fall back to light mode.
            // In this case, light.css will be downloaded with `highest` priority.
            if (window.matchMedia('(prefers-color-scheme: dark)').media === 'not all') {
                document.documentElement.style.display = 'none';
                document.head.insertAdjacentHTML(
                    'beforeend',
                    '<link rel="stylesheet" href="v1/lib/adminlte/css/skins/skin-light.min.css?v={{ FF_BUILD_TIME }}" nonce="{{ JS_NONCE }}" onload="document.documentElement.style.display = \'\'">',
                );
            }
        </script>
        <link href="v1/lib/adminlte/css/skins/skin-dark.min.css?v={{ FF_BUILD_TIME }}" rel="stylesheet" type="text/css" nonce="{{ JS_NONCE }}" media="(prefers-color-scheme: dark)">
        <link href="v1/lib/adminlte/css/skins/skin-light.min.css?v={{ FF_BUILD_TIME }}" rel="stylesheet" type="text/css" nonce="{{ JS_NONCE }}" media="(prefers-color-scheme: light)">
    {% endif %}
    {% if 'dark' == darkMode %}
        <meta name="color-scheme" content="dark">
        <link href="v1/lib/adminlte/css/skins/skin-dark.min.css?v={{ FF_BUILD_TIME }}" rel="stylesheet" type="text/css" nonce="{{ JS_NONCE }}">
    {% endif %}
    {% if 'light' == darkMode %}
        <meta name="color-scheme" content="light">
        <link href="v1/lib/adminlte/css/skins/skin-light.min.css?v={{ FF_BUILD_TIME }}" rel="stylesheet" type="text/css" nonce="{{ JS_NONCE }}">
    {% endif %}

    {# Firefly III customisations #}
    <link href="v1/css/firefly.css?v={{ FF_BUILD_TIME }}" rel="stylesheet" type="text/css" nonce="{{ JS_NONCE }}">

    <!--[if lt IE 9]>
    <script src="v1/js/lib/html5shiv.min.js?v={{ FF_BUILD_TIME }}" nonce="{{ JS_NONCE }}"></script>
    <script src="v1/js/lib/respond.min.js?v={{ FF_BUILD_TIME }}" nonce="{{ JS_NONCE }}"></script>
    <![endif]-->

    {# favicons #}
    {% include('partials.favicons') %}

</head>
<body class="login-page">
<div class="login-box">
    <div class="login-logo">
        <a href="{{ route('index') }}"><strong>Firefly</strong>III</a>
    </div>
    {% block content %}{% endblock %}
</div>

<script src="v1/js/app.js?v={{ FF_BUILD_TIME }}" type="text/javascript" nonce="{{ JS_NONCE }}"></script>

{% if config('firefly.tracker_site_id') != '' and config('firefly.tracker_url') != '' %}
    <!-- This tracker tag is only here because this instance of Firefly III was purposefully configured to include it -->
    <!-- Your own installation will NOT include it, unless you explicitly configure it to have it. -->
    <script type="text/javascript" nonce="{{ JS_NONCE }}">
        var _paq = window._paq || [];
        _paq.push(['trackPageView']);
        _paq.push(['enableLinkTracking']);
        (function () {
            var u = "//{{ config('firefly.tracker_url') }}/";
            _paq.push(['setTrackerUrl', u + 'matomo.php']);
            _paq.push(['setSiteId', '{{ config('firefly.tracker_site_id') }}']);
            var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
            g.type = 'text/javascript';
            g.async = true;
            g.defer = true;
            g.src = u + 'matomo.js';
            s.parentNode.insertBefore(g, s);
        })();
    </script>
    <noscript><p><img src="//{{ config('firefly.tracker_url') }}/matomo.php?idsite={{ config('firefly.tracker_site_id') }}&amp;rec=1" class="no-border" alt=""/></p></noscript>
{% endif %}

</body>
</html>
