feat: added options lazySizes, clipBoard, instantPage, flexSearch, and darkMode
This commit is contained in:
parent
e1ca233ef2
commit
5f03d61e81
|
@ -1,41 +1,36 @@
|
||||||
{{ $indexTemplate := resources.Get "js/index.js" -}}
|
{{ $indexTemplate := resources.Get "js/index.js" -}}
|
||||||
{{ $index := $indexTemplate | resources.ExecuteAsTemplate "index.js" . -}}
|
{{ $index := $indexTemplate | resources.ExecuteAsTemplate "index.js" . -}}
|
||||||
|
|
||||||
{{ $lazySizes := resources.Get "js/lazySizes.js" -}}
|
|
||||||
{{ $lazySizes := $lazySizes | js.Build -}}
|
|
||||||
|
|
||||||
{{ $clipBoard := resources.Get "js/clipBoard.js" -}}
|
|
||||||
{{ $clipBoard := $clipBoard | js.Build -}}
|
|
||||||
|
|
||||||
{{ $instantPage := resources.Get "js/instant.page.js" -}}
|
|
||||||
{{ $instantPage := $instantPage | js.Build -}}
|
|
||||||
|
|
||||||
{{ $flexSearch := resources.Get "js/vendor/flexsearch/dist/flexsearch.min.js" -}}
|
|
||||||
|
|
||||||
{{ $darkMode := resources.Get "js/darkmode.js" -}}
|
|
||||||
{{ $darkMode := $darkMode | js.Build -}}
|
|
||||||
|
|
||||||
{{ $app := resources.Get "js/app.js" -}}
|
{{ $app := resources.Get "js/app.js" -}}
|
||||||
|
|
||||||
{{ $slice := slice $app -}}
|
{{ $slice := slice $app -}}
|
||||||
|
|
||||||
{{ if .Site.Params.options.lazySizes -}}
|
{{ if .Site.Params.options.lazySizes -}}
|
||||||
|
{{ $lazySizes := resources.Get "js/lazysizes.js" -}}
|
||||||
|
{{ $lazySizes := $lazySizes | js.Build -}}
|
||||||
{{ $slice = $slice | append $lazySizes -}}
|
{{ $slice = $slice | append $lazySizes -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
{{ if .Site.Params.options.clipBoard -}}
|
{{ if .Site.Params.options.clipBoard -}}
|
||||||
|
{{ $clipBoard := resources.Get "js/clipboard.js" -}}
|
||||||
|
{{ $clipBoard := $clipBoard | js.Build -}}
|
||||||
{{ $slice = $slice | append $clipBoard -}}
|
{{ $slice = $slice | append $clipBoard -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
{{ if .Site.Params.options.instantPage -}}
|
{{ if .Site.Params.options.instantPage -}}
|
||||||
|
{{ $instantPage := resources.Get "js/instant.page.js" -}}
|
||||||
|
{{ $instantPage := $instantPage | js.Build -}}
|
||||||
{{ $slice = $slice | append $instantPage -}}
|
{{ $slice = $slice | append $instantPage -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
{{ if .Site.Params.options.flexSearch -}}
|
{{ if .Site.Params.options.flexSearch -}}
|
||||||
|
{{ $flexSearch := resources.Get "js/vendor/flexsearch/dist/flexsearch.min.js" -}}
|
||||||
{{ $slice = $slice | append $flexSearch -}}
|
{{ $slice = $slice | append $flexSearch -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
{{ if .Site.Params.options.darkMode -}}
|
{{ if .Site.Params.options.darkMode -}}
|
||||||
|
{{ $darkMode := resources.Get "js/darkmode.js" -}}
|
||||||
|
{{ $darkMode := $darkMode | js.Build -}}
|
||||||
{{ $slice = $slice | append $darkMode -}}
|
{{ $slice = $slice | append $darkMode -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue