2019-02-03 12:30:44 +01:00
|
|
|
{{ $cdn_url := .Scratch.Get "cdn_url" }}
|
|
|
|
{{ $postHasImages := .Scratch.Get "postHasImages"}}
|
|
|
|
{{ $jquery := resources.Get "/js/jquery.min.js" }}
|
|
|
|
{{ $lazysizes := resources.Get "/js/lazysizes.min.js"}}
|
|
|
|
{{ $prettify := resources.Get "/js/prettify.min.js" }}
|
|
|
|
{{ $dynamic := resources.Get "/js/dynamic.to.top.min.js" }}
|
|
|
|
{{ $main := resources.Get "/js/main.js" }}
|
|
|
|
{{ $lihtGallery := resources.Get "/js/lightGallery-all.min.js" }}
|
|
|
|
{{ $lihtGallery_init := resources.Get "/js/lightGallery-init.js" }}
|
|
|
|
{{ if .IsPage }}
|
|
|
|
|
|
|
|
{{ if $postHasImages }}
|
2019-08-04 15:53:35 +02:00
|
|
|
<link crossorigin="anonymous" integrity="sha384-yziQACfvCVwLqVFLqkWBYRO3XeA4EqzfXKGwaWnenYn5XzqfJFlFdKEmvutIQdKb" href="https://lib.baomitu.com/lightgallery/1.6.12/css/lightgallery.min.css" rel="stylesheet">
|
2019-08-04 18:51:35 +02:00
|
|
|
{{ $vendorscript := slice $dynamic $main $lihtGallery $lihtGallery_init | resources.Concat "/js/vendor_gallery.js" | resources.Minify }}
|
2019-02-03 12:30:44 +01:00
|
|
|
<script src="{{ printf "%s%s" $cdn_url $vendorscript.RelPermalink }}" async="" ></script>
|
2019-08-04 18:51:35 +02:00
|
|
|
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
|
|
|
|
<script src="https://cdn.bootcss.com/prettify/r298/prettify.min.js"></script>
|
|
|
|
<script src="https://cdn.bootcss.com/lazysizes/5.1.0/lazysizes.min.js"></script>
|
2019-02-03 12:30:44 +01:00
|
|
|
{{ else }}
|
2019-08-04 18:51:35 +02:00
|
|
|
{{ $vendorscript := slice $dynamic $main | resources.Concat "/js/vendor_no_gallery.js" | resources.Minify }}
|
2019-02-03 12:30:44 +01:00
|
|
|
<script src="{{ printf "%s%s" $cdn_url $vendorscript.RelPermalink }}" async=""></script>
|
|
|
|
{{ end }}
|
2019-08-04 15:53:35 +02:00
|
|
|
|
2019-02-03 12:30:44 +01:00
|
|
|
{{ else }}
|
2019-08-04 18:51:35 +02:00
|
|
|
{{ $main := slice $main | resources.Concat "/js/vendor_main.js" | resources.Minify}}
|
2019-02-03 12:30:44 +01:00
|
|
|
<script src="{{ printf "%s%s" $cdn_url $main.RelPermalink }}" async=""></script>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ if eq ( getenv "HUGO_ENV" ) "production" }}
|
2019-03-13 23:35:27 +01:00
|
|
|
{{ end }}
|
2019-03-13 23:38:18 +01:00
|
|
|
|
|
|
|
{{ template "_internal/google_analytics_async.html" . }}
|