contentdb/app/templates/macros/packagegridtile.html

24 lines
606 B
HTML
Raw Normal View History

2018-05-18 02:32:34 +02:00
{% macro render_pkgtile(package) -%}
<li><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">
<h3>{{ package.title }} by {{ package.author.display_name }}</h3>
<p>
{{ package.shortDesc }}
</p>
</div>
</a></li>
{% endmacro %}
{% macro render_pkggrid(packages) -%}
<ul class="packagegrid">
{% for p in packages %}
{{ render_pkgtile(p) }}
{% else %}
<li><i>No packages available</i></ul>
{% endfor %}
</ul>
{% endmacro %}