Skip to content

Commit

Permalink
doc updates + css rule for table captions
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Dec 12, 2020
1 parent 2a89271 commit 60af06c
Show file tree
Hide file tree
Showing 2 changed files with 168 additions and 54 deletions.
215 changes: 162 additions & 53 deletions docs/_static/darkness.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -----------------------------code sections------------------------------ */
.highlight {
background: #202020;
background: #202020;
}

.highlight .s1 {
Expand Down Expand Up @@ -56,7 +56,7 @@
}

.highlight .o {
color: #fefefe;
color: #fefefe;
}

.highlight .sd {
Expand Down Expand Up @@ -104,22 +104,28 @@ td.linenos pre {
.wy-table thead,
.rst-content table.docutils thead,
.rst-content table.field-list thead {
color:#fcfcfc;
text-align:center;
background-color: #1a4228;
color: #fcfcfc;
text-align: center;
background-color: #1a4228;
}

.wy-table-odd td,
.wy-table-striped tr:nth-child(2n-1) td,
.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td {
background-color:#3d3d3d;
background-color: #3d3d3d;
}

.wy-table-bordered-all td,
.rst-content table.docutils td {
border-bottom:1px solid #e1e4e5;
border-left:1px solid #e1e4e5;
text-align: center;
border-bottom: 1px solid #e1e4e5;
border-left: 1px solid #e1e4e5;
text-align: center;
}

.wy-table caption,
.rst-content table.docutils caption,
.rst-content table.field-list caption {
color: #fff;
}

/* ------------------------admonition sections------------------------------- */
Expand Down Expand Up @@ -150,7 +156,7 @@ td.linenos pre {
.rst-content .wy-alert-success.seealso .admonition-title,
.rst-content .wy-alert-success.admonition-todo .admonition-title,
.rst-content .wy-alert-success.admonition .admonition-title {
background:#05886e;
background: #05886e;
}

.wy-alert.wy-alert-success,
Expand All @@ -166,92 +172,171 @@ td.linenos pre {
.rst-content .wy-alert-success.seealso,
.rst-content .wy-alert-success.admonition-todo,
.rst-content .wy-alert-success.admonition {
background: #28443e;
}

.wy-alert.wy-alert-info .wy-alert-title, .rst-content .note .wy-alert-title, .rst-content .wy-alert-info.attention .wy-alert-title, .rst-content .wy-alert-info.caution .wy-alert-title, .rst-content .wy-alert-info.danger .wy-alert-title, .rst-content .wy-alert-info.error .wy-alert-title, .rst-content .wy-alert-info.hint .wy-alert-title, .rst-content .wy-alert-info.important .wy-alert-title, .rst-content .wy-alert-info.tip .wy-alert-title, .rst-content .wy-alert-info.warning .wy-alert-title, .rst-content .seealso .wy-alert-title, .rst-content .wy-alert-info.admonition-todo .wy-alert-title, .rst-content .wy-alert-info.admonition .wy-alert-title, .wy-alert.wy-alert-info .rst-content .admonition-title, .rst-content .wy-alert.wy-alert-info .admonition-title, .rst-content .note .admonition-title, .rst-content .wy-alert-info.attention .admonition-title, .rst-content .wy-alert-info.caution .admonition-title, .rst-content .wy-alert-info.danger .admonition-title, .rst-content .wy-alert-info.error .admonition-title, .rst-content .wy-alert-info.hint .admonition-title, .rst-content .wy-alert-info.important .admonition-title, .rst-content .wy-alert-info.tip .admonition-title, .rst-content .wy-alert-info.warning .admonition-title, .rst-content .seealso .admonition-title, .rst-content .wy-alert-info.admonition-todo .admonition-title, .rst-content .wy-alert-info.admonition .admonition-title {
background: #28443e;
}

.wy-alert.wy-alert-info .wy-alert-title,
.rst-content .note .wy-alert-title,
.rst-content .wy-alert-info.attention .wy-alert-title,
.rst-content .wy-alert-info.caution .wy-alert-title,
.rst-content .wy-alert-info.danger .wy-alert-title,
.rst-content .wy-alert-info.error .wy-alert-title,
.rst-content .wy-alert-info.hint .wy-alert-title,
.rst-content .wy-alert-info.important .wy-alert-title,
.rst-content .wy-alert-info.tip .wy-alert-title,
.rst-content .wy-alert-info.warning .wy-alert-title,
.rst-content .seealso .wy-alert-title,
.rst-content .wy-alert-info.admonition-todo .wy-alert-title,
.rst-content .wy-alert-info.admonition .wy-alert-title,
.wy-alert.wy-alert-info .rst-content .admonition-title,
.rst-content .wy-alert.wy-alert-info .admonition-title,
.rst-content .note .admonition-title,
.rst-content .wy-alert-info.attention .admonition-title,
.rst-content .wy-alert-info.caution .admonition-title,
.rst-content .wy-alert-info.danger .admonition-title,
.rst-content .wy-alert-info.error .admonition-title,
.rst-content .wy-alert-info.hint .admonition-title,
.rst-content .wy-alert-info.important .admonition-title,
.rst-content .wy-alert-info.tip .admonition-title,
.rst-content .wy-alert-info.warning .admonition-title,
.rst-content .seealso .admonition-title,
.rst-content .wy-alert-info.admonition-todo .admonition-title,
.rst-content .wy-alert-info.admonition .admonition-title {
background: #064873;
}

.wy-alert.wy-alert-info, .rst-content .note, .rst-content .wy-alert-info.attention, .rst-content .wy-alert-info.caution, .rst-content .wy-alert-info.danger, .rst-content .wy-alert-info.error, .rst-content .wy-alert-info.hint, .rst-content .wy-alert-info.important, .rst-content .wy-alert-info.tip, .rst-content .wy-alert-info.warning, .rst-content .seealso, .rst-content .wy-alert-info.admonition-todo, .rst-content .wy-alert-info.admonition {
.wy-alert.wy-alert-info,
.rst-content .note,
.rst-content .wy-alert-info.attention,
.rst-content .wy-alert-info.caution,
.rst-content .wy-alert-info.danger,
.rst-content .wy-alert-info.error,
.rst-content .wy-alert-info.hint,
.rst-content .wy-alert-info.important,
.rst-content .wy-alert-info.tip,
.rst-content .wy-alert-info.warning,
.rst-content .seealso,
.rst-content .wy-alert-info.admonition-todo,
.rst-content .wy-alert-info.admonition {
background: #2d3d48;
}

.wy-alert.wy-alert-warning .wy-alert-title, .rst-content .wy-alert-warning.note .wy-alert-title, .rst-content .attention .wy-alert-title, .rst-content .caution .wy-alert-title, .rst-content .wy-alert-warning.danger .wy-alert-title, .rst-content .wy-alert-warning.error .wy-alert-title, .rst-content .wy-alert-warning.hint .wy-alert-title, .rst-content .wy-alert-warning.important .wy-alert-title, .rst-content .wy-alert-warning.tip .wy-alert-title, .rst-content .warning .wy-alert-title, .rst-content .wy-alert-warning.seealso .wy-alert-title, .rst-content .admonition-todo .wy-alert-title, .rst-content .wy-alert-warning.admonition .wy-alert-title, .wy-alert.wy-alert-warning .rst-content .admonition-title, .rst-content .wy-alert.wy-alert-warning .admonition-title, .rst-content .wy-alert-warning.note .admonition-title, .rst-content .attention .admonition-title, .rst-content .caution .admonition-title, .rst-content .wy-alert-warning.danger .admonition-title, .rst-content .wy-alert-warning.error .admonition-title, .rst-content .wy-alert-warning.hint .admonition-title, .rst-content .wy-alert-warning.important .admonition-title, .rst-content .wy-alert-warning.tip .admonition-title, .rst-content .warning .admonition-title, .rst-content .wy-alert-warning.seealso .admonition-title, .rst-content .admonition-todo .admonition-title, .rst-content .wy-alert-warning.admonition .admonition-title {
.wy-alert.wy-alert-warning .wy-alert-title,
.rst-content .wy-alert-warning.note .wy-alert-title,
.rst-content .attention .wy-alert-title,
.rst-content .caution .wy-alert-title,
.rst-content .wy-alert-warning.danger .wy-alert-title,
.rst-content .wy-alert-warning.error .wy-alert-title,
.rst-content .wy-alert-warning.hint .wy-alert-title,
.rst-content .wy-alert-warning.important .wy-alert-title,
.rst-content .wy-alert-warning.tip .wy-alert-title,
.rst-content .warning .wy-alert-title,
.rst-content .wy-alert-warning.seealso .wy-alert-title,
.rst-content .admonition-todo .wy-alert-title,
.rst-content .wy-alert-warning.admonition .wy-alert-title,
.wy-alert.wy-alert-warning .rst-content .admonition-title,
.rst-content .wy-alert.wy-alert-warning .admonition-title,
.rst-content .wy-alert-warning.note .admonition-title,
.rst-content .attention .admonition-title,
.rst-content .caution .admonition-title,
.rst-content .wy-alert-warning.danger .admonition-title,
.rst-content .wy-alert-warning.error .admonition-title,
.rst-content .wy-alert-warning.hint .admonition-title,
.rst-content .wy-alert-warning.important .admonition-title,
.rst-content .wy-alert-warning.tip .admonition-title,
.rst-content .warning .admonition-title,
.rst-content .wy-alert-warning.seealso .admonition-title,
.rst-content .admonition-todo .admonition-title,
.rst-content .wy-alert-warning.admonition .admonition-title {
background: #ed2222;
}

.wy-alert.wy-alert-warning, .rst-content .wy-alert-warning.note, .rst-content .attention, .rst-content .caution, .rst-content .wy-alert-warning.danger, .rst-content .wy-alert-warning.error, .rst-content .wy-alert-warning.hint, .rst-content .wy-alert-warning.important, .rst-content .wy-alert-warning.tip, .rst-content .warning, .rst-content .wy-alert-warning.seealso, .rst-content .admonition-todo, .rst-content .wy-alert-warning.admonition {
.wy-alert.wy-alert-warning,
.rst-content .wy-alert-warning.note,
.rst-content .attention,
.rst-content .caution,
.rst-content .wy-alert-warning.danger,
.rst-content .wy-alert-warning.error,
.rst-content .wy-alert-warning.hint,
.rst-content .wy-alert-warning.important,
.rst-content .wy-alert-warning.tip,
.rst-content .warning,
.rst-content .wy-alert-warning.seealso,
.rst-content .admonition-todo,
.rst-content .wy-alert-warning.admonition {
background: #490707;
}

/* -------------------------------------general page styling-------------------------------------------- */
body {
color:#fcfcfc;
color: #fcfcfc;
}

.wy-nav-content-wrap, .wy-nav-content {
background:#242424;
.wy-nav-content-wrap,
.wy-nav-content {
background: #242424;
}

.btn-neutral {
background-color:#275325 !important;
color:#fff !important;
background-color: #275325 !important;
color: #fff !important;
}

.btn-neutral:hover {
background-color:#006060 !important;
color:#fffafa
background-color: #006060 !important;
color: #fffafa
}

.btn-neutral:visited {
color:#fff !important;
color: #fff !important;
}

/* -------------------------------------sidebar sections------------------------------------------------ */
.wy-side-nav-search {
background-color:#006B09;
color:#fcfcfc;
background-color: #006B09;
color: #fcfcfc;
}

.wy-side-nav-search input[type=text] {
background: #3e3e3e;
color: #fcfcfc;
background: #3e3e3e;
color: #fcfcfc;
}

.wy-menu-vertical li.on a,
.wy-menu-vertical li.current>a {
color:#fcfcfc;
background:#242424;
color: #fcfcfc;
background: #242424;
}

.wy-nav-side {
background:#172353;
background: #172353;
}

.wy-menu-vertical li.on a:hover,
.wy-menu-vertical li.current>a:hover {
background:#395c62;
background: #395c62;
}

.wy-menu-vertical li.on a:hover,
.wy-menu-vertical li.current>a:hover {
background:#395c62;
background: #395c62;
}

.wy-side-nav-search>div.version {
color:rgba(255, 255, 255, 0.69);
color: rgba(255, 255, 255, 0.69);
}

.wy-menu-vertical header,
.wy-menu-vertical p.caption {
color:#43df96;
color: #43df96;
}

.wy-nav-top {
background:#006B09;
background: #006B09;
}

.wy-menu-vertical li.on a span.toctree-expand, .wy-menu-vertical li.current > a span.toctree-expand {
.wy-menu-vertical li.on a span.toctree-expand,
.wy-menu-vertical li.current>a span.toctree-expand {
color: #f2f2f2;
}

Expand All @@ -266,27 +351,30 @@ body {
.wy-menu-vertical li.toctree-l2 a,
.wy-menu-vertical li.toctree-l3 a,
.wy-menu-vertical li.toctree-l4 a {
color:#f2f2f2;
color: #f2f2f2;
}

.wy-menu-vertical li.current a:hover {
background:#3e3e3ecf;
background: #3e3e3ecf;
}

.wy-menu-vertical li.toctree-l2.current>a {
background:#242424;
background: #242424;
}

.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a {
background:#033969;
background: #033969;
}

/* -----------------------------------------API sections-------------------------------------- */

.wy-table-bordered-all td, .rst-content table.docutils td {
.wy-table-bordered-all td,
.rst-content table.docutils td {
text-align: left;
}

.rst-content table.docutils.citation, .rst-content table.docutils.footnote {
.rst-content table.docutils.citation,
.rst-content table.docutils.footnote {
color: white;
}

Expand All @@ -295,24 +383,35 @@ body {
color: #e5df8e;
}

.rst-content tt, .rst-content tt, .rst-content code {
.rst-content tt,
.rst-content tt,
.rst-content code {
color: #f3f3f3;
}

.rst-content dl:not(.docutils) dt {
background: #2e363c;
}

.rst-content tt.literal, .rst-content tt.literal, .rst-content code.literal {
.rst-content tt.literal,
.rst-content tt.literal,
.rst-content code.literal {
color: #16FF00;
border-color: #303030;
}

code, .rst-content tt, .rst-content code {
code,
.rst-content tt,
.rst-content code {
background: #000;
}

.rst-content tt.xref, a .rst-content tt, .rst-content tt.xref, .rst-content code.xref, a .rst-content tt, a .rst-content code {
.rst-content tt.xref,
a .rst-content tt,
.rst-content tt.xref,
.rst-content code.xref,
a .rst-content tt,
a .rst-content code {
color: #fff;
}

Expand All @@ -333,17 +432,27 @@ code, .rst-content tt, .rst-content code {
visibility: visible;
}

.rst-content h1:hover .headerlink::after, .rst-content h2:hover .headerlink::after, .rst-content .toctree-wrapper p.caption:hover .headerlink::after, .rst-content h3:hover .headerlink::after, .rst-content h4:hover .headerlink::after, .rst-content h5:hover .headerlink::after, .rst-content h6:hover .headerlink::after, .rst-content dl dt:hover .headerlink::after, .rst-content p.caption:hover .headerlink::after, .rst-content table > caption:hover .headerlink::after, .rst-content .code-block-caption:hover .headerlink::after {
.rst-content h1:hover .headerlink::after,
.rst-content h2:hover .headerlink::after,
.rst-content .toctree-wrapper p.caption:hover .headerlink::after,
.rst-content h3:hover .headerlink::after,
.rst-content h4:hover .headerlink::after,
.rst-content h5:hover .headerlink::after,
.rst-content h6:hover .headerlink::after,
.rst-content dl dt:hover .headerlink::after,
.rst-content p.caption:hover .headerlink::after,
.rst-content table>caption:hover .headerlink::after,
.rst-content .code-block-caption:hover .headerlink::after {
color: #29ae5b !important;
}

html.writer-html4 .rst-content dl:not(.docutils)>dt,
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt {
background: #2e363c;
background: #2e363c;
}

html.writer-html4 .rst-content dl:not(.docutils) dl:not(.field-list)>dt,
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dl:not(.field-list)>dt {
background:#2e363c;
color:#2980b1;
}
background: #2e363c;
color: #2980b1;
}
7 changes: 6 additions & 1 deletion docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,14 @@ TMRh20's library uses static payload lengths by default.
To make this circuitpython library compatible with
`TMRh20's RF24 library <https://github.com/nRF24/RF24/>`_:

1. `dynamic_payloads` to `False`.
1. set `dynamic_payloads` to `False`.
2. set :py:attr:`~circuitpython_nrf24l01.rf24.RF24.payload_length` to the value that
is passed to TMRh20's ``RF24::setPayloadSize()``. 32 is the default (& maximum)
payload length/size for both libraries.
3. set `allow_ask_no_ack` to `False`.

For completness, TMRh20's RF24 library uses a default value of 15 for the `ard` attribute,
but this Circuitpython library uses a default value of 3.

.. csv-table:: Corresponding examples
:header: circuitpython_nrf24l01, TMRh20 RF24
Expand All @@ -154,6 +158,7 @@ To make this circuitpython library compatible with
.. code-block:: python
# uncomment the following 2 lines for compatibility with TMRh20 library
# nrf.allow_ask_no_ack = False
# nrf.dynamic_payloads = False
# nrf.payload_length = 4
Expand Down

0 comments on commit 60af06c

Please sign in to comment.