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 }}
|
2019-03-18 18:03:40 +00:00
|
|
|
<link rel="stylesheet" href="{{ $bundle.RelPermalink }}" 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-03-18 19:20:04 +00:00
|
|
|
<link rel="stylesheet" href="{{ $bundle.RelPermalink }}" 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-03-18 19:20:04 +00:00
|
|
|
<link rel="stylesheet" href="{{ $style.RelPermalink }}" integrity="{{ $style.Data.Integrity }}" crossorigin="anonymous" media="screen">
|
2018-07-01 08:09:29 +00:00
|
|
|
{{- end }}
|