Commit b10570a4 authored by gijs's avatar gijs
Browse files

Toggling images also on homepage

parent 082230ef
......@@ -161,6 +161,8 @@
var image = entry.dataset.image;
showImage(image);
}
setImageListeners();
}
function show(entry, entries) {
......@@ -221,4 +223,18 @@
}
});
function setImageListeners () {
var images = document.querySelectorAll('aside.right img');
for (var i=0; i < images.length; i++) {
images[i].addEventListener('click', function () {
if (this.parentElement && this.parentElement.tagName.toLowerCase() == 'figure') {
this.parentElement.classList.toggle('full');
} else {
this.classList.toggle('full');
}
})
}
};
</script>
\ No newline at end of file
......@@ -793,12 +793,12 @@ div .pad {
margin-left: 0;
}
main img.full,
main figure.full img {
.content img.full,
.content figure.full img {
cursor: zoom-out;
}
.content img.full
.content img.full,
.content figure.full,
.content audio,
.content video {
......
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