hugo-theme-introduction/layouts/partials/footer/scripts.html

16 lines
967 B
HTML
Raw Normal View History

2018-07-13 08:55:02 +00:00
{{ $jQuery := resources.Get "vendor/jquery/jquery-3.3.1.min.js" }}
{{ $index := resources.Get "js/index.js" | resources.ExecuteAsTemplate "js/index.tmp.css" . | minify }}
2018-07-01 08:09:29 +00:00
2018-07-13 08:55:02 +00:00
{{ if and .Site.Params.localTime .Page.IsHome }}
{{ $momentjs := resources.Get "vendor/momentjs/moment.min.js" }}
{{ $momentTimezone := resources.Get "vendor/momentjs/moment-timezone.min.js" }}
{{ $momentTimezoneWithData := resources.Get "vendor/momentjs/moment-timezone-with-data-2012-2022.min.js" }}
{{ $scripts := slice $jQuery $momentjs $momentTimezone $momentTimezoneWithData $index | resources.Concat "/js/bundleMoment.js" | fingerprint }}
<script src="{{ $scripts.Permalink }}" integrity="{{ $scripts.Data.Integrity }}"></script>
{{ else }}
{{ $scripts := slice $jQuery $index | resources.Concat "/js/bundle.js" | fingerprint }}
<script src="{{ $scripts.Permalink }}" integrity="{{ $scripts.Data.Integrity }}"></script>
2018-07-01 08:09:29 +00:00
{{ end }}
{{ template "_internal/google_analytics_async.html" . }}