Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

Commit ffae4ac

Browse files
authored
css.html template cleanup (#90)
There is no change in the generated site, I just moved the whitespace-trim marker from the front to the end of the template directives syntax. Signed-off-by: Patrice Chalin <pchalin@gmail.com>
1 parent 1acdad8 commit ffae4ac

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

layouts/partials/css.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
{{- $inServerMode := site.IsServer }}
2-
{{- $includePaths := (slice "node_modules") }}
3-
{{- $sass := "sass/custom.sass" }}
4-
{{- $cssOutput := "css/style.css" }}
5-
{{- $devOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "enableSourceMap" true) }}
6-
{{- $prodOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "outputStyle" "compressed") }}
7-
{{- $cssOpts := cond $inServerMode $devOpts $prodOpts }}
8-
{{- $css := resources.Get $sass | resources.ExecuteAsTemplate "blah.sass" . | toCSS $cssOpts }}
9-
{{- if $inServerMode }}
1+
{{ $inServerMode := site.IsServer -}}
2+
{{ $includePaths := (slice "node_modules") -}}
3+
{{ $sass := "sass/custom.sass" -}}
4+
{{ $cssOutput := "css/style.css" -}}
5+
{{ $devOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "enableSourceMap" true) -}}
6+
{{ $prodOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "outputStyle" "compressed") -}}
7+
{{ $cssOpts := cond $inServerMode $devOpts $prodOpts -}}
8+
{{ $css := resources.Get $sass | resources.ExecuteAsTemplate "blah.sass" . | toCSS $cssOpts -}}
9+
{{ if $inServerMode -}}
1010
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
11-
{{- else }}
12-
{{- $prodCss := $css | fingerprint }}
11+
{{ else -}}
12+
{{ $prodCss := $css | fingerprint -}}
1313
<link rel="stylesheet" href="{{ $prodCss.RelPermalink }}" integrity="{{ $prodCss.Data.Integrity }}">
14-
{{- end }}
14+
{{ end -}}

0 commit comments

Comments
 (0)