aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/templates/content/listing.html
blob: e2c27b1748badae54ccbb41256690254e5aa47ec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{# Base navigation screen for resources #}
{% extends 'content/base.html' %}
{% load static %}

{# Show a GitHub button on tag pages #}
{% if is_tag_listing %}
{% block title_element %}
    <link rel="stylesheet" href="{% static "css/content/color.css" %}">
    <div class="level">
        <div class="level-left">{{ block.super }}</div>
        <div class="level-right">
            <a class="level-item fab fa-github" href="{{ tag_url }}"></a>
        </div>
    </div>
{% endblock %}
{% endif %}

{% block page_content %}
    {# Nested Categories #}
    {% for category, data in categories.items %}
        <div class="box has-background-white" style="max-width: 800px;">
            <span class="icon is-size-4 is-medium">
                <i class="{{ data.icon|default:"fas fa-folder" }} is-size-3 is-black has-icon-padding" aria-hidden="true"></i>
            </span>

            <a href="{% url "content:page_category" location=path|add:category %}">
                <span class="is-size-4 has-text-weight-bold">{{ data.title }}</span>
            </a>
            <p class="is-italic">{{ data.description }}</p>
        </div>
    {% endfor %}

    {# Single Pages #}
    {% for page, data in pages.items %}
        <div class="box has-background-white" style="max-width: 800px;">
            <span class="icon is-size-4 is-medium">
                <i class="{{ data.icon|default:"fab fa-python" }} is-size-3 is-black has-icon-padding" aria-hidden="true"></i>
            </span>
            <a href="{% url app_name location=path|add:page %}">
                <span class="is-size-4 has-text-weight-bold">{{ data.title }}</span>
            </a>
            {% if is_tag_listing %}
                <div class="tag-container">{{ data.description | safe }}</div>
            {% else %}
                <p class="is-italic">{{ data.description }}</p>
            {% endif %}
        </div>
    {% endfor %}
    <script src="{% static 'js/content/listing.js' %}"></script>
{% endblock %}