diff --git a/app/static/js/scripts.js b/app/static/js/scripts.js index 5b209193..e74bd820 100644 --- a/app/static/js/scripts.js +++ b/app/static/js/scripts.js @@ -75,6 +75,12 @@ function setupImageExpander() { image.alt = 'Image'; // Set the alt attribute for accessibility image.className = 'preview_image_shown'; + // Add click event listener to the inserted image + image.addEventListener('click', function() { + // Replace location.href with the URL of the clicked image + window.location.href = image.src; + }); + // Insert the image after the anchor link this.parentNode.insertBefore(image, this.nextSibling); } diff --git a/app/static/structure.css b/app/static/structure.css index cec44fe9..10ecea11 100644 --- a/app/static/structure.css +++ b/app/static/structure.css @@ -749,6 +749,27 @@ fieldset legend { position: relative; max-width: 92vw; height: auto; + cursor: pointer; +} +@media (min-width: 992px) { + .preview_image_shown { + max-width: 760px; + } +} +@media (min-width: 1280px) { + .preview_image_shown { + max-width: 800px; + } +} +@media (min-width: 1600px) { + .preview_image_shown { + max-width: 850px; + } +} +@media (min-width: 2000px) { + .preview_image_shown { + max-width: 1180px; + } } /*# sourceMappingURL=structure.css.map */ diff --git a/app/static/structure.scss b/app/static/structure.scss index 7baaff45..7e44d251 100644 --- a/app/static/structure.scss +++ b/app/static/structure.scss @@ -443,4 +443,18 @@ fieldset { position: relative; max-width: 92vw; height: auto; + cursor: pointer; + + @include breakpoint(tablet) { + max-width: 760px; + } + @include breakpoint(laptop) { + max-width: 800px; + } + @include breakpoint(desktop) { + max-width: 850px; + } + @include breakpoint(bigbig) { + max-width: 1180px; + } }