portails/layouts/partials/head/stylesheet.html

11 lines
796 B
HTML
Raw Normal View History

2020-04-15 15:48:16 +02:00
{{ if eq (hugo.Environment) "development" -}}
{{ $options := (dict "targetPath" "main.css" "enableSourceMap" true "includePaths" (slice "node_modules")) -}}
{{ $css := resources.Get "scss/app.scss" | toCSS $options -}}
2021-04-02 19:45:05 +02:00
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
2020-04-15 15:48:16 +02:00
{{ else -}}
{{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "includePaths" (slice "node_modules")) -}}
{{ $css := resources.Get "scss/app.scss" | toCSS $options | postCSS (dict "config" "config/postcss.config.js") -}}
{{ $secureCSS := $css | resources.Fingerprint "sha512" -}}
2021-04-02 19:45:05 +02:00
<link rel="stylesheet" href="{{ $secureCSS.RelPermalink }}" integrity="{{ $secureCSS.Data.Integrity }}" crossorigin="anonymous">
2020-04-15 15:48:16 +02:00
{{ end -}}
<noscript><style>img.lazyload { display: none; }</style></noscript>