Move all layouts to platters theme
This commit is contained in:
parent
de8101efed
commit
66adceaf24
91 changed files with 0 additions and 0 deletions
28
themes/platters/layouts/partials/resources/section_css.html
Normal file
28
themes/platters/layouts/partials/resources/section_css.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
{{ $stylesheetName := printf "styles/%s.css" .Section }}
|
||||
|
||||
{{ $stylesheets := slice }}
|
||||
{{ if gt (len .Section) 0 }}
|
||||
{{ with resources.Match (printf "styles/%s/*" .Section) }}
|
||||
{{ $stylesheets = . }}
|
||||
{{ else }}
|
||||
{{ with resources.Get $stylesheetName }}
|
||||
{{ $stylesheets = (slice .) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $sectionStylesheets := slice }}
|
||||
{{ if $stylesheets }}
|
||||
{{ range $stylesheets }}
|
||||
{{ $sectionStylesheets = $sectionStylesheets | append (. | resources.ExecuteAsTemplate .Name .) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $sectionStylesheets = slice ($sectionStylesheets
|
||||
| resources.Concat $stylesheetName
|
||||
| minify
|
||||
| fingerprint "md5") }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ return $sectionStylesheets }}
|
Loading…
Add table
Add a link
Reference in a new issue