Add option to set colors in config file
This commit is contained in:
parent
578125c659
commit
2aaf20406d
5 changed files with 32 additions and 19 deletions
|
@ -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>
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
<footer class="footer" style="
|
||||
{{ if $.Site.Params.colors.main }}background-color: {{ $.Site.Params.colors.main }};{{ end }}
|
||||
{{ if $.Site.Params.colors.alt_text }}color: {{ $.Site.Params.colors.alt_text }};{{ end }}
|
||||
">
|
||||
<address class="footer_contact">
|
||||
{{ if $.Site.Params.contact.email }}
|
||||
<p class="footer_item">
|
||||
<img class="page-icon" src="/svg/envelope.svg"/>
|
||||
<a href="mailto:{{ $.Site.Params.contact.email}}" class="footer_link" alt="Email"
|
||||
style="{{ if $.Site.Params.colors.alt_text }}color: {{ $.Site.Params.colors.alt_text }};{{ end }}">
|
||||
<a href="mailto:{{ $.Site.Params.contact.email}}" class="footer_link" alt="Email">
|
||||
{{ $.Site.Params.contact.email }}
|
||||
</a>
|
||||
</p>
|
||||
|
@ -16,8 +13,7 @@
|
|||
{{ if $.Site.Params.contact.phone }}
|
||||
<p class="footer_item">
|
||||
<img class="page-icon" src="/svg/phone.svg"/>
|
||||
<a href="tel:{{ $.Site.Params.contact.phone}}" class="footer_link" alt="Phone"
|
||||
style="{{ if $.Site.Params.colors.alt_text }}color: {{ $.Site.Params.colors.alt_text }};{{ end }}">
|
||||
<a href="tel:{{ $.Site.Params.contact.phone}}" class="footer_link" alt="Phone">
|
||||
{{ $.Site.Params.contact.phone }}
|
||||
</a>
|
||||
</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue