aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/head
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2023-10-02 09:02:20 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2023-10-02 09:02:20 +0200
commit2c17fbcdf8ea36d9d10dba243db94de85575e8ed (patch)
tree6609bbe9837d851f3d0be160f025285606465dc4 /layouts/partials/head
parentc6ef2fd7aeff28abfd4ec372262de3ecd4684c04 (diff)
chore: Copy theme layouts
Diffstat (limited to 'layouts/partials/head')
-rw-r--r--layouts/partials/head/styles.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/layouts/partials/head/styles.html b/layouts/partials/head/styles.html
new file mode 100644
index 0000000..68577ce
--- /dev/null
+++ b/layouts/partials/head/styles.html
@@ -0,0 +1,13 @@
+{{/* Resources */}}
+{{- $tailwind := resources.Get "css/tailwind.css" | postCSS (dict "config" "./config/postcss.config.js") -}}
+
+{{/* Processor */}}
+{{- $styles := slice $tailwind | resources.Concat "css/app.css" -}}
+
+{{/* Output */}}
+{{- if eq hugo.Environment "development" -}}
+<link rel="stylesheet" href="{{ $styles.Permalink | absURL }}">
+{{- else -}}
+{{- $styles := $styles | minify | fingerprint | resources.PostProcess -}}
+<link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" >
+{{- end -}}