mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-12-23 15:12:53 +00:00
2c5cfbc4b3
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" ```
7 lines
173 B
HTML
7 lines
173 B
HTML
<div class="social-icons">
|
|
{{ range .Site.Params.social }}
|
|
<a href="{{ .url }}">
|
|
<i class="{{ .icon_pack}} fa-{{ .icon}}"></i>
|
|
</a>
|
|
{{ end }}
|
|
</div>
|