2018-05-29 23:58:46 +02:00
|
|
|
{% macro render_pkgtile(package, show_author) -%}
|
2018-12-22 21:39:34 +01:00
|
|
|
<li class="packagetile flex-fill"><a href="{{ package.getDetailsURL() }}"
|
2018-05-29 17:19:17 +02:00
|
|
|
style="background-image: url({{ package.getThumbnailURL() or '/static/placeholder.png' }});">
|
2018-05-18 02:32:34 +02:00
|
|
|
<div class="packagegridscrub"></div>
|
|
|
|
<div class="packagegridinfo">
|
2018-05-29 23:58:46 +02:00
|
|
|
<h3>
|
|
|
|
{{ package.title }}
|
|
|
|
|
|
|
|
{% if show_author %}
|
|
|
|
by {{ package.author.display_name }}
|
|
|
|
{% endif %}
|
|
|
|
</h3>
|
2018-05-18 02:32:34 +02:00
|
|
|
|
|
|
|
<p>
|
|
|
|
{{ package.shortDesc }}
|
|
|
|
</p>
|
2018-05-29 22:24:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
{% if not package.license.is_foss and not package.media_license.is_foss and package.type != package.type.TXP %}
|
|
|
|
<p style="color:#f33;">
|
|
|
|
<b>Warning:</b> Non-free code and media.
|
|
|
|
</p>
|
|
|
|
{% elif not package.license.is_foss and package.type != package.type.TXP %}
|
|
|
|
<p style="color:#f33;">
|
|
|
|
<b>Warning:</b> Non-free code.
|
|
|
|
</p>
|
|
|
|
{% elif not package.media_license.is_foss %}
|
|
|
|
<p style="color:#f33;">
|
|
|
|
<b>Warning:</b> Non-free media.
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
2018-05-18 02:32:34 +02:00
|
|
|
</div>
|
|
|
|
</a></li>
|
|
|
|
{% endmacro %}
|
|
|
|
|
2018-05-29 23:58:46 +02:00
|
|
|
{% macro render_pkggrid(packages, show_author=True) -%}
|
2018-12-22 21:39:34 +01:00
|
|
|
<ul class="d-flex p-0 flex-row flex-wrap justify-content-start align-content-start ">
|
2018-05-18 02:32:34 +02:00
|
|
|
{% for p in packages %}
|
2018-05-29 23:58:46 +02:00
|
|
|
{{ render_pkgtile(p, show_author) }}
|
2018-05-18 02:32:34 +02:00
|
|
|
{% else %}
|
|
|
|
<li><i>No packages available</i></ul>
|
|
|
|
{% endfor %}
|
2018-12-22 22:03:01 +01:00
|
|
|
{% for i in range(4) %}
|
2018-12-22 21:39:34 +01:00
|
|
|
<li class="packagetile flex-fill"></li>
|
|
|
|
{% endfor %}
|
2018-05-18 02:32:34 +02:00
|
|
|
</ul>
|
|
|
|
{% endmacro %}
|