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:
authordataCobra <datacobra@mailbox.org>2020-09-01 18:19:08 +0300
committerdataCobra <datacobra@mailbox.org>2020-09-01 18:19:08 +0300
commit6418edae82c58285955bf29470c4f1bdcd1b2a06 (patch)
tree5f0b126a0f730f4b6789d9053afc82c3dd5a76a3
parent94a28bafbfa328d2ebdff955bc482d16e0d32a7e (diff)
parent43c31a2f087daef87e49562f3e19b66de8a483c3 (diff)
Merge branch 'develop'2.1.1-1
* develop: Add cmd option for .Site.Params.social This merge adds a quickfix commit.
-rw-r--r--exampleSite/config.toml5
-rw-r--r--layouts/partials/header.html4
2 files changed, 9 insertions, 0 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index c1b5fbe..bc5fef0 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -111,6 +111,11 @@ name = "Github"
icon = "fab fa-github"
url = "https://github.com/dataCobra/hugo-vitae"
+#[[params.social]]
+#name = "Email"
+#icon = "fas fa-envelope"
+#cmd = "mailto:example@example.com"
+
[[params.social]]
name = "RSS"
icon = "fas fa-rss"
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index b5caddc..27727df 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -21,7 +21,11 @@
<nav>
<ul>
{{- 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>
+ {{- else -}}
+ <li><a href="{{ $key.cmd }}"><i title="{{ $key.name }}" class="icons {{ $key.icon }}"></i></a></li>
+ {{- end -}}
{{- end -}}
</ul>
</nav>