Skip to content

Commit

Permalink
Add medium-zoom for zooming images
Browse files Browse the repository at this point in the history
  • Loading branch information
prinsss committed Oct 14, 2019
1 parent 276956c commit 3462d5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions _config.yml
Expand Up @@ -107,3 +107,4 @@ vendors:
dayjs: //cdn.jsdelivr.net/npm/dayjs@1.8.16/dayjs.min.js
disqusjs: //cdn.jsdelivr.net/npm/disqusjs@1.2.5/dist/disqus.js
disqusjs_style: //cdn.jsdelivr.net/npm/disqusjs@1.2.5/dist/disqusjs.css
medium_zoom: //cdn.jsdelivr.net/npm/medium-zoom@1.0.4/dist/medium-zoom.min.js
2 changes: 2 additions & 0 deletions layout/_partials/scripts.swig
@@ -1,6 +1,8 @@
<script type="text/javascript" src="{{ theme.vendors.hancss_script }}"></script>
<script type="text/javascript" src="{{ theme.vendors.highlightjs }}"></script>
<script type="text/javascript" src="{{ theme.vendors.medium_zoom }}"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script>mediumZoom(document.querySelectorAll('.post-content :not(a) > img, .post-content > img'), { margin: 24 });</script>

{% if theme.google_analytics %}
<script>
Expand Down

0 comments on commit 3462d5e

Please sign in to comment.