'django social share button icons
I'm trying to add the functionality to share a workout post to social media, and found that the django-social-share package is the best.
Everything works, but I'm curious how to add an icon over the link, as it currently looks like
Post to Facebook!
which is very bland. I've seen examples of adding CSS, but since the package works like
{% post_to_facebook object_or_url "Post to Facebook!" %}
I'm not sure how you could target that with CSS. Any help is appreciated.
Solution 1:[1]
You don't need to override the templates, you don't need to create new templates.
Just write the fontawesome icon code after object_or_url as shown below.
This works perfectly.
{% post_to_facebook object_or_url '<i class="fab fa-facebook"></i>' %}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Bickky Sahani |
