aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-07-12 20:19:00 +0100
committerrubenwardy <rw@rubenwardy.com>2020-07-12 20:19:00 +0100
commitec087e468793b2ca495366f97157f546a8319208 (patch)
treeb4f3c0e45be5ce88e3724d04e8b1df49a61db532 /app
parentae4352068ef6f3e014be6695cbddcf914013fd1b (diff)
downloadcheatdb-ec087e468793b2ca495366f97157f546a8319208.tar.xz
Move tag list to top of package list page
Diffstat (limited to 'app')
-rw-r--r--app/templates/packages/list.html69
1 files changed, 33 insertions, 36 deletions
diff --git a/app/templates/packages/list.html b/app/templates/packages/list.html
index 1cddcd4..e272782 100644
--- a/app/templates/packages/list.html
+++ b/app/templates/packages/list.html
@@ -19,48 +19,45 @@
</p>
{% endif %}
- <div class="row">
- <div class="col-md-9">
- {% from "macros/packagegridtile.html" import render_pkggrid %}
- {{ render_pkggrid(packages) }}
-
-
- {% from "macros/pagination.html" import render_pagination %}
- {{ render_pagination(pagination, url_set_query) }}
-
+ <aside class="mb-5">
+ <p class="text-muted">Filter by tags</p>
+
+ {% for pair in tags %}
+ {% set count = pair[0] %}
+ {% set tag = pair[1] %}
+
+ {% if tag in selected_tags %}
+ <a class="badge badge-primary"
+ href="{{ url_set_query(page=1, _remove={ 'tag': tag.name }) }}">
+
+ {{ tag.title }}
+ ({{ count }})
+ </a>
+ {% else %}
+ <a class="badge badge-secondary"
+ href="{{ url_set_query(page=1, _add={ 'tag': tag.name }) }}">
+
+ {{ tag.title }}
+ ({{ count }})
+ </a>
+ {% endif %}
+ {% endfor %}
+ </aside>
- {% if topics %}
- <h2 style="margin-top:2em;">More content from the forums</h2>
+ {% from "macros/packagegridtile.html" import render_pkggrid %}
+ {{ render_pkggrid(packages) }}
- {% from "macros/topics.html" import render_topics %}
- {{ render_topics(topics, current_user) }}
- {% endif %}
- </div>
- <aside class="col-md-3">
- <p class="text-muted">Filter by tags</p>
+ {% from "macros/pagination.html" import render_pagination %}
+ {{ render_pagination(pagination, url_set_query) }}
- {% for pair in tags %}
- {% set count = pair[0] %}
- {% set tag = pair[1] %}
- {% if tag in selected_tags %}
- <a class="badge badge-primary"
- href="{{ url_set_query(page=1, _remove={ 'tag': tag.name }) }}">
+ {% if topics %}
+ <h2 style="margin-top:2em;">More content from the forums</h2>
- {{ tag.title }}
- ({{ count }})
- </a>
- {% else %}
- <a class="badge badge-secondary"
- href="{{ url_set_query(page=1, _add={ 'tag': tag.name }) }}">
+ {% from "macros/topics.html" import render_topics %}
+ {{ render_topics(topics, current_user) }}
+ {% endif %}
- {{ tag.title }}
- ({{ count }})
- </a>
- {% endif %}
- {% endfor %}
- </aside>
- </div>
{% endblock %}