diff options
author | Alison Presmanes Hill <apreshill@users.noreply.github.com> | 2018-12-14 11:32:50 +0300 |
---|---|---|
committer | Hanzei <16541325+hanzei@users.noreply.github.com> | 2018-12-14 11:32:50 +0300 |
commit | 2c5cfbc4b3792038963e9757edede994f0af8e8f (patch) | |
tree | 77ff9e94227bf4976cccd25ab0bbcd1a0d93b8e4 /layouts | |
parent | 3a6144e557b1ec8befb653ac0008ebe47f057d93 (diff) |
Add fa icon packs (#113)
This PR adds functionality for users to specify which `icon_pack` to use (`fas` or `fab`; see: https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4) in the `config.toml` file, so that users can use the solid icons as well as the brand icons.
```
[[params.social]]
url = "https://twitter.com/"
icon = "twitter" # icon name without the 'fa-'
icon_pack = "fab"
[[params.social]]
url = "https://facebook.com/"
icon = "facebook-f" # icon name without the 'fa-'
icon_pack = "fab"
[[params.social]]
url = "https://linkedin.com/"
icon = "linkedin-in" # icon name without the 'fa-'
icon_pack = "fab"
[[params.social]]
url = "mailto:youremail@email.com" # For a direct email link, use "mailto:test@example.org".
icon = "paper-plane" # icon name without the 'fa-'
icon_pack = "fas"
```
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/home/social.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/home/social.html b/layouts/partials/home/social.html index 54a846c..5750b6f 100644 --- a/layouts/partials/home/social.html +++ b/layouts/partials/home/social.html @@ -1,7 +1,7 @@ <div class="social-icons"> {{ range .Site.Params.social }} <a href="{{ .url }}"> - <i class="fab fa-{{ .icon}}"></i> + <i class="{{ .icon_pack}} fa-{{ .icon}}"></i> </a> {{ end }} </div> |