diff options
Diffstat (limited to '')
| -rw-r--r-- | pydis_site/apps/resources/views/resources.py | 5 | ||||
| -rw-r--r-- | pydis_site/templates/resources/resources.html | 31 | 
2 files changed, 26 insertions, 10 deletions
| diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py index 5b6350de..087cdfb6 100644 --- a/pydis_site/apps/resources/views/resources.py +++ b/pydis_site/apps/resources/views/resources.py @@ -23,12 +23,15 @@ def resource_view(request: HttpRequest) -> HttpResponse:          )      } +    topics = sorted(RESOURCE_META_TAGS.get("topics")) +      return render(          request,          template_name="resources/resources.html",          context={              "checkboxOptions": checkbox_options, -            "topics": sorted(RESOURCE_META_TAGS.get("topics")), +            "topics_1": topics[:len(topics) // 2], +            "topics_2": topics[len(topics) // 2:],              "tag_types": sorted(RESOURCE_META_TAGS.get("type")),              "payment_tiers": sorted(RESOURCE_META_TAGS.get("payment_tiers")),              "complexities": sorted(RESOURCE_META_TAGS.get("complexity")), diff --git a/pydis_site/templates/resources/resources.html b/pydis_site/templates/resources/resources.html index ef4aac8b..fb482345 100644 --- a/pydis_site/templates/resources/resources.html +++ b/pydis_site/templates/resources/resources.html @@ -22,17 +22,30 @@                  <div class="field">                      <div class="columns"> -                        <div class="column pl-6"> +                        <div class="column pl-6 is-two-fifths">                              <div class="title is-5 pt-2 has-text-centered">Topic</div> - -                            {% for topic in topics %} -                            <div class="field"> -                                <label class="checkbox"> -                                    <input name="topicOption" type="checkbox" value="{{ topic }}"{% if topic == 'General' %} checked{% endif %}> -                                    <span class="has-text-grey is-size-6">{{ topic }}</span> -                                </label> +                            <div class="columns"> +                                <div class="column"> +                                    {% for topic in topics_1 %} +                                    <div class="field"> +                                        <label class="checkbox"> +                                            <input name="topicOption" type="checkbox" value="{{ topic }}"{% if topic == 'General' %} checked{% endif %}> +                                            <span class="has-text-grey is-size-6">{{ topic }}</span> +                                        </label> +                                    </div> +                                    {% endfor %} +                                </div> +                                <div class="column"> +                                    {% for topic in topics_2 %} +                                    <div class="field"> +                                        <label class="checkbox"> +                                            <input name="topicOption" type="checkbox" value="{{ topic }}"{% if topic == 'General' %} checked{% endif %}> +                                            <span class="has-text-grey is-size-6">{{ topic }}</span> +                                        </label> +                                    </div> +                                    {% endfor %} +                                </div>                              </div> -                            {% endfor %}                          </div>                          <div class="column pl-6"> | 
