aboutsummaryrefslogtreecommitdiffstats
path: root/code/frontpage/layouts/partials/head/stylesheet.html
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2023-02-25 13:15:44 +0100
committerivarlovlie <git@ivarlovlie.no>2023-02-25 13:15:44 +0100
commit900bb5e845c3ad44defbd427cae3d44a4a43321f (patch)
treedf3d96a93771884add571e82336c29fc3d9c7a1c /code/frontpage/layouts/partials/head/stylesheet.html
downloadgreatoffice-900bb5e845c3ad44defbd427cae3d44a4a43321f.tar.xz
greatoffice-900bb5e845c3ad44defbd427cae3d44a4a43321f.zip
feat: Initial commit
Diffstat (limited to 'code/frontpage/layouts/partials/head/stylesheet.html')
-rw-r--r--code/frontpage/layouts/partials/head/stylesheet.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/code/frontpage/layouts/partials/head/stylesheet.html b/code/frontpage/layouts/partials/head/stylesheet.html
new file mode 100644
index 0000000..4dc25c0
--- /dev/null
+++ b/code/frontpage/layouts/partials/head/stylesheet.html
@@ -0,0 +1,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 }}" integrity="{{ $secureCSS.Data.Integrity }}" crossorigin="anonymous">
+{{ end -}}
+<noscript><style>img.lazyload { display: none; }</style></noscript> \ No newline at end of file