implements tailwind v4 and removes scss

This commit is contained in:
Drew
2025-04-22 11:41:16 -06:00
parent 255cd357c5
commit fbc26ed89c
13 changed files with 946 additions and 2281 deletions

View File

@ -82,16 +82,7 @@
<!-- CSS Variables and Styles -->
{{ partial "css-variables.html" . }}
{{/* Main Styles */}}
{{ $styles := resources.Get "scss/main.scss" }}
{{ $styles = $styles | resources.ToCSS (dict "targetPath" "css/styles.css" "enableSourceMap" true) }}
{{ $styles = $styles | resources.PostCSS }}
{{ if hugo.IsProduction }}
{{ $styles = $styles | minify | fingerprint | resources.PostProcess }}
{{ end }}
<link href="{{ $styles.RelPermalink }}" rel="stylesheet" />
{{ partial "css.html" . }}
</head>
<body class="">
{{ partial "header.html" . }}

23
layouts/partials/css.html Normal file
View File

@ -0,0 +1,23 @@
{{ with (templates.Defer (dict "key" "global")) }}
{{ $t := debug.Timer "tailwindcss" }}
{{ with resources.Get "css/styles.css" }}
{{ $opts := dict
"inlineImports" true
"optimize" (not hugo.IsDevelopment)
}}
{{ with . | css.TailwindCSS $opts }}
{{ if hugo.IsDevelopment }}
<link rel="stylesheet" href="{{ .RelPermalink }}" />
{{ else }}
{{ with . | minify | fingerprint }}
<link
rel="stylesheet"
href="{{ .RelPermalink }}"
integrity="{{ .Data.Integrity }}"
crossorigin="anonymous" />
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ $t.Stop }}
{{ end }}