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

github.com/naro143/hugo-coder-portfolio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenaud Hager <renaud.hager@gmail.com>2019-08-12 01:02:24 +0300
committerRenaud Hager <renaud.hager@gmail.com>2019-08-12 01:02:24 +0300
commitc4bc1120fe765908f7c5c13f239a465e77719fc4 (patch)
tree591ec6716bb68cd4cc895365fd4744eae9d92f02
parent781875e2ee424a4bc5dae3fdb3c32ac8cdbc38bb (diff)
Added a possibility to display icons for socials items.
-rw-r--r--layouts/partials/home.html12
1 files changed, 11 insertions, 1 deletions
diff --git a/layouts/partials/home.html b/layouts/partials/home.html
index 6c70cf4..2ee0cda 100644
--- a/layouts/partials/home.html
+++ b/layouts/partials/home.html
@@ -8,7 +8,17 @@
{{ with .Site.Params.social }}
<ul>
{{ range sort .}}
- <li><a href="{{ .url }}">{{ .name }}</a></li>
+ {{ if .icon }}
+ <li>
+ <a href="{{ .url }}" aria-label="{{ .name }}" {{ if .rel }}rel="{{ .rel }}"{{ end }}>
+ <i class="{{ .icon }}" aria-hidden="true"></i>
+ </a>
+ </li>
+ {{ else }}
+ <li>
+ <a href="{{ .url }}" aria-label="{{ .name }}" {{ if .rel }}rel="{{ .rel }}"{{ end }}>{{ .name }}</a>
+ </li>
+ {{ end }}
{{ end }}
</ul>
{{ end }}