Skip to content

Commit

Permalink
rm: fontawesome support (#1266)
Browse files Browse the repository at this point in the history
* rm: fontawesome support

* rm: variable
  • Loading branch information
dgarcia360 authored Oct 21, 2024
1 parent 0ca3088 commit 9a8ae54
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/source/examples/hero-box.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The ``hero-box`` directive supports the following options:
* - ``button_icon``
- string
-
- fa fa-home
- icon-home
- A list of CSS classes to render an icon, separated by comma or space.
* - ``button_icon_position``
- string
Expand Down
6 changes: 3 additions & 3 deletions docs/source/examples/topic-box.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The ``topic-box`` directive supports the following options:
* - ``icon``
- string
-
- fa fa-home
- icon-home
- A list of CSS classes to render icons, separated by comma or space.
* - ``image``
- string
Expand Down Expand Up @@ -77,7 +77,7 @@ Using:
.. topic-box::
:title: Lorem Ipsum
:icon: fa fa-github
:icon: icon-github
:link: #
:anchor: Lorem ipsum
Expand All @@ -87,7 +87,7 @@ Results in:

.. topic-box::
:title: Lorem Ipsum
:icon: fa fa-github
:icon: icon-github
:link: #
:anchor: Lorem ipsum

Expand Down
4 changes: 2 additions & 2 deletions sphinx_scylladb_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ def override_rst_epilog(config):
.. role:: raw-html(raw)
:format: html
.. |v| replace:: :raw-html:`<i class="inline-icon fa fa-check" aria-hidden="true"></i>`
.. |x| replace:: :raw-html:`<i class="inline-icon fa fa-times" aria-hidden="true"></i>`
.. |v| replace:: :raw-html:`<i class="inline-icon icon-check" aria-hidden="true"></i>`
.. |x| replace:: :raw-html:`<i class="inline-icon icon-cancel" aria-hidden="true"></i>`
"""

epilog = config.rst_epilog or ""
Expand Down
2 changes: 1 addition & 1 deletion sphinx_scylladb_theme/extensions/topic_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def run(self):
generate_template(
"""
<div class="{class_name}__anchor">{anchor}
<i class="fa fa-external-link" aria-hidden="true"></i>
<i class="icon-newtab" aria-hidden="true"></i>
</div>
"""
if target_attr == 'target="_blank"'
Expand Down
3 changes: 0 additions & 3 deletions sphinx_scylladb_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@
{% include 'scylladb-scripts.html' %}
{% endif %}
{% endblock %}
<!-- Font Awesome -->
<script src="https://kit.fontawesome.com/b1870adf6a.js" crossorigin="anonymous"></script>
<!-- End Font Awesome -->
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion sphinx_scylladb_theme/static/css/main.css

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions src/css/base/_reset.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "sass:map";

html {
box-sizing: border-box;
scroll-padding-top: 100px;
Expand All @@ -23,16 +25,17 @@ a {

a.reference:after {
font-size: $font-xs;
font-family: $font-icons-family;
padding: 0 4px;
}

a.reference.external:after {
content: "\f08e";
@extend .icon;
content: map.get($icons, "newtab");
}

a.reference.download:after {
content: "\f019";
@extend .icon;
content: map.get($icons, "download");
}

a:hover {
Expand Down
1 change: 0 additions & 1 deletion src/css/base/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ $xxlarge: 1440px;

// Font variables
$font-base-family: "Roboto", sans-serif;
$font-icons-family: "FontAwesome";

$font-md: 16px;
$font-sm: 14px;
Expand Down
3 changes: 0 additions & 3 deletions src/css/components/_admonitions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@
border-left: 8px solid var(--info);
}

.admonition-title:before {

}
.admonition-title {
color: var(--info) !important;
}
Expand Down
1 change: 0 additions & 1 deletion src/css/components/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
li::before {
content: "\2022";
color: var(--text-muted);
font-family: $font-icons-family;
float: left;
font-size: 20px;
font-weight: bold;
Expand Down

0 comments on commit 9a8ae54

Please sign in to comment.