Move masonry to non-blocking, don't add it to every webpage
This commit is contained in:
parent
83890cf33d
commit
fdc91de96f
3 changed files with 13 additions and 17 deletions
|
@ -12,8 +12,4 @@
|
|||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ $site := resources.Get "js/gallery.js" }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $site = $site | minify | fingerprint | resources.PostProcess }}
|
||||
{{ end }}
|
||||
<script src="{{ $site.RelPermalink }}" integrity="{{ $site.Data.Integrity }}"></script>
|
||||
{{ partial "gallery-js" . }}
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
{{/* Partial used to include the JS for the gallery page's masonry layout. */}}
|
||||
|
||||
{{ $masonry := resources.Get "js/masonry.min.js" }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $masonry = $masonry | fingerprint | resources.PostProcess }}
|
||||
{{ end }}
|
||||
<script src="{{ $masonry.RelPermalink }}" integrity="{{ $masonry.Data.Integrity }}"></script>
|
||||
|
||||
{{ $imagesloaded := resources.Get "js/imagesloaded.min.js" }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $imagesloaded = $imagesloaded | fingerprint | resources.PostProcess }}
|
||||
{{ end }}
|
||||
<script src="{{ $imagesloaded.RelPermalink }}" integrity="{{ $imagesloaded.Data.Integrity }}"></script>
|
||||
|
||||
{{ $site := resources.Get "js/gallery.js" }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $site = $site | minify | fingerprint | resources.PostProcess }}
|
||||
|
|
|
@ -27,18 +27,6 @@
|
|||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png?v=2">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png?v=2">
|
||||
|
||||
{{ $masonry := resources.Get "js/masonry.min.js" }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $masonry = $masonry | fingerprint | resources.PostProcess }}
|
||||
{{ end }}
|
||||
<script src="{{ $masonry.RelPermalink }}" integrity="{{ $masonry.Data.Integrity }}"></script>
|
||||
|
||||
{{ $imagesloaded := resources.Get "js/imagesloaded.min.js" }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $imagesloaded = $imagesloaded | fingerprint | resources.PostProcess }}
|
||||
{{ end }}
|
||||
<script src="{{ $imagesloaded.RelPermalink }}" integrity="{{ $imagesloaded.Data.Integrity }}"></script>
|
||||
|
||||
<meta name="robots" content="noai">
|
||||
<meta name="fediverse:creator" content="{{ $.Site.Params.fediverse_url }}" />
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue