[showcase-relisiancy] Making the showcase more resiliant against slightly different sized thumbnails.

This commit is contained in:
Joseph Nix 2018-05-15 12:26:32 -05:00
parent fabbc0f691
commit d39e55afbc
1 changed files with 15 additions and 9 deletions

View File

@ -16,18 +16,24 @@
<p>
Click any of the showcases to learn a bit more about how it uses Lektor.
<div class="showcase row">
{% for project in this.children %}
{% for project_row in this.children | batch(2, '&nbsp;') %}
<div class="row">
{% for project in project_row %}
<div class="project col-md-6">
<a href="{{ project|url }}">
<h2>{{ project.name }}</h2>
{% if project.cover_image %}
{% set image = project.attachments.get(project.cover_image) %}
<div class="frame"><img src="{{ image.thumbnail(480)|url }}" width="100%" alt=""></div>
<div class="frame">
<img src="{{ image.thumbnail(480)|url }}" width="100%" alt="">
</div>
{% endif %}
</a>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
<p>
<small>You want your own website on here? <a
href="https://github.com/lektor/lektor-website/tree/master/content/showcase">Fork