diff options
author | amzrk2 | 2020-05-07 13:34:12 +0800 |
---|---|---|
committer | amzrk2 | 2020-05-07 13:34:12 +0800 |
commit | dbee05798d40f34fcb4875bcf92fa913a190766d (patch) | |
tree | f99ab18564a0d197344e4d764de79b0445a6fdbb /layouts/partials | |
parent | a021afb3a7115d271e356264359918b07412f66c (diff) | |
download | hugo-theme-fuji-dbee05798d40f34fcb4875bcf92fa913a190766d.tar.gz hugo-theme-fuji-dbee05798d40f34fcb4875bcf92fa913a190766d.tar.bz2 hugo-theme-fuji-dbee05798d40f34fcb4875bcf92fa913a190766d.zip |
Add zoomable images
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/head.html | 3 | ||||
-rw-r--r-- | layouts/partials/scripts.html | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index a458be1..134f6e4 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -37,6 +37,7 @@ <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.0/dist/jquery.min.js" integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/lazysizes@5.2.0/lazysizes.min.js" integrity="sha256-h2tMEmhemR2IN4wbbdNjj9LaDIjzwk2hralQwfJmBOE=" crossorigin="anonymous"></script> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.13.0/css/all.min.css" integrity="sha256-h20CPZ0QyXlBuAw7A+KluUYx/3pK+c7lYEpqLTlxjYQ=" crossorigin="anonymous" /> +<script src="https://cdn.jsdelivr.net/npm/medium-zoom@1.0.5/dist/medium-zoom.min.js" integrity="sha256-Jd9xef1tT52aCb+cAqhElj/9D3c99lQvEjyKOuPn3S4=" crossorigin="anonymous"></script> {{ if or (.Site.Params.playerURL) (.Params.playerURL) }} <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.css" integrity="sha256-uqQQGnDcmRKvhKwc5Vm4XT1GQ2oV6t1U0NR2N9tV+BQ=" crossorigin="anonymous" /> <script src="https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.js" integrity="sha256-6Y7CJDaltoeNgk+ZftgCD9jLgmGv4xKUo8nQ0HgAwVo=" crossorigin="anonymous"></script> @@ -49,6 +50,8 @@ <script src="{{ $lazysizes.Permalink }}"></script> {{ $fontawesome := resources.Get "css/fontawsome.min.css" }} <link rel="stylesheet" href="{{ $fontawesome.Permalink }}" /> +{{ $zoom := resources.Get "js/medium-zoom.min.js" }} +<script src="{{ $zoom.Permalink }}"></script> {{ if or (.Site.Params.playerURL) (.Params.playerURL) }} {{ $aplayerCSS := resources.Get "css/APlayer.min.css" }} <link rel="stylesheet" href="{{ $aplayerCSS.Permalink }}" /> diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 839a87a..1a8a28c 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -1,3 +1,12 @@ +<!-- init zoomable images --> +<script> + $(function () { + mediumZoom('.img-zoomable', { + margin: 32 + }); + }); +</script> + <!-- utterances comment loading indicator --> {{ if and (.IsPage) (.Site.Params.utterancesRepo) }} <script> |