Proper gallery css

This commit is contained in:
Felipe M 2019-12-14 22:57:20 +01:00
parent 8ef971ec6a
commit c45246d128
Signed by: fmartingr
GPG key ID: 716BC147715E716F

View file

@ -24,11 +24,14 @@
{% macro render_gallery(post) %} {% macro render_gallery(post) %}
<div class="center"> <div class="center">
<h2>Gallery</h2> <h2>Gallery</h2>
<div style="display: flex; justify-content: center; flex-flow: row wrap; "> <div class="grid">
{% for attachment in post.children.get("gallery").attachments.order_by("_id") %} {% for attachment in post.children.get("gallery").attachments.order_by("_id") %}
<a href="/blog/{{post._slug}}/gallery/{{attachment._id}}" style="width: 30%"> <a href="/blog/{{post._slug}}/gallery/{{attachment._id}}">
<img src="/blog/{{post._slug}}/gallery/{{attachment._id}}"> <img src="/blog/{{post._slug}}/gallery/{{attachment._id}}" class="col-1-3">
</a> </a>
{% if loop.index is divisibleby(3) %}
</div><div class="grid">
{% endif %}
{% endfor %} {% endfor %}
</div> </div>
<hr class="light"> <hr class="light">