{{ $cssRes := .Site.Data.resources.css }}
{{ $vendor := .Site.Params.vendors.plugins }}
{{ $router := .Scratch.Get "router" }}
{{ range $css := $cssRes }}
{{ $pluginCss := partial "_funs/get_cdn_res.html" (dict "res" . "vendor" $vendor "router" $router) }}
{{ end }}
{{ $scss := resources.Get "css/main.scss" }}
{{ $scss = $scss | resources.ExecuteAsTemplate "main.scss" . }}
{{ $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }}
{{ if hugo.IsProduction }}
{{ $css = $css | minify }}
{{ end }}
{{ $unixHref := partial "_funs/add_unix_param.html" $css.RelPermalink }}
{{ $custom := .Scratch.Get "style" }}
{{ if $custom }}
{{ $unixHref := partial "_funs/add_unix_param.html" $custom }}
{{ end }}