aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/templates/resources/resource_box.html
blob: 301da10f14bb78601e97cd509692c7c934e3d8e9 (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
{% load as_icon %}

<div class="box" style="max-width: 800px;">
    {% if 'title_url' in resource %}
        <a href="{{ resource.title_url }}">
            {% include "resources/resource_box_header.html" %}
        </a>
    {% else %}
        {% include "resources/resource_box_header.html" %}
    {% endif %}

    {# Payment information section #}
    {% if 'payment' in resource %}
        <span class="fa-stack fa-1x payment-{{ resource.payment }}{% if 'payment_description' in resource and resource.payment_description != None %} has-tooltip-arrow has-tooltip-multiline" data-tooltip="{{ resource.payment_description }}"{% endif %}">
            <i class="far fa-sack-dollar fa-stack-{% if resource.payment == "free" %}1{% else %}2{% endif %}x"></i>
            {% if resource.payment == "free" %}
                <i class="far fa-ban fa-stack-2x"></i>
            {% endif %}
        </span>
    {% endif %}

    <p class="is-italic">{{ resource.description|safe }}</p>

    {# Icons #}
    {% for icon in resource.urls %}
        <span class="icon is-size-4 is-medium" style="margin: 5px;">
            <a href="{{ icon.url }}">
                <i class="{{ icon.icon|as_icon }} is-size-3 resource-icon is-{{ icon.color }}"></i>
            </a>
        </span>
    {% endfor %}
</div>