2018-07-20 16:27:34 +00:00
|
|
|
{{ $bundleRaw := resources.Get "sass/style.sass" | resources.ExecuteAsTemplate "style/main.tmp.css" . }}
|
|
|
|
|
2018-07-10 07:23:19 +00:00
|
|
|
{{ if .Site.IsServer }}
|
|
|
|
{{ $cssOpts := (dict "targetPath" "styles/main.css" "enableSourceMap" true ) }}
|
2018-07-20 16:27:34 +00:00
|
|
|
{{ $bundle := $bundleRaw | toCSS $cssOpts }}
|
|
|
|
<link rel="stylesheet" href="{{ $bundle.Permalink }}" media="screen">
|
2018-07-01 08:09:29 +00:00
|
|
|
{{ else }}
|
2018-07-10 07:23:19 +00:00
|
|
|
{{ $cssOpts := (dict "targetPath" "styles/main.css" ) }}
|
|
|
|
{{ $postCSSOpts := (dict "use" "autoprefixer" ) }}
|
2018-07-20 16:27:34 +00:00
|
|
|
{{ $bundle := $bundleRaw | toCSS $cssOpts | postCSS $postCSSOpts | minify | fingerprint }}
|
|
|
|
<link rel="stylesheet" href="{{ $bundle.Permalink }}" integrity="{{ $bundle.Data.Integrity }}" media="screen">
|
2018-07-01 08:09:29 +00:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
<!-- Custom css -->
|
|
|
|
{{ range .Site.Params.customCSS -}}
|
2018-07-20 16:27:34 +00:00
|
|
|
{{ $style := resources.Get . }}
|
|
|
|
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" media="screen">
|
2018-07-01 08:09:29 +00:00
|
|
|
{{- end }}
|