2020-05-17 21:55:19 +02:00
|
|
|
Fontawesome SVG for Sphinx
|
|
|
|
==========================
|
|
|
|
|
|
|
|
Install the module :
|
|
|
|
|
|
|
|
.. code:: bash
|
|
|
|
|
|
|
|
python setup.py install
|
|
|
|
|
|
|
|
Download SVGs from fontawesome website. Configure it
|
|
|
|
in your `conf.py`:
|
|
|
|
|
|
|
|
.. code:: python
|
|
|
|
|
|
|
|
fa_brands_path = '_static/fa/brands.svg'
|
2021-06-06 18:50:29 +02:00
|
|
|
fa_regular_path = '_static/fa/regular.svg'
|
|
|
|
fa_solid_path = '_static/fa/solid.svg'
|
2020-05-17 21:55:19 +02:00
|
|
|
|
|
|
|
Use inline references for brands, regular or solid:
|
|
|
|
|
|
|
|
.. code:: rst
|
|
|
|
|
|
|
|
Display an icon, with no alt text and aria-hidden:
|
|
|
|
|
|
|
|
:fab:`icon`
|
|
|
|
:far:`icon`
|
|
|
|
:fas:`icon`
|
|
|
|
|
2021-06-06 18:50:29 +02:00
|
|
|
:fab:`icon[alt text]`
|
|
|
|
:far:`icon[alt text]`
|
|
|
|
:fas:`icon[alt text]`
|
|
|
|
|
2020-05-17 21:55:19 +02:00
|
|
|
An icon with some attributes:
|
|
|
|
|
|
|
|
.. far:: icon
|
|
|
|
:class: myclass
|
|
|
|
:id: myid
|
|
|
|
:alt: alt text
|
|
|
|
|
|
|
|
For links with fasvglink and icon name as classes.
|
|
|
|
This can be used to create fancy social links
|
|
|
|
|
|
|
|
:fablink:`icon: Text <url>`
|
|
|
|
:farlink:`icon: Text <url>`
|
|
|
|
:faslink:`icon: Text <url>`
|
|
|
|
|
2021-06-06 18:50:29 +02:00
|
|
|
:fablink:`icon: Text[alt text] <url>`
|
|
|
|
:farlink:`icon: Text[alt text] <url>`
|
|
|
|
:faslink:`icon: Text[alt text] <url>`
|
|
|
|
|
2020-05-17 21:55:19 +02:00
|
|
|
.. warning::
|
|
|
|
|
|
|
|
Icon is not inserted in LaTeX document for now.
|
|
|
|
It uses alt text for all builders except HTML and
|
|
|
|
ePub.
|
|
|
|
|
|
|
|
By kujiu, EUPL 1.2 licence.
|