portails/layouts/partials/head/stylesheet.html

11 lines
799 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-09-03 13:49:33 +02:00
<link rel="stylesheet" href="{{ $css.Permalink | relURL }}">
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-09-28 16:26:15 +02:00
<link rel="stylesheet" href="{{ $secureCSS.Permalink }}" integrity="{{ $secureCSS.Data.Integrity }}" crossorigin="anonymous">
2020-04-15 15:48:16 +02:00
{{ end -}}
<noscript><style>img.lazyload { display: none; }</style></noscript>