blob: e280aa5c0f2a6ce116b4de1b8d6898f77ec04f83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<!-- Fonts and icon CSS -->
<link rel="stylesheet" href="{{ "/css/font-awesome.min.css" | relURL }}">
{{ $file := "sass/style.sass" }}
{{ if .Site.IsServer }}
{{ $cssOpts := (dict "targetPath" "styles/main.css" "enableSourceMap" true ) }}
{{ $styles := resources.Get $file | resources.ExecuteAsTemplate "style/main.tmp.css" . | toCSS $cssOpts }}
<link rel="stylesheet" href="{{ $styles.Permalink }}" media="screen">
{{ else }}
{{ $cssOpts := (dict "targetPath" "styles/main.css" ) }}
{{ $postCSSOpts := (dict "use" "autoprefixer" ) }}
{{ $styles := resources.Get $file | resources.ExecuteAsTemplate "style/main.tmp.css" . | toCSS $cssOpts | postCSS $postCSSOpts | minify | fingerprint }}
<link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen">
{{ end }}
<!-- Custom css -->
{{ range .Site.Params.customCSS -}}
<link rel="stylesheet" href="{{ . | relURL }}">
{{- end }}
|