2018-07-26 17:34:02 +00:00
|
|
|
{{ $bundleRaw := resources.Get "/sass/style.sass" | resources.ExecuteAsTemplate "/css/main.tmp.css" . }}
|
2018-07-20 16:27:34 +00:00
|
|
|
|
2018-07-10 07:23:19 +00:00
|
|
|
{{ if .Site.IsServer }}
|
2018-07-26 17:34:02 +00:00
|
|
|
{{ $cssOpts := (dict "targetPath" "/css/main.css" "enableSourceMap" true ) }}
|
2018-07-20 16:27:34 +00:00
|
|
|
{{ $bundle := $bundleRaw | toCSS $cssOpts }}
|
2018-11-28 19:50:50 +00:00
|
|
|
<link rel="stylesheet" href="{{ $bundle.Permalink }}" media="screen">
|
2018-07-01 08:09:29 +00:00
|
|
|
{{ else }}
|
2018-07-26 17:34:02 +00:00
|
|
|
{{ $cssOpts := (dict "targetPath" "/css/main.css" ) }}
|
2018-07-10 07:23:19 +00:00
|
|
|
{{ $postCSSOpts := (dict "use" "autoprefixer" ) }}
|
2018-07-20 16:27:34 +00:00
|
|
|
{{ $bundle := $bundleRaw | toCSS $cssOpts | postCSS $postCSSOpts | minify | fingerprint }}
|
2019-01-25 14:31:09 +00:00
|
|
|
<link rel="stylesheet" href="{{ $bundle.Permalink }}" integrity="{{ $bundle.Data.Integrity }}" crossorigin="anonymous" 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 . }}
|
2019-01-25 14:31:09 +00:00
|
|
|
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" crossorigin="anonymous" media="screen">
|
2018-07-01 08:09:29 +00:00
|
|
|
{{- end }}
|