Skip to content

Commit

Permalink
--
Browse files Browse the repository at this point in the history
  • Loading branch information
SamirPaulb committed Feb 8, 2024
1 parent 158f9a2 commit ee266a2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
27 changes: 24 additions & 3 deletions layouts/partials/extend_footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,29 @@
});
</script>

<!--
<script type="module" defer async loading="lazy" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8274401353019049" crossorigin="anonymous"></script>
-->


<script>
window.addEventListener('DOMContentLoaded', function() {
const script = document.createElement('script');
script.src = '/medium-zoom/medium-zoom.min.js';
document.body.appendChild(script);
});
</script>

<!-- <script src="/medium-zoom/medium-zoom.min.js"></script> -->

<script>
document.addEventListener('DOMContentLoaded', function() {
const images = Array.from(document.querySelectorAll(".post-content img"));
images.forEach(img => {
mediumZoom(img, {
margin: 0, /* The space outside the zoomed image */
scrollOffset: 40, /* The number of pixels to scroll to close the zoom */
container: null, /* The viewport to render the zoom in */
template: null, /* The template element to display on zoom */
background: 'rgba(0, 0, 0, 0.8)'
});
});
});
</script>
2 changes: 2 additions & 0 deletions static/medium-zoom/medium-zoom.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ee266a2

Please sign in to comment.