add theme support
All checks were successful
Hugo / build (push) Successful in 6s

This commit is contained in:
brooke 2024-06-18 19:04:31 -04:00
parent 3933e8792c
commit 07c353258f
5 changed files with 57 additions and 11 deletions

11
assets/css/blue.css Normal file
View file

@ -0,0 +1,11 @@
.highlight {
color: #4286f4 !important;
}
.curly {
color: #8d00c5 !important;
}
.square {
color: #66ffed !important;
}

11
assets/css/purple.css Normal file
View file

@ -0,0 +1,11 @@
.highlight {
color: #9966cc !important;
}
.curly {
color: #993374 !important;
}
.square {
color: #c77b7b !important;
}

11
assets/css/red.css Normal file
View file

@ -0,0 +1,11 @@
.highlight {
color: #e83e3e !important;
}
.curly {
color: #ef7373 !important;
}
.square {
color: #ffb0b0 !important;
}

View file

@ -24,6 +24,8 @@ params:
asciiArt: 2
theme: default
disableKinds:
- taxonomy
ignoreErrors:

View file

@ -1,11 +1,22 @@
{{- with resources.Get "css/main.css" }} {{- if eq hugo.Environment
"development" }}
{{- with resources.Get "css/main.css" }}
{{- if eq hugo.Environment "development" }}
<link rel="stylesheet" href="{{ .RelPermalink }}" />
{{- else }} {{- with . | minify | fingerprint }}
<link
rel="stylesheet"
href="{{ .RelPermalink }}"
integrity="{{ .Data.Integrity }}"
crossorigin="anonymous"
/>
{{- end }} {{- end }} {{- end }}
{{- else }}
{{- with . | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous" />
{{- end }}
{{- end }}
{{- end }}
{{- $theme := .Site.Params.theme }}
{{- if and $theme (ne $theme "default") }}
{{- with resources.Get (printf "css/%s.css" $theme) }}
{{- if eq hugo.Environment "development" }}
<link rel="stylesheet" href="{{ .RelPermalink }}" />
{{- else }}
{{- with . | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous" />
{{- end }}
{{- end }}
{{- end }}
{{- end }}