diff options
Diffstat (limited to 'app/templates/packages/list.html')
-rw-r--r-- | app/templates/packages/list.html | 46 |
1 files changed, 37 insertions, 9 deletions
diff --git a/app/templates/packages/list.html b/app/templates/packages/list.html index da0d80c..1cddcd4 100644 --- a/app/templates/packages/list.html +++ b/app/templates/packages/list.html @@ -19,20 +19,48 @@ </p> {% endif %} + <div class="row"> + <div class="col-md-9"> + {% from "macros/packagegridtile.html" import render_pkggrid %} + {{ render_pkggrid(packages) }} - {% from "macros/packagegridtile.html" import render_pkggrid %} - {{ render_pkggrid(packages) }} + {% from "macros/pagination.html" import render_pagination %} + {{ render_pagination(pagination, url_set_query) }} - {% from "macros/pagination.html" import render_pagination %} - {{ render_pagination(pagination, url_set_query) }} + {% if topics %} + <h2 style="margin-top:2em;">More content from the forums</h2> - {% if topics %} - <h2 style="margin-top:2em;">More content from the forums</h2> + {% from "macros/topics.html" import render_topics %} + {{ render_topics(topics, current_user) }} + {% endif %} + </div> - {% from "macros/topics.html" import render_topics %} - {{ render_topics(topics, current_user) }} - {% endif %} + <aside class="col-md-3"> + <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> + </div> {% endblock %} |