rendering css

This commit is contained in:
Sean Dockray 2020-09-07 22:49:30 +10:00
parent 0344d646f8
commit f959140f2a
2 changed files with 6 additions and 5 deletions

1
static/css/site.css Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
{{ if eq hugo.Environment "gitea" }} {{ if (or (eq hugo.Environment "gitea") (eq hugo.Environment "preview") ) }}
<link rel="stylesheet" href="/css/site.css"> <link rel="stylesheet" href="/css/site.css">
{{ else if .Site.IsServer }} {{ else if .Site.IsServer }}
{{ $style := resources.Get "css/site.css" | postCSS (dict "config" "./assets/css/postcss.config.js") | minify | fingerprint }} {{ $style := resources.Get "css/site.css" | postCSS (dict "config" "./assets/css/postcss.config.js") | minify }}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}"> <link rel="stylesheet" href="{{ $style.Permalink }}">
{{ else }} {{ else }}
{{ $flist := newScratch }} {{ $flist := newScratch }}
{{ $flist.Set "initial" "nop" }} {{ $flist.Set "initial" "nop" }}
@ -21,7 +21,7 @@
{{ if in $css "css" }} {{ if in $css "css" }}
<link rel="stylesheet" href="{{ "/css/" }}{{ $css }}"> <link rel="stylesheet" href="{{ "/css/" }}{{ $css }}">
{{ else }} {{ else }}
{{ $style := resources.Get "css/site.css" | postCSS (dict "config" "./assets/css/postcss.config.js") | minify | fingerprint }} {{ $style := resources.Get "css/site.css" | postCSS (dict "config" "./assets/css/postcss.config.js") | minify }}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}"> <link rel="stylesheet" href="{{ $style.Permalink }}">
{{ end }} {{ end }}
{{ end }} {{ end }}