lensfrex 1 year ago
parent bf30eec559
commit 6ebbf95df6
Signed by: lensfrex
GPG Key ID: 947ADABD8533C476
  1. 2
      layout/includes/layout.pug
  2. 4
      source/css/_partials/post_page/markdown_content.styl

@ -58,7 +58,7 @@ html(lang=config.language)
if (element.parentNode.tagName !== 'A') { if (element.parentNode.tagName !== 'A') {
const dataSrc = element.getAttribute("data-src") const dataSrc = element.getAttribute("data-src")
const dataCaption = element.title || element.alt || '' const dataCaption = element.title || element.alt || ''
utils.wrapElement(element, 'a', { href: dataSrc, 'data-fancybox': '', 'data-caption': dataCaption, 'data-thumb': dataSrc }) utils.wrapElement(element, 'a', { href: dataSrc, 'data-fancybox': '', 'data-caption': dataCaption, 'data-thumb': dataSrc , class: "img-wrapper"})
} }
}) })
Fancybox.bind('[data-fancybox]', {}); Fancybox.bind('[data-fancybox]', {});

@ -70,6 +70,10 @@
&:hover &:hover
text-decoration: underline text-decoration: underline
.img-wrapper
display: contents
cursor: zoom-in
img img
display: block display: block
margin: 20px auto 20px margin: 20px auto 20px

Loading…
Cancel
Save