Welcome to mirror list, hosted at ThFree Co, Russian Federation.

stylesheet.html « head « partials « layouts - github.com/h-enk/doks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2f5cab35e38560e412f82c5166b5b15bc32a5ca0 (plain)
1
2
3
4
5
6
7
8
9
10
11
{{ if eq (hugo.Environment) "development" -}}
  {{ $options := (dict "targetPath" "main.css" "enableSourceMap" true "includePaths" (slice "node_modules")) -}}
  {{ $css := resources.Get "scss/app.scss" | toCSS $options -}}
  <link rel="stylesheet" href="{{ $css.Permalink | relURL }}">
{{ 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" -}}
  <link rel="stylesheet" href="{{ $secureCSS.Permalink | relURL }}" integrity="{{ $secureCSS.Data.Integrity }}" crossorigin="anonymous">
{{ end -}}
<noscript><style>img.lazyload { display: none; }</style></noscript>