Skip to content

Commit

Permalink
review requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Nov 1, 2022
1 parent 929879e commit e7f1b98
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/admonitions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ This will only work with `any of the icons bundled with this theme
}
.. code-annotations::
#. Uses the icon :md-icon:`octicons/eye-24`
#. Uses the icon :si-icon:`octicons/eye-24`

Then, use the the generated CSS variable :css:`--md-admonition-icon--seealso` in the custom CSS for
the :css:`mask-image` rules.
Expand Down
9 changes: 9 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,15 @@

jinja_contexts = {
"sys": {"sys": sys},
"repo_icons": {"repo_icons": [
"fontawesome/brands/git",
"fontawesome/brands/git-alt",
"fontawesome/brands/github",
"fontawesome/brands/github-alt",
"fontawesome/brands/gitlab",
"fontawesome/brands/gitkraken",
"fontawesome/brands/bitbucket",
]}
}


Expand Down
20 changes: 9 additions & 11 deletions docs/customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,11 @@ Configuration Options
settings. Although this icon can be `any of the icons bundled with this theme`_,
popular choices are:

- :md-icon:`fontawesome/brands/git` ``fontawesome/brands/git``
- :md-icon:`fontawesome/brands/git-alt` ``fontawesome/brands/git-alt``
- :md-icon:`fontawesome/brands/github` ``fontawesome/brands/github``
- :md-icon:`fontawesome/brands/github-alt` ``fontawesome/brands/github-alt``
- :md-icon:`fontawesome/brands/gitlab` ``fontawesome/brands/gitlab``
- :md-icon:`fontawesome/brands/gitkraken` ``fontawesome/brands/gitkraken``
- :md-icon:`fontawesome/brands/bitbucket` ``fontawesome/brands/bitbucket``
.. jinja:: repo_icons

{% for icon in repo_icons %}
- :si-icon:`{{icon}}` ``{{icon}}``
{% endfor %}

.. important::
This option has no effect if the :themeconf:`repo_url` option is not specified.
Expand Down Expand Up @@ -362,10 +360,10 @@ Configuration Options

.. csv-table::

:md-icon:`material/toggle-switch-off-outline` ``material/toggle-switch-off-outline``, :md-icon:`material/toggle-switch` ``material/toggle-switch``
:md-icon:`material/weather-sunny` ``material/weather-sunny``, :md-icon:`material/weather-night` ``material/weather-night``
:md-icon:`material/eye-outline` ``material/eye-outline``, :md-icon:`material/eye` ``material/eye``
:md-icon:`material/lightbulb-outline` ``material/lightbulb-outline``, :md-icon:`material/lightbulb` ``material/lightbulb``
:si-icon:`material/toggle-switch-off-outline` ``material/toggle-switch-off-outline``, :si-icon:`material/toggle-switch` ``material/toggle-switch``
:si-icon:`material/weather-sunny` ``material/weather-sunny``, :si-icon:`material/weather-night` ``material/weather-night``
:si-icon:`material/eye-outline` ``material/eye-outline``, :si-icon:`material/eye` ``material/eye``
:si-icon:`material/lightbulb-outline` ``material/lightbulb-outline``, :si-icon:`material/lightbulb` ``material/lightbulb``

.. themeconf:: media (palette preference)

Expand Down
14 changes: 7 additions & 7 deletions docs/inline_icons.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This theme has a builtin role to use icons within lines of text.
.. warning::
Using icons in the table of contents or navigation menu is not supported.

.. rst:role:: md-icon
.. rst:role:: si-icon
Set the content of this role to a relative path of an SVG image (excluding the ``.svg`` file
extension). This path shall be relative to
Expand All @@ -29,10 +29,10 @@ The following sets of icons are bundled with this theme:

.. rst-example:: Using a builtin icon

- :md-icon:`material/material-design` `Material Design <https://materialdesignicons.com/>`_
- :md-icon:`fontawesome/regular/font-awesome` `Font Awesome <https://fontawesome.com/search?m=free>`_
- :md-icon:`octicons/mark-github-16` `Octicons <https://octicons.github.com/>`_
- :md-icon:`simple/simpleicons` `Simple Icons <https://simpleicons.org/>`_
- :si-icon:`material/material-design` `Material Design <https://materialdesignicons.com/>`_
- :si-icon:`fontawesome/regular/font-awesome` `Font Awesome <https://fontawesome.com/search?m=free>`_
- :si-icon:`octicons/mark-github-16` `Octicons <https://octicons.github.com/>`_
- :si-icon:`simple/simpleicons` `Simple Icons <https://simpleicons.org/>`_

You can also browse these icons locally from the sphinx-immaterial theme's install path under
``path/to/sphinx-immaterial/sphinx_immaterial/.icons/``.
Expand All @@ -46,7 +46,7 @@ list of CSS classes, and don't forget to separate the icon's path and CSS classe

.. rst-example:: Using an icon with custom CSS

This is a paragraph with :md-icon:`fontawesome/solid/heart;pulsing-heart` an animated icon
This is a paragraph with :si-icon:`fontawesome/solid/heart;pulsing-heart` an animated icon
using the following CSS rules:

.. literalinclude:: _static/extra_css.css
Expand Down Expand Up @@ -80,6 +80,6 @@ folder (which is specified using `html_static_path`).

.. rst-example::

This icon :md-icon:`sphinx_logo` is located in
This icon :si-icon:`sphinx_logo` is located in
`docs/_static/sphinx_logo.svg
<https://github.com/jbms/sphinx-immaterial/blob/main/docs/_static/sphinx_logo.svg>`_

0 comments on commit e7f1b98

Please sign in to comment.