Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dataCobra/hugo-vitae.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleozqi <80483499+leozqi@users.noreply.github.com>2021-09-15 20:02:25 +0300
committerleozqi <80483499+leozqi@users.noreply.github.com>2021-09-15 20:23:34 +0300
commit33634993c4e64a564c7c63fc6847558b083c10a2 (patch)
treec86665568a975ebff7a2d7c404f28fadf21f1f0d
parentce1dfd1d3dc1e298aea81ebb4120f235a02247cb (diff)
Fix dark mode toggle when no social links are added
Fixes dark mode icon disappearing when no social links are specified in `config.toml`.
-rw-r--r--layouts/partials/header.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index a36c370..491cfe7 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -25,9 +25,9 @@
{{- else }}
<div id="title-social">
{{- end }}
-{{- if isset .Site.Params "social" }}
<div id="social">
<nav><ul>
+{{- if isset .Site.Params "social" }}
{{- range $index, $key := .Site.Params.Social }}
{{- if $key.url }}
<li><a href="{{ relURL $key.url }}"><i title="{{ $key.name }}" class="icons {{ $key.icon }}"></i></a></li>
@@ -35,10 +35,10 @@
<li><a href="{{ $key.cmd }}"><i title="{{ $key.name }}" class="icons {{ $key.icon }}"></i></a></li>
{{- end }}
{{- end }}
+{{- end }}
<li><a><i title="Switch Dark Mode" class="dark-mode icons fas fa-moon"></i></a></li>
</ul></nav>
</div>
-{{- end }}
</div>
{{- if isset .Site.Menus "main" }}
<div id="mainmenu">