Change style to display photos side-by-side when there are 2 photos

This commit is contained in:
Claude Paroz 2018-10-14 18:23:58 +02:00
parent 5843203702
commit f45b5d842b
2 changed files with 3 additions and 3 deletions

View File

@ -1,3 +1,3 @@
div.results { margin-top: 1em; }
div.photo { float: right; }
div.photo { display: inline-block; vertical-align: top; }
div.photo img { max-width: 100%; }

View File

@ -17,11 +17,11 @@
{% endif %}
{% if recette.photo_instr %}
<div class="photo"><img src="{{ recette.photo_instr.url }}">
<div class="photo" style="max-width: 48%"><img src="{{ recette.photo_instr.url }}">
</div>
{% endif %}
{% if recette.photo %}
<div class="photo"{% if recette.ingredients.count or recette.photo_instr %} style="max-width: 50%"{% endif %}><img src="{{ recette.photo.url }}">
<div class="photo"{% if recette.ingredients.count or recette.photo_instr %} style="max-width: 48%"{% endif %}><img src="{{ recette.photo.url }}">
</div>
{% endif %}
{% endblock %}