diff options
| author | rubenwardy <rw@rubenwardy.com> | 2018-12-22 20:39:34 +0000 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2018-12-22 20:49:19 +0000 |
| commit | 8eedbf64a4c85d9cc8ed61f489f8dcf0e406c56c (patch) | |
| tree | 8db63758ef987f0b2901204684f9f19ec1a74992 /app/templates | |
| parent | c551201f792aa288a49c986aab264f4692e3b478 (diff) | |
| download | cheatdb-8eedbf64a4c85d9cc8ed61f489f8dcf0e406c56c.tar.xz | |
Improve package grid
Diffstat (limited to 'app/templates')
| -rw-r--r-- | app/templates/macros/packagegridtile.html | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/app/templates/macros/packagegridtile.html b/app/templates/macros/packagegridtile.html index 5eb680a..6c79ee6 100644 --- a/app/templates/macros/packagegridtile.html +++ b/app/templates/macros/packagegridtile.html @@ -1,5 +1,5 @@ {% macro render_pkgtile(package, show_author) -%} - <li><a href="{{ package.getDetailsURL() }}" + <li class="packagetile flex-fill"><a href="{{ package.getDetailsURL() }}" style="background-image: url({{ package.getThumbnailURL() or '/static/placeholder.png' }});"> <div class="packagegridscrub"></div> <div class="packagegridinfo"> @@ -34,11 +34,18 @@ {% endmacro %} {% macro render_pkggrid(packages, show_author=True) -%} - <ul class="packagegrid"> + <ul class="d-flex p-0 flex-row flex-wrap justify-content-start align-content-start "> {% for p in packages %} {{ render_pkgtile(p, show_author) }} {% else %} <li><i>No packages available</i></ul> {% endfor %} + {% set amt=packages|length %} + {% if amt > 4 %} + {% set amt=4 %} + {% endif %} + {% for i in range(amt) %} + <li class="packagetile flex-fill"></li> + {% endfor %} </ul> {% endmacro %} |
