Skip to content

Commit

Permalink
Fix issue with Font Awesome icons not rendering correctly on readthed…
Browse files Browse the repository at this point in the history
…ocs.io
  • Loading branch information
JWCook committed Jul 14, 2021
1 parent 61969b3 commit f886c87
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion docs/_static/colors.sass → docs/_static/colors.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
.md-secondary {color: var(--color-brand-content)}

/* Color for Font Awesome icons */
span.fa {color: var(--color-brand-primary)}
span.fa {color: var(--color-brand-primary)}
span.fas {color: var(--color-brand-primary)}
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,10 @@
html_js_files = ['collapsible_container.js']
html_css_files = [
'collapsible_container.css',
'colors.sass',
'colors.css',
'table.css',
'https://use.fontawesome.com/releases/v5.15.3/css/all.css',
'https://use.fontawesome.com/releases/v5.15.3/css/v4-shims.css',
]
html_show_sphinx = False
pygments_style = 'friendly'
Expand Down
2 changes: 1 addition & 1 deletion pyinaturalist/models/identification.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

@define_model
class Identification(BaseModel):
""":fa:`fingerprint` An observation identification, based on the schema of
""":fa:`fingerprint,style=fas` An observation identification, based on the schema of
`GET /identifications <https://api.inaturalist.org/v1/docs/#!/Identifications/get_identifications>`_.
"""

Expand Down
4 changes: 2 additions & 2 deletions pyinaturalist/models/life_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

@define_model
class LifeListTaxon(TaxonCount):
""":fa:`dove` :fa:`list` A single :py:class:`.Taxon` in a user's :py:class:`.LifeList`"""
""":fa:`dove,style=fas` :fa:`list` A single :py:class:`.Taxon` in a user's :py:class:`.LifeList`"""

descendant_obs_count: int = field(default=0, doc='Number of observations of taxon children')
direct_obs_count: int = field(
Expand Down Expand Up @@ -42,7 +42,7 @@ def __str__(self) -> str:

@define_model_collection
class LifeList(TaxonCounts):
""":fa:`dove` :fa:`list` A user's life list, based on the schema of ``GET /observations/taxonomy``"""
""":fa:`dove,style=fas` :fa:`list` A user's life list, based on the schema of ``GET /observations/taxonomy``"""

count_without_taxon: int = field(default=0)
data: List[LifeListTaxon] = field(factory=list, converter=LifeListTaxon.from_json_list) # type: ignore
Expand Down
2 changes: 1 addition & 1 deletion pyinaturalist/models/place.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def convert_optional_lat_long(obj: Union[Dict, List, None, str]):

@define_model
class Place(BaseModel):
""":fa:`map-marker-alt` A curated or community-contributed place. Handles data from the following endpoints:
""":fa:`map-marker-alt,style=fas` A curated or community-contributed place. Handles data from the following endpoints:
* `GET /places/{id} <https://api.inaturalist.org/v1/docs/#!/Places/get_places_id>`_
* `GET /places/nearby <https://api.inaturalist.org/v1/docs/#!/Places/get_places_nearby>`_
Expand Down
6 changes: 3 additions & 3 deletions pyinaturalist/models/taxon.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __str__(self) -> str:

@define_model
class Taxon(BaseModel):
""":fa:`dove` An iNaturalist taxon, based on the schema of
""":fa:`dove,style=fas` An iNaturalist taxon, based on the schema of
`GET /taxa <https://api.inaturalist.org/v1/docs/#!/Taxa/get_taxa>`_.
Can be constructed from either a full or partial JSON record. Examples of partial records
Expand Down Expand Up @@ -266,7 +266,7 @@ def __str__(self) -> str:

@define_model
class TaxonCount(Taxon):
""":fa:`dove` :fa:`list` A :py:class:`.Taxon` with an associated count, used in a :py:class:`.TaxonCounts`
""":fa:`dove,style=fas` :fa:`list` A :py:class:`.Taxon` with an associated count, used in a :py:class:`.TaxonCounts`
collection
"""

Expand Down Expand Up @@ -296,7 +296,7 @@ def __str__(self) -> str:

@define_model_collection
class TaxonCounts(BaseModelCollection):
""":fa:`dove` :fa:`list` A collection of taxa with an associated counts. Used with
""":fa:`dove,style=fas` :fa:`list` A collection of taxa with an associated counts. Used with
`GET /observations/species_counts <https://api.inaturalist.org/v1/docs/#!/Observations/get_observations_species_counts>`_.
as well as :py:class:`.LifeList`.
"""
Expand Down

0 comments on commit f886c87

Please sign in to comment.