{% extends "../base.html" %}

{% block body %}
    <style>#pages-list li{margin-top:0.2rem;}</style>
    {% if quote_data %}
        <a class="no-style-a"
           href="{{fix_url(quote_data.get_quote_url())}}"
           tooltip="Das Zitat des Tages"
           tooltip-position="bottom"
           style="text-align:center">
            {{quote_data.wrong_quote.quote}}<br>
            - {{quote_data.wrong_quote.author}}
        </a>
    {% end %}
    <ul class="list" id="pages-list">
        {% for info in handler.settings.get("MODULE_INFOS") %}
            {% if not (info.hidden or not info.path or info.path == "/") %}
                <li>
                    <a href="{{fix_url(info.path)}}">{{info.name}}</a>:
                    {{info.description}}

                    {% if info.sub_pages %}
                        <ul class="sub-list">
                            {% for page_info in info.sub_pages %}
                                {% if not page_info.hidden and page_info.path %}
                                    <li>
                                        <a href="{{fix_url(page_info.path)}}"
                                            >{{page_info.name}}</a>:
                                        {{page_info.description}}
                                    </li>
                                {% end %}
                            {% end %}
                        </ul>
                    {% end %}
                </li>
            {% end %}
        {% end %}
    </ul>

    {% if settings.get("ONION_ADDRESS") and not request.host_name.endswith(".onion") %}
        <section style="margin-top:2rem">
            Wir sind übrigens auch über das Tor-Netzwerk erreichbar:
            <a href="{{settings.get('ONION_ADDRESS')}}"
               no-dynload>{{'­'.join(char for char in settings.get('ONION_ADDRESS'))}}</a>
        </section>
    {% end %}
{% end %}
