implements tailwind v4 and removes scss
This commit is contained in:
@ -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
23
layouts/partials/css.html
Normal 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 }}
|
Reference in New Issue
Block a user