1 {% macro render_pkgtile(package, show_author) -%}
2 <li class="packagetile flex-fill"><a href="{{ package.getDetailsURL() }}"
3 style="background-image: url({{ package.getThumbnailURL() or '/static/placeholder.png' }});">
4 <div class="packagegridscrub"></div>
5 <div class="packagegridinfo">
9 {% if show_author %}<br />
10 <small>{{ package.author.display_name }}</small>
15 {{ package.shortDesc }}
19 {% if not package.license.is_foss and not package.media_license.is_foss and package.type != package.type.TXP %}
20 <p style="color:#f33;">
21 <b>Warning:</b> Non-free code and media.
23 {% elif not package.license.is_foss and package.type != package.type.TXP %}
24 <p style="color:#f33;">
25 <b>Warning:</b> Non-free code.
27 {% elif not package.media_license.is_foss %}
28 <p style="color:#f33;">
29 <b>Warning:</b> Non-free media.
36 {% macro render_pkggrid(packages, show_author=True) -%}
37 <ul class="d-flex p-0 flex-row flex-wrap justify-content-start align-content-start ">
38 {% for p in packages %}
39 {{ render_pkgtile(p, show_author) }}
41 <li><i>No packages available</i></ul>
43 {% for i in range(4) %}
44 <li class="packagetile flex-fill"></li>