mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-21 18:11:37 +01:00
[BREAKING] Split-up css into sub-parts (#317)
* Move styles into 3 different locations - core - common - hljs * Load all stylesheets in proper order
This commit is contained in:
parent
b6af9eddee
commit
e503367a1a
@ -27,11 +27,18 @@
|
||||
<meta name="msvalidate.01" content="{{ .Site.Params.analytics.bing.SiteVerificationTag }}" />
|
||||
{{- end}}
|
||||
<!-- Styles -->
|
||||
{{- $common := (resources.Match "css/*.css") | resources.Concat "assets/css/common.css" }}
|
||||
{{- $theme_vars := (resources.Get "css/core/theme-vars.css") }}
|
||||
{{- $reset := (resources.Get "css/core/reset.css") }}
|
||||
{{- $media := (resources.Get "css/core/zmedia.css") }}
|
||||
{{- $hljs := (resources.Get "css/hljs/an-old-hope.min.css") }}
|
||||
{{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }}
|
||||
|
||||
{{- /* order is important */}}
|
||||
{{- $core := (slice $theme_vars $reset $common $hljs $media) | resources.Concat "assets/css/core.css" }}
|
||||
{{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" }}
|
||||
{{- /* bundle all required css */}}
|
||||
{{- /* Add extended css after theme style */ -}}
|
||||
{{- $stylesheet := (slice $common $extended) | resources.Concat "assets/css/stylesheet.css" | minify }}
|
||||
{{- $stylesheet := (slice $core $extended) | resources.Concat "assets/css/stylesheet.css" | minify }}
|
||||
|
||||
{{- if not .Site.Params.assets.disableFingerprinting }}
|
||||
{{- $stylesheet := $stylesheet | fingerprint -}}
|
||||
|
Loading…
Reference in New Issue
Block a user