File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -579,6 +579,11 @@ html {
579579 scrollbar-gutter : stable;
580580}
581581
582+ /* Auto-clickable for standalone images */
583+ img : not (a img ): not (.image-card-img ): not ([src *= "#no-click" ]) {
584+ cursor : pointer;
585+ }
586+
582587/* Chroma syntax highlighting */
583588
584589/* Background */
Original file line number Diff line number Diff line change @@ -184,4 +184,17 @@ const mobileMenu = (() => {
184184 document . addEventListener ( 'click' , clickHandler , false )
185185 document . addEventListener ( 'keydown' , keyHandler , false )
186186
187- } ) ( )
187+ } ) ( )
188+
189+ // Simple click-to-open for standalone images
190+ document . addEventListener ( 'click' , function ( e ) {
191+ // Check if clicked element is a standalone img (not inside an anchor, not image-card, not no-click)
192+ if ( e . target . tagName === 'IMG' &&
193+ ! e . target . closest ( 'a' ) &&
194+ ! e . target . classList . contains ( 'image-card-img' ) &&
195+ ! e . target . src . includes ( '#no-click' ) ) {
196+
197+ // Open image in same tab, just like clicking a regular link
198+ window . location . href = e . target . src
199+ }
200+ } )
You can’t perform that action at this time.
0 commit comments