This commit is contained in:
zzossig 2019-11-05 17:51:53 +09:00
parent 4f2bdfee5f
commit c3e85754a3
7 changed files with 24 additions and 24 deletions

View File

@ -15,15 +15,15 @@
</div> </div>
{{ if $params.featured_image }} {{ if $params.featured_image }}
<div class="summary__image-wrapper"> <div class="summary__image-wrapper">
{{ with (print "/images/" $params.featured_image) }} {{ with (print "images/" $params.featured_image) }}
<img data-src="{{ . | relURL }}" alt="{{ print $params.featured_image }}" class="lazyload summary__image"> <img data-src="{{ . | relURL }}" alt="{{ print $params.featured_image }}" class="lazyload summary__image">
{{ end }} {{ end }}
</div> </div>
{{ else if $params.featured_video }} {{ else if $params.featured_video }}
{{ with (print "/videos/poster/" $params.featured_video_poster) }} {{ with (print "videos/poster/" $params.featured_video_poster) }}
<div class="video"> <div class="video">
<video class='video-js' controls preload='none' poster='{{ . | relURL }}' data-setup='{"fluid": true}'> <video class='video-js' controls preload='none' poster='{{ print (. | relURL) }}' data-setup='{"fluid": true}'>
{{ with (print "/videos/" $params.featured_video) }} {{ with (print "videos/" $params.featured_video) }}
<source src="{{ . | relURL }}" type='video/mp4'> <source src="{{ . | relURL }}" type='video/mp4'>
{{ end }} {{ end }}
<p class='vjs-no-js'> <p class='vjs-no-js'>

View File

@ -19,9 +19,9 @@
</main> </main>
{{ partial "body/photoswipe" . }} {{ partial "body/photoswipe" . }}
{{ $masonry := resources.Get `js/masonry.pkgd.min.js` | fingerprint }} {{ $masonry := resources.Get `js/masonry.pkgd.min.js` | resources.Fingerprint }}
<script defer src="{{ $masonry.RelPermalink }}"></script> <script defer src="{{ $masonry.RelPermalink }}"></script>
{{ $imagesloaded := resources.Get `js/imagesloaded.pkgd.min.js` | fingerprint }} {{ $imagesloaded := resources.Get `js/imagesloaded.pkgd.min.js` | resources.Fingerprint }}
<script defer src="{{ $imagesloaded.RelPermalink }}"></script> <script defer src="{{ $imagesloaded.RelPermalink }}"></script>
<script> <script>

View File

@ -1,11 +1,11 @@
{{ if $.Param "enableCustomScrollbar" }} {{ if $.Param "enableCustomScrollbar" }}
{{ $customscrollbar := resources.Get `js/perfect-scrollbar.jquery.min.js` | fingerprint }} {{ $customscrollbar := resources.Get `js/perfect-scrollbar.jquery.min.js` | resources.Fingerprint }}
<script src="{{ $customscrollbar.RelPermalink }}"></script> <script defer src="{{ $customscrollbar.RelPermalink }}"></script>
{{ $customScrollbarStyle := resources.Get "css/perfect-scrollbar.min.css" }} {{ $customScrollbarStyle := resources.Get "css/perfect-scrollbar.min.css" }}
<script src="{{ $customScrollbarStyle.RelPermalink }}"></script> <script defer src="{{ $customScrollbarStyle.RelPermalink }}"></script>
<script> <script defer>
var pre = $('pre'); var pre = $('pre');
pre.perfectScrollbar(); pre.perfectScrollbar();
</script> </script>

View File

@ -67,16 +67,16 @@
</div> </div>
{{ $photoSwipe := resources.Get `js/photoswipe.min.js` | fingerprint }} {{ $photoSwipe := resources.Get `js/photoswipe.min.js` | resources.Fingerprint }}
<script src="{{ $photoSwipe.RelPermalink }}"></script> <script defer src="{{ $photoSwipe.RelPermalink }}"></script>
{{ $photoSwipeUi := resources.Get `js/photoswipe-ui-default.min.js` | fingerprint }} {{ $photoSwipeUi := resources.Get `js/photoswipe-ui-default.min.js` | resources.Fingerprint }}
<script src="{{ $photoSwipeUi.RelPermalink }}"></script> <script defer src="{{ $photoSwipeUi.RelPermalink }}"></script>
{{ $photoSwipeStyle := resources.Get "css/photoswipe/photoswipe.css" }} {{ $photoSwipeStyle := resources.Get "css/photoswipe/photoswipe.css" | resources.Fingerprint }}
<script src="{{ $photoSwipeStyle.RelPermalink }}"></script> <script defer src="{{ $photoSwipeStyle.RelPermalink }}"></script>
{{ $photoSwipeSkin := resources.Get "css/photoswipe/custom-skin.css" }} {{ $photoSwipeSkin := resources.Get "css/photoswipe/custom-skin.css" | resources.Fingerprint }}
<script src="{{ $photoSwipeSkin.RelPermalink }}"></script> <script defer src="{{ $photoSwipeSkin.RelPermalink }}"></script>
<script> <script defer>
var pswpElement = $('.pswp')[0]; var pswpElement = $('.pswp')[0];
var imgElements = $('.single__contents').find('img'); var imgElements = $('.single__contents').find('img');
var items = []; var items = [];

View File

@ -7,10 +7,10 @@
</div> </div>
</div> </div>
{{ $toc := resources.Get `js/jquery.toc.min.js` | fingerprint }} {{ $toc := resources.Get `js/jquery.toc.min.js` | resources.Fingerprint }}
<script src="{{ $toc.RelPermalink }}"></script> <script defer src="{{ $toc.RelPermalink }}"></script>
<script> <script defer>
var navbar = $('.navbar'); var navbar = $('.navbar');
$("#toc").toc({ content: ".single__contents", headings: "h1,h2,h3,h4" }); $("#toc").toc({ content: ".single__contents", headings: "h1,h2,h3,h4" });

View File

@ -1,5 +1,5 @@
{{ if $.Param "enableMark" }} {{ if $.Param "enableMark" }}
{{ $mark := resources.Get "js/jquery.mark.min.js" | fingerprint }} {{ $mark := resources.Get "js/jquery.mark.min.js" | resources.Fingerprint }}
<script defer src="{{ $mark.RelPermalink }}"></script> <script defer src="{{ $mark.RelPermalink }}"></script>
<script> <script>

View File

@ -12,7 +12,7 @@
</div> </div>
{{ partial "sidebar/site-mark" . }} {{ partial "sidebar/site-mark" . }}
{{ $lunr := resources.Get "js/lunr.min.js" | fingerprint }} {{ $lunr := resources.Get "js/lunr.min.js" | resources.Fingerprint }}
<script defer src="{{ $lunr.RelPermalink }}"></script> <script defer src="{{ $lunr.RelPermalink }}"></script>
<script> <script>