Skip to content

Commit f886c87

Browse files
committed
Fix issue with Font Awesome icons not rendering correctly on readthedocs.io
1 parent 61969b3 commit f886c87

6 files changed

Lines changed: 11 additions & 9 deletions

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
.md-secondary {color: var(--color-brand-content)}
44

55
/* Color for Font Awesome icons */
6-
span.fa {color: var(--color-brand-primary)}
6+
span.fa {color: var(--color-brand-primary)}
7+
span.fas {color: var(--color-brand-primary)}

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,10 @@
140140
html_js_files = ['collapsible_container.js']
141141
html_css_files = [
142142
'collapsible_container.css',
143-
'colors.sass',
143+
'colors.css',
144144
'table.css',
145145
'https://use.fontawesome.com/releases/v5.15.3/css/all.css',
146+
'https://use.fontawesome.com/releases/v5.15.3/css/v4-shims.css',
146147
]
147148
html_show_sphinx = False
148149
pygments_style = 'friendly'

pyinaturalist/models/identification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

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

pyinaturalist/models/life_list.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

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

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

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

4747
count_without_taxon: int = field(default=0)
4848
data: List[LifeListTaxon] = field(factory=list, converter=LifeListTaxon.from_json_list) # type: ignore

pyinaturalist/models/place.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def convert_optional_lat_long(obj: Union[Dict, List, None, str]):
2020

2121
@define_model
2222
class Place(BaseModel):
23-
""":fa:`map-marker-alt` A curated or community-contributed place. Handles data from the following endpoints:
23+
""":fa:`map-marker-alt,style=fas` A curated or community-contributed place. Handles data from the following endpoints:
2424
2525
* `GET /places/{id} <https://api.inaturalist.org/v1/docs/#!/Places/get_places_id>`_
2626
* `GET /places/nearby <https://api.inaturalist.org/v1/docs/#!/Places/get_places_nearby>`_

pyinaturalist/models/taxon.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __str__(self) -> str:
9090

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

267267
@define_model
268268
class TaxonCount(Taxon):
269-
""":fa:`dove` :fa:`list` A :py:class:`.Taxon` with an associated count, used in a :py:class:`.TaxonCounts`
269+
""":fa:`dove,style=fas` :fa:`list` A :py:class:`.Taxon` with an associated count, used in a :py:class:`.TaxonCounts`
270270
collection
271271
"""
272272

@@ -296,7 +296,7 @@ def __str__(self) -> str:
296296

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

0 commit comments

Comments
 (0)