Commit fac964ae authored by fred's avatar fred

add "support" for portrait galleries

parent b2623f4d
...@@ -1652,13 +1652,17 @@ div.gallery div.first img { ...@@ -1652,13 +1652,17 @@ div.gallery div.first img {
transform-origin: bottom left; transform-origin: bottom left;
} }
div.portrait div.gallery div.first img {
margin-top: -320px;
margin-left: -240px;
}
div.gallery { div.gallery {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
} }
@media screen and (max-width: 640px) { @media screen and (max-width: 640px) {
div.gallery div.first { div.portrait div.gallery div.first img,
}
div.gallery div.first img { div.gallery div.first img {
max-width: 80vw; max-width: 80vw;
margin: 0; margin: 0;
......
...@@ -9,10 +9,18 @@ ...@@ -9,10 +9,18 @@
<div> <div>
{% endif %} {% endif %}
{% thumbnail image.image "200x100" crop="50% 25%" as im %} {% thumbnail image.image "200x100" crop="50% 25%" as im %}
{% if cell.slug == 'portrait' %}
{% thumbnail image.image "480x640" crop="50% 25%" as im_large %}
<span data-image-large="{{ im_large.url }}"><img src="{{ im.url }}"
{% if image.title %} title="{{image.title}}" {% endif %}/></span>
{% endthumbnail %}
{% else %}
{% thumbnail image.image "640x480" crop="50% 25%" as im_large %} {% thumbnail image.image "640x480" crop="50% 25%" as im_large %}
<span data-image-large="{{ im_large.url }}"><img src="{{ im.url }}" <span data-image-large="{{ im_large.url }}"><img src="{{ im.url }}"
{% if image.title %} title="{{image.title}}" {% endif %}/></span> {% if image.title %} title="{{image.title}}" {% endif %}/></span>
{% endthumbnail %} {% endthumbnail %}
{% endif %}
{% endthumbnail %} {% endthumbnail %}
{% endfor %} {% endfor %}
</div> </div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment