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.short_desc }}
18 {% if not package.license.is_foss and not package.media_license.is_foss and package.type != package.type.TXP %}
19 <p style="color:#f33;">
20 <b>Warning:</b> Non-free code and media.
22 {% elif not package.license.is_foss and package.type != package.type.TXP %}
23 <p style="color:#f33;">
24 <b>Warning:</b> Non-free code.
26 {% elif not package.media_license.is_foss %}
27 <p style="color:#f33;">
28 <b>Warning:</b> Non-free media.
35 {% macro render_pkggrid(packages, show_author=True) -%}
36 <ul class="d-flex p-0 flex-row flex-wrap justify-content-start align-content-start ">
37 {% for p in packages %}
38 {{ render_pkgtile(p, show_author) }}
40 <li class="packagetile flex-fill"><i>No packages available</i></li>
43 {% for i in range(4) %}
44 <li class="packagetile flex-fill"></li>