Commit b10570a4 authored by gijs's avatar gijs
Browse files

Toggling images also on homepage

parent 082230ef
...@@ -161,6 +161,8 @@ ...@@ -161,6 +161,8 @@
var image = entry.dataset.image; var image = entry.dataset.image;
showImage(image); showImage(image);
} }
setImageListeners();
} }
function show(entry, entries) { function show(entry, entries) {
...@@ -221,4 +223,18 @@ ...@@ -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> </script>
\ No newline at end of file
...@@ -793,12 +793,12 @@ div .pad { ...@@ -793,12 +793,12 @@ div .pad {
margin-left: 0; margin-left: 0;
} }
main img.full, .content img.full,
main figure.full img { .content figure.full img {
cursor: zoom-out; cursor: zoom-out;
} }
.content img.full .content img.full,
.content figure.full, .content figure.full,
.content audio, .content audio,
.content video { .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