django-fontawesome icon indicating copy to clipboard operation
django-fontawesome copied to clipboard

Make the plugin font icon agnostic

Open pavillet opened this issue 6 years ago • 0 comments

The purpose of this pull request is to make the plugin font icon agnostic, which tenfold its usefulness :) Also people could create their own collection of icons if needed

I'm not sure it's enough but I wanted to see if you would be interested in it. The idea is that we could use other fonts ( and even custom ones ) instead of FA.

Mostly the function to fetch the icons is now a settings ( or yours if none ).

FONTAWESOME_CSS_URL = '/static/scss/icon-font.css'  # relative url
FONTAWESOME_ICON_CHOICE = "path.to.function" # Should return a tuple [('icon-teacher', 'Teacher')]
FONTAWESOME_PREFIX = 'icon '  # default is 'fa'
FONTAWESOME_PREFIX_ICON = ''  # default is 'fa-'

Below is an exemple of what those 3 settings produce

capture d ecran 2018-06-12 a 22 17 11

pavillet avatar Jun 12 '18 20:06 pavillet