{% extends "layout/landing_page.html" %}

{% load i18n %}
{% load event_tags %}

{% block landing_content %}
    <div class="{{ event.get_bg_color }} w3-padding-24"></div>

    <div class="w3-content w3-container w3-padding-64" id="home">
        <h3 class="w3-center">Tvoje registrace na {{ event.name }}</h3>
        <div class="w3-row">
            {% for registration in registrations %}
               <p>{{ registration }}</p>
            {% empty %}
                <p class="w3-center">Nemáš žádné registrace na tomto závodu.</p>
            {% endfor %}
        </div>


    </div>






    <hr>
    {% include 'layout/landing_footer.html' %}
{% endblock %}

{% block js %}
    <script>


        // Change style of navbar on scroll
        window.onscroll = function () {
            myFunction()
        };

        function myFunction() {
            let navbar = document.getElementById("myNavbar");
            if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
                navbar.className = "w3-bar" + " w3-card" + " w3-animate-top" + " w3-white";
            } else {
                navbar.className = navbar.className.replace(" w3-card w3-animate-top w3-white", "");
            }
        }

        // Used to toggle the menu on small screens when clicking on the menu button
        function toggleFunction() {
            let x = document.getElementById("navDemo");
            if (x.className.indexOf("w3-show") === -1) {
                x.className += " w3-show";
            } else {
                x.className = x.className.replace(" w3-show", "");
            }
        }
    </script>
{% endblock %}