<!--

    Queue - A Queueing system that can be used to handle labs in higher education
    Copyright (C) 2016-2024  Delft University of Technology

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    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 Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

-->
<!DOCTYPE html>
<html lang="en" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{container}">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Support Page</title>
    </head>
    <body>
        <main layout:fragment="content">
            <h1 class="font-800 mb-5">Support</h1>
            <div class="page">
                <p>
                    If you are a student with course-related questions, please seek assistance from the teaching assistants or course staff, or
                    contact them via the course email.
                </p>
                <p class="mb-6">For further assistance, please try the options below.</p>

                <div class="flex vertical">
                    <div class="surface">
                        <a class="link font-400" href="https://mattermost.tudelft.nl/educational-software-support/channels/queue" target="_blank">
                            Queue Support Channel
                        </a>
                        <p>Available on Mattermost, where you can report bugs, request new features, or share your suggestions publicly.</p>
                    </div>
                    <div class="surface">
                        <a id="email" class="link font-400" href="mailto: support-eip-ewi@badmail.nl">Email</a>
                        <p>
                            For the same support as on Mattermost, or for more personal help with educator-related questions, such as setting up
                            courses.
                        </p>
                    </div>
                    <div class="surface">
                        <a class="link font-400" href="https://gitlab.ewi.tudelft.nl/eip/labrador/queue" target="_blank">Queue Repository</a>
                        <p>
                            Accessible on GitLab as an open-source project where you can create issues to report bugs, request features, or
                            <th:block>
                                <a
                                    class="link"
                                    href="https://gitlab.ewi.tudelft.nl/eip/labrador/queue/-/blob/development/CONTRIBUTING.md"
                                    target="_blank">
                                    contribute
                                </a>
                            </th:block>
                            yourself.
                        </p>
                    </div>
                </div>
            </div>
            <script>
                document.addEventListener("DOMContentLoaded", function () {
                    //done to prevent mail scraping
                    document.getElementById("email").addEventListener("click", function (e) {
                        e.preventDefault();
                        const href = this.getAttribute("href");
                        console.error(href);
                        const updatedHref = href.replace("badmail", "tudelft");
                        this.setAttribute("href", updatedHref);
                        window.location.href = updatedHref;
                    });
                    document.getElementById("email").addEventListener("mouseover", function (e) {
                        e.preventDefault();
                        const href = this.getAttribute("href");
                        console.error(href);
                        const updatedHref = href.replace("badmail", "tudelft");
                        this.setAttribute("href", updatedHref);
                    });
                });
            </script>
        </main>
    </body>
</html>
