springheel.socialbuttons module¶
Show icons and links to social media sites.
- springheel.socialbuttons.getButtons(site: springheel.classes.Site, translated_strings: dict) → Tuple[list, str]¶
Show social media icons on the site as desired.
- Parameters
- siteSite
The site for which icons are being generated.
- translated_stringsdict
The translation file contents for this site.
- Returns
- social_linkslist of dict
Dictionaries with metadata about other sites.
- iconsstr
HTML img elements that hyperlink to other sites.
- springheel.socialbuttons.wrapImage(link: str, title: str, image: str) → str¶
Enclose an image in a hyperlink.
- Parameters
- linkstr
The URL to use as the hyperlink location.
- titlestr
A string to use as alt text for the image.
- imagestr
A filename in socialbuttons to use for the image.
- Returns
- str
An HTML anchor containing the image.
Notes
Assumes that the image in question will be present in output/socialbuttons.