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

github.com/ojroques/hugo-researcher.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Roques <ojroques@users.noreply.github.com>2021-04-29 21:53:19 +0300
committerGitHub <noreply@github.com>2021-04-29 21:53:19 +0300
commit41641db52665a1fb8a7b4083545a6b8f0249e817 (patch)
treec22fd4c2f4e90afbe99373510ffc82fc3f7ccf09
parent1d08af5a7f1f36ca5253a2b5982403d6be2ca749 (diff)
parented093b5ba556677cf0aeba1c733cf86ecde96090 (diff)
Merge pull request #18 from aniolm9/footer-social-icons
New feature: Add social icons in footer
-rw-r--r--exampleSite/config.toml8
-rw-r--r--layouts/partials/footer.html7
-rw-r--r--layouts/partials/head.html1
3 files changed, 15 insertions, 1 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 4b4f741..1ca459a 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -20,6 +20,14 @@ googleAnalytics = "" # add your tracking id
avatarSize = "90px"
colorBlack = "#222222"
colorRed = "#dc3545"
+ [[params.socialIcons]]
+ icon = "fab fa-twitter"
+ title = "Twitter"
+ url = "https://twitter.com/"
+ [[params.socialIcons]]
+ icon = "fas fa-envelope"
+ title = "E-mail"
+ url = "mailto:mail@example.com"
[permalinks]
"/" = "/:filename"
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 192130b..1574aac 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,6 +1,11 @@
<div id="footer" class="mb-5">
+ <hr>
+ <div class="container text-center">
+ {{ range $item := .Site.Params.socialIcons }}
+ <a href="{{ $item.url }}" class="{{ $item.icon }} fa-1x" title="{{ $item.title }}"></a>
+ {{ end }}
+ </div>
{{ with .Site.Params.footer }}
- <hr>
<div class="container text-center">
<a href="{{ .url | absURL }}" title="{{ .text }}"><small>{{ .text }}</small></a>
</div>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 6a9d119..df307bb 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -8,6 +8,7 @@
<link href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous">
{{ $style := resources.Get "sass/researcher.scss" | resources.ExecuteAsTemplate "sass/researcher.scss" . | toCSS | minify }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">