{% extends 'endpoints/base.html' %}
{% load static %}
{% block title %}Endpoints{% endblock %}

{% block main %}
    <div id="content" class="fcc flex-grow-1 maxw-800px mx-auto" data-bs-theme="dark">
        <h1 class="text-center">ENDPOINTS</h1>
        <div class="fr flex-wrap gap-4">
            <div class="fc">
                <h3 class="mt-3 mb-0">Service</h3>
                <ul>
                    {% for link in custom_links %}
                        <li><a class="text-decoration-none" href="{{ link.url }}">{{ link.name }}</a></li>
                    {% endfor %}
                </ul>
            </div>
            {% for app_name, urls in app_urls.items %}
                {% if app_name != 'admin' %}
                    <div class="fc">
                        <h3 class="mt-3 mb-0">{{ app_name|capfirst }}</h3>
                        <ul>
                            {% for url in urls %}
                                <li><a class="text-decoration-none" href="/{{ url }}">{{ url }}</a></li>
                            {% endfor %}
                        </ul>
                    </div>
                {% endif %}
            {% endfor %}
            <div class="fc">
                <h3 class="mt-3 mb-0">Media</h3>
                <ul>
                    {% for url in media_urls %}
                        <li><a class="text-decoration-none" href="/{{ url }}">{{ url }}</a></li>
                    {% endfor %}
                </ul>
            </div>
            <div class="fc">
                <h3 class="mt-3 mb-0">Static</h3>
                <ul>
                    {% for url in static_urls %}
                        <li><a class="text-decoration-none" href="/{{ url }}">{{ url }}</a></li>
                    {% endfor %}
                </ul>
            </div>
        </div>
    </div>
{% endblock %}
