Commit 981c71db authored by gijs's avatar gijs
Browse files

Styles for figures

parent cec78660
......@@ -47,7 +47,11 @@
for (var i=0; i < images.length; i++) {
images[i].addEventListener('click', function () {
if (this.parentElement && this.parentElement.tagName.lower() == 'figure') {
this.parentElement.classList.toggle('full');
} else {
this.classList.toggle('full');
}
})
}
})();
......
<figure class="image">
{% if image.title %}
<h3>{{ image.title }}</h3>
{% if image.title.value %}
<h4>{{ image.title }}</h4>
{% endif %}
<img src="{{ image.image }}" />
{% if image.caption %}
{% if image.caption.value %}
<figcaption>
{{ image.caption }}
</figcaption>
......
......@@ -466,7 +466,7 @@ ul.simplelist > li:before {
margin: 0;
}
main img {
main img, main figure {
width: 33%;
float: left;
margin-right: .5em;
......@@ -476,18 +476,29 @@ main img {
clear: left;
}
main img.full {
main img.full, main figure.full img {
cursor: zoom-out;
}
main img.full,
main audio,
main video {
main video,
main figure.full figcaption {
max-width: 47.5em;
width: 100%;
margin-top: .5em;
margin-bottom: .5em;
}
main figure img {
width: 100%;
float: none;
margin-top: 0;
margin-bottom: 0;
}
figcaption {
font-size: 80%;
}
/*
a.tag {
font-size: 85%;
......
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