Add option to set colors in config file

This commit is contained in:
Gregory Trolliet 2020-04-27 21:39:46 +02:00
parent 578125c659
commit 2aaf20406d
5 changed files with 32 additions and 19 deletions

View file

@ -1,11 +1,19 @@
<!DOCTYPE html>
<html lang="fr">
{{- partial "head.html" . -}}
{{ if .Site.Params.colors }}
<style>
:root {
{{ range $key, $val := .Site.Params.colors }}
--{{ $key }}-color: {{ $val }};
{{ end }}
}
</style>
{{ end }}
<body>
{{- partial "header.html" . -}}
{{- block "main" . }}{{- end }}
{{- partial "footer.html" . -}}
{{- partial "header.html" . -}}
{{- block "main" . }}{{- end }}
{{- partial "footer.html" . -}}
</body>
</html>