mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-10 09:33:44 +01:00
45 lines
1.2 KiB
HTML
45 lines
1.2 KiB
HTML
{% macro render_pkgtile(package, show_author) -%}
|
|
<li><a href="{{ package.getDetailsURL() }}"
|
|
style="background-image: url({{ package.getThumbnailURL() or '/static/placeholder.png' }});">
|
|
<div class="packagegridscrub"></div>
|
|
<div class="packagegridinfo">
|
|
<h3>
|
|
{{ package.title }}
|
|
|
|
{% if show_author %}
|
|
by {{ package.author.display_name }}
|
|
{% endif %}
|
|
</h3>
|
|
|
|
<p>
|
|
{{ package.shortDesc }}
|
|
</p>
|
|
|
|
|
|
{% 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 %}
|
|
</div>
|
|
</a></li>
|
|
{% endmacro %}
|
|
|
|
{% macro render_pkggrid(packages, show_author=True) -%}
|
|
<ul class="packagegrid">
|
|
{% for p in packages %}
|
|
{{ render_pkgtile(p, show_author) }}
|
|
{% else %}
|
|
<li><i>No packages available</i></ul>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endmacro %}
|