diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-01-11 20:23:58 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-01-11 20:24:47 -0400 |
commit | 4ad0c3946a132f20742cc4de7f7dd31c79bb4653 (patch) | |
tree | 022692277e6c644cbb19174816964e0dbfb39aa9 /src/content/dependencies | |
parent | 2016bd4c6f966f2ac80e958656829371419d3bba (diff) |
content, css: narrow image link/reveal interactivity wrapper
Diffstat (limited to 'src/content/dependencies')
-rw-r--r-- | src/content/dependencies/image.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/content/dependencies/image.js b/src/content/dependencies/image.js index 9de58dce..5ea89a57 100644 --- a/src/content/dependencies/image.js +++ b/src/content/dependencies/image.js @@ -338,14 +338,25 @@ export default { } wrapped = + html.tag('div', {class: 'image-inner-area'}, + wrapped); + + if (willLink) { + wrapped = + html.tag('a', {class: 'image-link'}, + linkAttributes, + + wrapped); + } + + wrapped = html.tag('div', {class: 'image-container'}, containerAttributes, !originalSrc && {class: 'placeholder-image'}, - html.tag('div', {class: 'image-inner-area'}, - wrapped)); + wrapped); if (willReveal) { wrapped = @@ -367,17 +378,6 @@ export default { wrapped)); } - if (willLink) { - wrapped = - html.tag('a', {class: ['box', 'image-link']}, - linkAttributes, - - visibility === 'hidden' && - {class: 'js-hide'}, - - wrapped); - } - return wrapped; } }, |