tomanistor/osprey

Use fontawesome in footer (and elsewhere)

FaGuoMa opened this issue · 1 comments

This is more of an improvement suggestion, and while I would love to do a PR I could sort out how to put the final touch to it (I really have no understanding of css/scss).
Basically, replacing the link texts by fontawesome logos in the footer would be (I think) pretty slick. I'm not to keen on loading a full set of icons so I figured I'd try the method outline here: https://www.client9.com/using-font-awesome-icons-in-hugo/

Steps

  1. created a content/fontawesome/ directory where I put svgs of the most likely to be used icons

  2. created a fontawesome.html in layout/partial and layout/shortcode with:

{{- $fname:=print "fontawesome/" . ".svg" -}} 2 {{- $path:="<path" -}} 3 {{- $fill:="<path fill=\"currentColor\"" -}} 4 {{ replace (readFile $fname) $path $fill | safeHTML }}

  1. copied footer.html in layout/partials

The issue is that there is no styling (size) of the svg and that it therefore messes the display. I have tried to inject some custom css (like .svg { } ) but to no avail. Tried to fiddle with the scss too, but with no results either.

PS: thanks for the theme, really. I wish I could contribute a bit more, but that's beyond my abilities :-)

kdevo commented

Small self-advertisement:
You might want to check out Osprey Delight (my fork of the theme with various other changes) which makes use of a very small subset of Font Awesome in the footer for the social links (example here).

Currently, there is a survey going on where you can vote on additional icons. Feedback and participation appreciated!