Skip to content

Commit cd8f45e

Browse files
committed
doc updates
using latest updates from sphinx-immaterial theme
1 parent af01f3b commit cd8f45e

File tree

4 files changed

+50
-30
lines changed

4 files changed

+50
-30
lines changed

docs/_static/extra_css.css

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11

2-
.viewcode-block .viewcode-back {
3-
float: right;
4-
}
5-
62
code.literal.homie-attr::before {
73
content: "$";
84
}
@@ -27,21 +23,22 @@ code.literal.homie-prop {
2723

2824
*:root {
2925
--md-admonition-seealso-color: hsl(278, 100%, 63%);
30-
--md-admonition-icon--seealso: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg>');
31-
--md-admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M5 13.18v2.81c0 .73.4 1.41 1.04 1.76l5 2.73c.6.33 1.32.33 1.92 0l5-2.73c.64-.35 1.04-1.03 1.04-1.76v-2.81l-6.04 3.3c-.6.33-1.32.33-1.92 0L5 13.18zm6.04-9.66l-8.43 4.6c-.69.38-.69 1.38 0 1.76l8.43 4.6c.6.33 1.32.33 1.92 0L21 10.09V16c0 .55.45 1 1 1s1-.45 1-1V9.59c0-.37-.2-.7-.52-.88l-9.52-5.19c-.6-.32-1.32-.32-1.92 0z"/></svg>');
3226
}
3327

34-
.admonition.seealso .admonition-title {
35-
background-color: hsla(278, 100%, 63%, 0.1);
28+
29+
.md-typeset .admonition.seealso>.admonition-title::before {
30+
/* svg data from octicons/eye-24 */
31+
mask-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.5 12a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0z"/><path fill-rule="evenodd" d="M12 3.5c-3.432 0-6.125 1.534-8.054 3.24C2.02 8.445.814 10.352.33 11.202a1.6 1.6 0 0 0 0 1.598c.484.85 1.69 2.758 3.616 4.46C5.876 18.966 8.568 20.5 12 20.5c3.432 0 6.125-1.534 8.054-3.24 1.926-1.704 3.132-3.611 3.616-4.461a1.6 1.6 0 0 0 0-1.598c-.484-.85-1.69-2.757-3.616-4.46C18.124 5.034 15.432 3.5 12 3.5zM1.633 11.945c.441-.774 1.551-2.528 3.307-4.08C6.69 6.314 9.045 5 12 5c2.955 0 5.309 1.315 7.06 2.864 1.756 1.553 2.866 3.307 3.307 4.08a.111.111 0 0 1 .017.056.111.111 0 0 1-.017.056c-.441.774-1.551 2.527-3.307 4.08C17.31 17.685 14.955 19 12 19c-2.955 0-5.309-1.315-7.06-2.864-1.756-1.553-2.866-3.306-3.307-4.08A.11.11 0 0 1 1.616 12a.11.11 0 0 1 .017-.055z"/></svg>');
32+
background-color: var(--md-admonition-seealso-color);
3633
}
3734

38-
.admonition.seealso {
39-
border: 0 solid var(--md-admonition-seealso-color);
35+
.md-typeset :is(.admonition):is(.seealso) {
36+
border-color: var(--md-admonition-seealso-color);
4037
}
4138

42-
.md-typeset .admonition.seealso :is(.admonition-title, summary)::before {
43-
background-color: var(--md-admonition-seealso-color);
44-
mask-image: var(--md-admonition-icon--seealso);
39+
.md-typeset :is(.seealso)> :is(.admonition-title) {
40+
background-color: hsla(287, 100%, 63%, 0.1);
41+
border-color: var(--md-admonition-seealso-color);
4542
}
4643

4744
[data-md-color-scheme="default"] img.only-dark {

docs/conf.py

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@
128128
"repo_type": "Github",
129129
"icon": {
130130
"repo": "fontawesome/brands/github",
131+
"admonition": {
132+
"note": "material/note-edit-outline",
133+
"tip": "material/school",
134+
"warning": "octicons/alert-16",
135+
},
131136
},
132137
"features": [
133138
"navigation.tabs",
@@ -160,14 +165,31 @@
160165
],
161166
"toc_title_is_page_title": True,
162167
"social": [
163-
dict(
164-
icon="fontawesome/brands/github",
165-
link="https://github.com/2bndy5/CircuitPython_Homie",
166-
),
167-
dict(
168-
icon="fontawesome/brands/python",
169-
link="https://pypi.org/project/circuitpython-homie/",
170-
),
168+
{
169+
"icon": "fontawesome/brands/github",
170+
"link": "https://github.com/2bndy5/CircuitPython_Homie",
171+
},
172+
{
173+
"icon": "fontawesome/brands/python",
174+
"link": "https://pypi.org/project/circuitpython-homie/",
175+
},
176+
{
177+
"icon": "fontawesome/brands/discord",
178+
"link": "https://adafru.it/discord",
179+
},
180+
{
181+
"icon": "simple/adafruit",
182+
"link": "https://www.adafruit.com/",
183+
},
184+
{
185+
"icon": "simple/sparkfun",
186+
"link": "https://www.sparkfun.com/",
187+
},
188+
{
189+
"name": "CircuitPython Downloads",
190+
"icon": "octicons/download-24",
191+
"link": "https://circuitpython.org",
192+
},
171193
],
172194
}
173195

docs/tutorials/mosquitto.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ The Mosquitto broker uses a password file to store these values securely.
7474
The above command creates a password file named ``pswd.txt`` for a user named ``username``.
7575

7676
.. details:: Adding another user
77-
:class: info
77+
:class: check
7878

7979
Use the ``-b`` switch to add more users:
8080

8181
.. code-block:: shell
8282
8383
mosquitto_passwd -b pswd.txt other_username user_password
8484
.. details:: Removing a user
85-
:class: error
85+
:class: fail
8686

8787
Use the ``-D`` switch to remove a user:
8888

docs/tutorials/openhab.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ Building off `OpenHAB's "Add a Thing - Simple (Install the Binding)" instruction
6161
|click| the :homie-val:`show <n> more` button at the bottom of the OpenHAB Distribution list if
6262
you don't see the `MQTT binding`_.
6363

64-
.. admonition:: Notice
65-
:class: example
64+
.. note::
6665

6766
The `MQTT binding`_ is one of the official OpenHAB addons. It is not a Community addon.
6867

@@ -188,11 +187,13 @@ Once you have finished :ref:`add_broker_as_thing`, you are now ready to start us
188187
discovery of |homie-dev|\ s. This section should be repeated for any instantiated `HomieDevice`
189188
object.
190189

191-
.. note::
192-
Once completed, there is no need to repeat these steps again for the same `HomieDevice` object
193-
unless you have changed the ``device_id`` parameter to the `HomieDevice` constructor. Connecting
194-
& disconnecting a |homie-dev| that are already added as |oh-thing|\ s should be automatically
195-
handled by the OpenHAB `MQTT Homie binding`_.
190+
.. admonition:: Only do this once
191+
:class: check
192+
193+
Once completed, there is no need to repeat these steps again for the same `HomieDevice` object
194+
unless you have changed the ``device_id`` parameter to the `HomieDevice` constructor. Connecting
195+
& disconnecting a |homie-dev| that are already added as |oh-thing|\ s should be automatically
196+
handled by the OpenHAB `MQTT Homie binding`_.
196197

197198
First lets get a library example running on a circuitPython enabled board (with WiFi support).
198199
See the :doc:`../examples` to understand how to run a library example. For this tutorial, we'll be

0 commit comments

Comments
 (0)