<!--
SPDX-FileCopyrightText: 2024 Nicco Kunzmann and Open Web Calendar Contributors <https://open-web-calendar.quelltext.eu/>

SPDX-License-Identifier: GPL-2.0-only
-->

<!doctype html>
<html lang="{{ language }}">
    <!-- Mostly copied from https://docs.dhtmlx.com/scheduler/howtostart_nodejs.html#step2addingschedulertothepage -->
    <head>
        <title>{{ specification["title"] | safe }}</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="icon" type="image/x-icon" href="{{ specification["favicon"] }}">
        <link rel="alternate" type="text/calendar" href="/calendar.ics{{ get_query_string() }}" />
        <link href="css/index.css"
            rel="stylesheet" type="text/css" charset="utf-8">

        <script type="text/javascript">
            const specification = {{ specification | tojson | safe }};
            const language = {{ language | tojson }};
        </script>
        <script src="configuration.js"></script>
        <script src="js/common.js"></script>
        <script src="js/about.js"></script>
    </head>
    <body>
        <header>
            <a href="/calendar.html{{ get_query_string() | safe }}"><h1>{{ specification["title"] | safe }}</h1></a>
        </header>
        <main>
            <p class="description">
                {{ specification["description"] or html("description") }}
            </p>
            <ul>
                <li><a href="/calendar.html{{ get_query_string() | safe }}">{{ html("links-website") }}</a></li>
                <li><a href="/calendar.ics{{ get_query_string() | safe }}">{{ html("links-ics") }}</a></li>
                <li><a href="/calendar.spec{{ get_query_string() | safe }}">{{ html("links-spec") }}</a></li>
                <li><a href="/index.html{{ get_query_string() | safe }}">{{ html("links-edit") }}</a></li>
                <li>
                    {{ html("timezone-choice") }}
                    <select id="select-timezone" onchange="loadCalendarInDifferentTimeZone()">
                    </select>
                    {{ html("timezone-browser") }}
                    <span class="timezone-of-browser"">{{ html("index.loading") }}</span>
                </li>
            </ul>
            <h2>{{ html("project-title") }}</h2>
            <p class="description">
                {{ html("project-description") }}
            </p>
            <ul>
                <li><a href="{{ specification["contributing"] | safe }}">{{ html("improve") }}</a></li>
                <li>
                    <a href="{{ specification["source_code"] | safe }}">{{ html("source-code") }}</a>
                    {{ html("version").format(version=
                        specification["version"] if specification["version"] else configuration["version"]
                        )
                    }}
                </li>
                <li><a href="{{ specification["privacy_policy"] | safe }}">{{ html("privacy-policy") }}</a></li>
            </ul>
            <h2>{{ html("license") }}</h2>
            <p>
                Open Web Calendar<br/>
                Copyright (C) 2019  Nicco Kunzmann
            <p>
            </p>
                dhtmlxScheduler v.5.1.6 Standard<br/>
                (C) Dinamenta, UAB.
            <p>
            </p>
                This program is free software; you can redistribute it and/or modify
                it under the terms of the GNU General Public License as published by
                the Free Software Foundation; either version 2 of the License.
            <p>
            </p>
                This program is distributed in the hope that it will be useful,
                but WITHOUT ANY WARRANTY; without even the implied warranty of
                MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                GNU General Public License for more details.
            <p>
            </p>
                You should have received a copy of the GNU General Public License along
                with this program; if not, write to the Free Software Foundation, Inc.,
                51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
            </p>
        </main>
    </body>
</html>
