doc: new look and feel
A new look and feel for the Zephyr documentation. It is largerly based on the work done by Godot Engine docs, but with some Zephyr specific customizations. Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
parent
6db5944a18
commit
a6d8c232e0
12 changed files with 1625 additions and 323 deletions
991
doc/_static/css/custom.css
vendored
Normal file
991
doc/_static/css/custom.css
vendored
Normal file
|
@ -0,0 +1,991 @@
|
|||
/**
|
||||
* Copyright (c) 2019-2020, Juan Linietsky, Ariel Manzur and the Godot community
|
||||
* Copyright (c) 2021, Teslabs Engineering S.L.
|
||||
* SPDX-License-Identifier: CC-BY-3.0
|
||||
*
|
||||
* Various tweaks to the Read the Docs theme to better conform with Zephyr's
|
||||
* visual identity. Many colors are also overridden to use CSS variables.
|
||||
*/
|
||||
|
||||
body,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
input[type="text"],
|
||||
input[type="button"],
|
||||
input[type="reset"],
|
||||
input[type="submit"],
|
||||
textarea,
|
||||
legend,
|
||||
.btn,
|
||||
.rst-content .toctree-wrapper p.caption,
|
||||
.rst-versions {
|
||||
/* Use a system font stack for better performance (no Web fonts required) */
|
||||
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
legend,
|
||||
.rst-content .toctree-wrapper p.caption {
|
||||
/* Use a lighter font for headers (Medium instead of Bold) */
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.rst-content div.figure p.caption {
|
||||
/* Tweak caption styling to be closer to typical captions */
|
||||
text-align: center;
|
||||
margin-top: 8px;
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
.rst-content div.figure.figure-w480 {
|
||||
max-width: 480px;
|
||||
}
|
||||
|
||||
.rst-content div.figure img {
|
||||
border: 1px solid var(--body-color);
|
||||
}
|
||||
|
||||
p,
|
||||
article ul,
|
||||
article ol,
|
||||
.wy-plain-list-disc,
|
||||
.wy-plain-list-decimal,
|
||||
.rst-content ol.arabic,
|
||||
.rst-content .section ul,
|
||||
.rst-content .toctree-wrapper ul,
|
||||
.rst-content .section ol {
|
||||
/* Increase the line height slightly to account for the different font */
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
body,
|
||||
.rst-content table.docutils thead {
|
||||
color: var(--body-color);
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--link-color);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--link-color-hover);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:active {
|
||||
/* Add visual feedback when clicking on a link */
|
||||
color: var(--link-color-active);
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: var(--link-color-visited);
|
||||
}
|
||||
|
||||
a.btn:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.sphinx-tabs .sphinx-menu a.item {
|
||||
/* Original definition has `!important` */
|
||||
color: var(--link-color) !important;
|
||||
}
|
||||
|
||||
.rst-content .toc-backref {
|
||||
color: var(--link-color);
|
||||
}
|
||||
|
||||
/* Style external links differently to make them easier to distinguish from internal links. */
|
||||
.reference.external {
|
||||
background-position: center right;
|
||||
background-repeat: no-repeat;
|
||||
background-image: var(--external-reference-icon);
|
||||
padding-right: 13px;
|
||||
}
|
||||
|
||||
hr,
|
||||
#search-results .search li:first-child,
|
||||
#search-results .search li {
|
||||
border-color: var(--hr-color);
|
||||
}
|
||||
|
||||
/* JavaScript documentation directives */
|
||||
.rst-content dl:not(.docutils) dt {
|
||||
background-color: var(--admonition-note-background-color) !important;
|
||||
border-color: var(--admonition-note-title-background-color) !important;
|
||||
color: var(--admonition-note-color) !important;
|
||||
}
|
||||
.rst-content dl:not(.docutils) dl dt {
|
||||
background-color: var(--admonition-attention-background-color) !important;
|
||||
border-color: var(--admonition-attention-title-background-color) !important;
|
||||
color: var(--admonition-attention-color) !important;
|
||||
}
|
||||
.rst-content dl:not(.docutils).class dt,
|
||||
.rst-content dl:not(.docutils).function dt,
|
||||
.rst-content dl:not(.docutils).method dt,
|
||||
.rst-content dl:not(.docutils).attribute dt {
|
||||
width: 100% !important;
|
||||
}
|
||||
.rst-content dl:not(.docutils).class > dt,
|
||||
.rst-content dl:not(.docutils).function > dt,
|
||||
.rst-content dl:not(.docutils).method > dt,
|
||||
.rst-content dl:not(.docutils).attribute > dt {
|
||||
font-size: 100% !important;
|
||||
font-weight: normal !important;
|
||||
margin-bottom: 16px !important;
|
||||
padding: 6px 8px !important;
|
||||
}
|
||||
.rst-content dl:not(.docutils) tt.descclassname,
|
||||
.rst-content dl:not(.docutils) code.descclassname {
|
||||
color: var(--highlight-type2-color) !important;
|
||||
font-weight: normal !important;
|
||||
}
|
||||
.rst-content dl:not(.docutils) tt.descname,
|
||||
.rst-content dl:not(.docutils) code.descname {
|
||||
color: var(--highlight-function-color) !important;
|
||||
font-weight: normal !important;
|
||||
}
|
||||
.rst-content dl:not(.docutils) .sig-paren,
|
||||
.rst-content dl:not(.docutils) .optional {
|
||||
color: var(--highlight-operator-color) !important;
|
||||
font-weight: normal !important;
|
||||
padding: 0 2px !important;
|
||||
}
|
||||
.rst-content dl:not(.docutils) .optional {
|
||||
font-style: italic !important;
|
||||
}
|
||||
.rst-content dl:not(.docutils) .sig-param,
|
||||
.rst-content dl:not(.docutils).class dt > em,
|
||||
.rst-content dl:not(.docutils).function dt > em,
|
||||
.rst-content dl:not(.docutils).method dt > em {
|
||||
color: var(--code-literal-color) !important;
|
||||
font-style: normal !important;
|
||||
padding: 0 4px !important;
|
||||
}
|
||||
.rst-content dl:not(.docutils) .sig-param,
|
||||
.rst-content dl:not(.docutils).class dt > .optional ~ em,
|
||||
.rst-content dl:not(.docutils).function dt > .optional ~ em,
|
||||
.rst-content dl:not(.docutils).method dt > .optional ~ em {
|
||||
color: var(--highlight-number-color) !important;
|
||||
font-style: italic !important;
|
||||
}
|
||||
.rst-content dl:not(.docutils).class dt > em.property {
|
||||
color: var(--highlight-keyword-color) !important;
|
||||
}
|
||||
.rst-content dl:not(.docutils) dt a.headerlink {
|
||||
color: var(--link-color) !important;
|
||||
}
|
||||
.rst-content dl:not(.docutils) dt a.headerlink:visited {
|
||||
color: var(--link-color-visited) !important;
|
||||
}
|
||||
|
||||
footer,
|
||||
#search-results .context {
|
||||
color: var(--footer-color);
|
||||
}
|
||||
|
||||
/* Icon tweaks */
|
||||
a.icon-home,
|
||||
a.icon-home:visited {
|
||||
color: var(--navbar-level-1-color);
|
||||
}
|
||||
|
||||
/* Sphinx Search extension */
|
||||
/* .wy-body-for-nav is used for higher rule specificity */
|
||||
|
||||
/* Search popup body */
|
||||
.wy-body-for-nav .search__outer {
|
||||
background-color: var(--content-background-color);
|
||||
border: 2px solid var(--content-background-color);
|
||||
}
|
||||
.wy-body-for-nav .search__cross svg {
|
||||
fill: var(--body-color);
|
||||
}
|
||||
|
||||
.wy-body-for-nav .search__outer::-webkit-scrollbar-track {
|
||||
border-radius: 10px;
|
||||
background-color: var(--content-background-color);
|
||||
}
|
||||
.wy-body-for-nav .search__outer::-webkit-scrollbar {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
background-color: var(--content-background-color);
|
||||
}
|
||||
.wy-body-for-nav .search__outer::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
background-color: var(--hr-color);
|
||||
}
|
||||
|
||||
/* Search input */
|
||||
.wy-body-for-nav .search__outer__input {
|
||||
background-color: var(--search-input-background-color);
|
||||
background-image: none;
|
||||
border-radius: 50px;
|
||||
border: 2px solid transparent;
|
||||
color: var(--body-color);
|
||||
height: 36px;
|
||||
padding: 6px 12px;
|
||||
}
|
||||
.wy-body-for-nav .search__outer__input:focus {
|
||||
border-color: var(--input-focus-border-color);
|
||||
}
|
||||
.wy-body-for-nav .search__outer .bar:after,
|
||||
.wy-body-for-nav .search__outer .bar:before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Search results item */
|
||||
.wy-body-for-nav .search__result__single {
|
||||
border-bottom-color: var(--hr-color);
|
||||
}
|
||||
/* Search item title */
|
||||
.wy-body-for-nav .search__result__title {
|
||||
color: var(--link-color);
|
||||
border-bottom: none;
|
||||
font-size: 120%;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
/* Search item section */
|
||||
.wy-body-for-nav .outer_div_page_results:hover,
|
||||
.wy-body-for-nav .search__result__box .active {
|
||||
background-color: var(--search-active-color);
|
||||
}
|
||||
.wy-body-for-nav .search__result__subheading{
|
||||
color: var(--body-color);
|
||||
font-size: 100%;
|
||||
font-weight: 400;
|
||||
}
|
||||
.wy-body-for-nav .search__result__content {
|
||||
color: var(--footer-color);
|
||||
}
|
||||
|
||||
/* Search item matching substring */
|
||||
.wy-body-for-nav .search__outer .search__result__title span,
|
||||
.wy-body-for-nav .search__outer .search__result__content span {
|
||||
color: var(--search-match-color);
|
||||
border-bottom: 1px solid var(--search-match-color);
|
||||
background-color: var(--search-match-background-color);
|
||||
padding: 0 2px;
|
||||
}
|
||||
.wy-body-for-nav .search__result__subheading span {
|
||||
border-bottom-color: var(--body-color);
|
||||
}
|
||||
|
||||
/* Search empty results */
|
||||
/* The original styles are inlined, see https://github.com/readthedocs/readthedocs-sphinx-search/issues/48 */
|
||||
.wy-body-for-nav .search__result__box {
|
||||
color: var(--body-color) !important;
|
||||
}
|
||||
|
||||
/* Search footer & credits */
|
||||
.wy-body-for-nav .rtd__search__credits {
|
||||
background-color: var(--search-credits-background-color);
|
||||
border-color: var(--search-credits-background-color);
|
||||
color: var(--search-credits-color);
|
||||
padding: 4px 8px;
|
||||
}
|
||||
.wy-body-for-nav .rtd__search__credits a {
|
||||
color: var(--search-credits-link-color);
|
||||
}
|
||||
|
||||
/* Main sections */
|
||||
|
||||
.wy-nav-content-wrap {
|
||||
background-color: var(--content-wrap-background-color);
|
||||
}
|
||||
|
||||
.wy-nav-content {
|
||||
background-color: var(--content-background-color);
|
||||
}
|
||||
|
||||
.wy-body-for-nav {
|
||||
background-color: var(--content-wrap-background-color);
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 769px) {
|
||||
.wy-nav-content {
|
||||
max-width: 915px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Table display tweaks */
|
||||
|
||||
.rst-content table.docutils,
|
||||
.wy-table-bordered-all td,
|
||||
.rst-content table.docutils td,
|
||||
.wy-table thead th,
|
||||
.rst-content table.docutils thead th,
|
||||
.rst-content table.field-list thead th {
|
||||
border-color: var(--code-border-color);
|
||||
}
|
||||
|
||||
.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: var(--table-row-odd-background-color);
|
||||
}
|
||||
|
||||
/* Override table no-wrap */
|
||||
/* The first column cells are not verbose, no need to wrap them */
|
||||
.wy-table-responsive table td:not(:nth-child(1)),
|
||||
.wy-table-responsive table th:not(:nth-child(1)) {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
/* Make sure not to wrap keyboard shortcuts */
|
||||
.wy-table-responsive table td kbd {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Force table content font-size in responsive tables to be 100%
|
||||
* fixing larger font size for paragraphs in the kconfig tables */
|
||||
.wy-table-responsive td p {
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
/* Code display tweaks */
|
||||
|
||||
code,
|
||||
.rst-content tt,
|
||||
.rst-content code {
|
||||
font-size: 14px;
|
||||
background-color: var(--code-background-color);
|
||||
border: 1px solid var(--code-border-color);
|
||||
}
|
||||
|
||||
.rst-content tt.literal,
|
||||
.rst-content code.literal {
|
||||
color: var(--code-literal-color);
|
||||
}
|
||||
|
||||
.rst-content div[class^="highlight"] {
|
||||
border-color: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.rst-content pre.literal-block,
|
||||
.rst-content div[class^="highlight"] pre,
|
||||
.rst-content .linenodiv pre {
|
||||
/* Increase the font size and line height in code blocks */
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.rst-content pre.literal-block {
|
||||
border: none;
|
||||
border-radius: 0.25rem;
|
||||
background-color: var(--code-background-color);
|
||||
}
|
||||
|
||||
/* Code tab display tweaks */
|
||||
|
||||
.ui.tabular.menu .active.item,
|
||||
.ui.segment,
|
||||
.sphinx-tabs-panel {
|
||||
background-color: var(--code-background-color);
|
||||
}
|
||||
|
||||
.sphinx-tabs-tab {
|
||||
color: var(--link-color);
|
||||
}
|
||||
|
||||
.sphinx-tabs-tab[aria-selected="true"] {
|
||||
background-color: var(--code-background-color);
|
||||
border-bottom: 1px solid var(--code-background-color);
|
||||
}
|
||||
|
||||
/* Code literals */
|
||||
a.internal code.literal {
|
||||
color: var(--link-color);
|
||||
}
|
||||
|
||||
a.internal:visited code.literal {
|
||||
color: var(--link-color-visited);
|
||||
}
|
||||
|
||||
/* Syntax highlighting */
|
||||
|
||||
.tab div[class^='highlight']:last-child {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.rst-content tt.literal, .rst-content code.literal, .highlight {
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
background-color: var(--highlight-background-color);
|
||||
}
|
||||
|
||||
/* Emphasized lines */
|
||||
.highlight .hll {
|
||||
background-color: var(--highlight-background-emph-color);
|
||||
}
|
||||
|
||||
.highlight .gh /* Generic.Heading */,
|
||||
.highlight .gu /* Generic.Subheading */,
|
||||
.highlight .go /* Generic.Output */,
|
||||
.highlight .gt /* Generic.Traceback */ {
|
||||
color: var(--highlight-default-color);
|
||||
}
|
||||
|
||||
.highlight .c /* Comment */,
|
||||
.highlight .c1 /* Comment.Single */,
|
||||
.highlight .cm /* Comment.Multiline */,
|
||||
.highlight .cs /* Comment.Special */ {
|
||||
color: var(--highlight-comment-color);
|
||||
}
|
||||
|
||||
.highlight .bp /* Name.Builtin.Pseudo */,
|
||||
.highlight .k /* Keyword */,
|
||||
.highlight .kc /* Keyword.Constant */,
|
||||
.highlight .kd /* Keyword.Declaration */,
|
||||
.highlight .kn /* Keyword.Namespace */,
|
||||
.highlight .kp /* Keyword.Pseudo */,
|
||||
.highlight .kr /* Keyword.Reserved */,
|
||||
.highlight .kt /* Keyword.Type */,
|
||||
.highlight .ow /* Operator.Word */ {
|
||||
color: var(--highlight-keyword-color);
|
||||
}
|
||||
|
||||
.highlight .ch /* Comment.Hashbang */,
|
||||
.highlight .cp /* Comment.Preproc */ {
|
||||
color: var(--highlight-keyword2-color);
|
||||
}
|
||||
|
||||
.highlight .m /* Literal.Number */,
|
||||
.highlight .mf /* Literal.Number.Float */,
|
||||
.highlight .mi /* Literal.Number.Integer */,
|
||||
.highlight .il /* Literal.Number.Integer.Long */,
|
||||
.highlight .mb /* Literal.Number.Bin */,
|
||||
.highlight .mh /* Literal.Number.Hex */,
|
||||
.highlight .mo /* Literal.Number.Oct */ {
|
||||
color: var(--highlight-number-color);
|
||||
}
|
||||
|
||||
.highlight .na /* Name.Attribute */,
|
||||
.highlight .nd /* Name.Decorator */,
|
||||
.highlight .ni /* Name.Entity */,
|
||||
.highlight .nl /* Name.Label */ {
|
||||
color: var(--highlight-decorator-color);
|
||||
}
|
||||
|
||||
.highlight .nb /* Name.Builtin */,
|
||||
.highlight .ne /* Name.Exception */ {
|
||||
color: var(--highlight-type-color);
|
||||
}
|
||||
|
||||
.highlight .nc /* Name.Class */,
|
||||
.highlight .nn /* Name.Namespace */,
|
||||
.highlight .no /* Name.Constant */,
|
||||
.highlight .nv /* Name.Variable */,
|
||||
.highlight .vc /* Name.Variable.Class */,
|
||||
.highlight .vg /* Name.Variable.Global */,
|
||||
.highlight .vi /* Name.Variable.Instance */,
|
||||
.highlight .vm /* Name.Variable.Magic */ {
|
||||
color: var(--highlight-type2-color);
|
||||
}
|
||||
|
||||
.highlight .nf /* Name.Function */,
|
||||
.highlight .fm /* Name.Function.Magic */,
|
||||
.highlight .nt /* Name.Tag */ {
|
||||
color: var(--highlight-function-color);
|
||||
}
|
||||
|
||||
.highlight .o /* Operator */,
|
||||
.highlight .si /* Literal.String.Interpol */,
|
||||
.highlight .sx /* Literal.String.Other */,
|
||||
.highlight .sr /* Literal.String.Regex */,
|
||||
.highlight .ss /* Literal.String.Symbol */ {
|
||||
color: var(--highlight-operator-color);
|
||||
}
|
||||
|
||||
.highlight .cpf/* Comment.PreprocFile */,
|
||||
.highlight .s /* Literal.String */,
|
||||
.highlight .s1 /* Literal.String.Single */,
|
||||
.highlight .s2 /* Literal.String.Double */,
|
||||
.highlight .sc /* Literal.String.Char */,
|
||||
.highlight .se /* Literal.String.Escape */,
|
||||
.highlight .sa /* Literal.String.Affix */,
|
||||
.highlight .sb /* Literal.String.Backtick */,
|
||||
.highlight .dl /* Literal.String.Delimiter */,
|
||||
.highlight .sd /* Literal.String.Doc */,
|
||||
.highlight .sh /* Literal.String.Heredoc */ {
|
||||
color: var(--highlight-string-color);
|
||||
}
|
||||
|
||||
/* Admonition tweaks */
|
||||
|
||||
.rst-content .admonition.note,
|
||||
.rst-content .admonition.seealso {
|
||||
background-color: var(--admonition-note-background-color);
|
||||
color: var(--admonition-note-color);
|
||||
}
|
||||
|
||||
.rst-content .admonition.note .admonition-title,
|
||||
.rst-content .admonition.seealso .admonition-title {
|
||||
background-color: var(--admonition-note-title-background-color);
|
||||
color: var(--admonition-note-title-color);
|
||||
}
|
||||
|
||||
.rst-content .admonition.attention,
|
||||
.rst-content .admonition.caution,
|
||||
.rst-content .admonition.warning {
|
||||
background-color: var(--admonition-attention-background-color);
|
||||
color: var(--admonition-attention-color);
|
||||
}
|
||||
|
||||
.rst-content .admonition.attention .admonition-title,
|
||||
.rst-content .admonition.caution .admonition-title,
|
||||
.rst-content .admonition.warning .admonition-title {
|
||||
background-color: var(--admonition-attention-title-background-color);
|
||||
color: var(--admonition-attention-title-color);
|
||||
}
|
||||
|
||||
.rst-content .admonition.danger {
|
||||
background-color: var(--admonition-danger-background-color);
|
||||
color: var(--admonition-danger-color);
|
||||
}
|
||||
|
||||
.rst-content .admonition.danger .admonition-title {
|
||||
background-color: var(--admonition-danger-title-background-color);
|
||||
color: var(--admonition-danger-title-color);
|
||||
}
|
||||
|
||||
.rst-content .admonition.tip,
|
||||
.rst-content .admonition.important {
|
||||
background-color: var(--admonition-tip-background-color);
|
||||
color: var(--admonition-tip-color);
|
||||
}
|
||||
|
||||
.rst-content .admonition.tip .admonition-title,
|
||||
.rst-content .admonition.important .admonition-title {
|
||||
background-color: var(--admonition-tip-title-background-color);
|
||||
color: var(--admonition-tip-title-color);
|
||||
}
|
||||
|
||||
/* Keyboard shortcuts tweaks */
|
||||
kbd, .kbd {
|
||||
background-color: var(--kbd-background-color);
|
||||
border: 1px solid var(--kbd-outline-color);
|
||||
border-radius: 3px;
|
||||
box-shadow: inset 0 -1px 0 var(--kbd-shadow-color);
|
||||
color: var(--kbd-text-color);
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
line-height: 11px;
|
||||
padding: 4px 5px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
|
||||
.btn-neutral {
|
||||
background-color: var(--btn-neutral-background-color) !important;
|
||||
color: var(--body-color) !important;
|
||||
}
|
||||
|
||||
.btn-neutral:hover {
|
||||
background-color: var(--btn-neutral-hover-background-color) !important;
|
||||
}
|
||||
|
||||
.btn-neutral:visited {
|
||||
color: var(--body-color) !important;
|
||||
}
|
||||
|
||||
/* Navigation bar logo and search */
|
||||
|
||||
.logo {
|
||||
opacity: var(--logo-opacity);
|
||||
}
|
||||
|
||||
.wy-side-nav-search > a img.logo {
|
||||
/* Fixed size to prevent reflows and support hiDPI displays */
|
||||
/* A 5 pixel margin is added on each side. The logo itself displays at 200×100 at 100% scaling. */
|
||||
width: 210px;
|
||||
height: 105px;
|
||||
}
|
||||
|
||||
.wy-side-nav-search {
|
||||
background-color: var(--navbar-background-color);
|
||||
}
|
||||
|
||||
.wy-side-nav-search.fixed {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 769px) {
|
||||
/* Simulate a drop shadow that only affects the bottom edge */
|
||||
/* This is used to indicate the search bar is fixed */
|
||||
.wy-side-nav-search.fixed-and-scrolled::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: -8px;
|
||||
width: 300px;
|
||||
height: 8px;
|
||||
pointer-events: none;
|
||||
background: linear-gradient(hsla(0, 0%, 0%, 0.2), transparent);
|
||||
}
|
||||
}
|
||||
|
||||
.wy-side-nav-search > a:hover,
|
||||
.wy-side-nav-search .wy-dropdown > a:hover {
|
||||
background-color: var(--navbar-background-color-hover);
|
||||
}
|
||||
|
||||
.wy-side-nav-search > a:active,
|
||||
.wy-side-nav-search .wy-dropdown > a:active {
|
||||
background-color: var(--navbar-background-color-active);
|
||||
}
|
||||
|
||||
.wy-side-nav-search input[type="text"] {
|
||||
background-color: var(--input-background-color);
|
||||
color: var(--body-color);
|
||||
/* Avoid reflowing when toggling the focus state */
|
||||
border: 2px solid transparent;
|
||||
box-shadow: none;
|
||||
/* Make visual feedback instant */
|
||||
transition: none;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.wy-side-nav-search input[type="text"]:focus {
|
||||
border: 2px solid var(--input-focus-border-color);
|
||||
}
|
||||
|
||||
.wy-side-nav-search input[type="text"]::placeholder {
|
||||
color: var(--body-color);
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
/* Navigation bar */
|
||||
|
||||
.wy-nav-side {
|
||||
background-color: var(--navbar-background-color);
|
||||
}
|
||||
|
||||
.wy-menu-vertical header,
|
||||
.wy-menu-vertical p.caption {
|
||||
color: var(--navbar-heading-color);
|
||||
|
||||
/* Improves the appearance of uppercase text */
|
||||
letter-spacing: 0.75px;
|
||||
}
|
||||
|
||||
/* Mobile navigation */
|
||||
|
||||
.wy-nav-top,
|
||||
.wy-nav-top a {
|
||||
background-color: var(--navbar-background-color);
|
||||
color: var(--navbar-level-1-color);
|
||||
}
|
||||
|
||||
/* Version branch label below the logo */
|
||||
.wy-side-nav-search > div.version {
|
||||
color: var(--navbar-level-3-color);
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
/* First level of navigation items */
|
||||
|
||||
.wy-menu-vertical a {
|
||||
color: var(--navbar-level-1-color);
|
||||
}
|
||||
|
||||
.wy-menu-vertical a:hover {
|
||||
background-color: var(--navbar-background-color-hover);
|
||||
color: var(--navbar-level-1-color);
|
||||
}
|
||||
|
||||
.wy-menu-vertical a:active {
|
||||
background-color: var(--navbar-background-color-active);
|
||||
}
|
||||
|
||||
.wy-menu-vertical li.toctree-l1.current > a {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.wy-side-nav-search, .wy-menu-vertical a, .wy-menu-vertical a span.toctree-expand,
|
||||
.wy-menu-vertical li.toctree-l2 a span.toctree-expand {
|
||||
color: var(--navbar-level-3-color);
|
||||
opacity: 0.9;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.wy-side-nav-search, .wy-menu-vertical a, .wy-menu-vertical a:hover span.toctree-expand,
|
||||
.wy-menu-vertical li.toctree-l2 a:hover span.toctree-expand {
|
||||
color: var(--navbar-level-2-color);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wy-side-nav-search, .wy-menu-vertical a, .wy-menu-vertical a:active span.toctree-expand,
|
||||
.wy-menu-vertical li.toctree-l2 a:active span.toctree-expand {
|
||||
color: var(--navbar-level-1-color);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Second (and higher) levels of navigation items */
|
||||
|
||||
.wy-menu-vertical li.current a {
|
||||
/* Make long words always display on a single line, keep wrapping for multiple words */
|
||||
/* This fixes the class reference titles' display with very long class names */
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.wy-menu-vertical li.current a,
|
||||
.wy-menu-vertical li.toctree-l2.current > a,
|
||||
.wy-menu-vertical li.toctree-l2.current li.toctree-l3 > a,
|
||||
.wy-menu-vertical li.toctree-l2.current li.toctree-l4 > a {
|
||||
background-color: var(--navbar-current-background-color);
|
||||
color: var(--navbar-level-2-color);
|
||||
border-color: var(--navbar-current-background-color);
|
||||
}
|
||||
|
||||
.wy-menu-vertical li.current a:hover,
|
||||
.wy-menu-vertical li.toctree-l2.current > a:hover,
|
||||
.wy-menu-vertical li.toctree-l2.current li.toctree-l3 > a:hover,
|
||||
.wy-menu-vertical li.toctree-l3.current li.toctree-l4 > a:hover {
|
||||
background-color: var(--navbar-current-background-color-hover);
|
||||
}
|
||||
|
||||
.wy-menu-vertical li.current a:active,
|
||||
.wy-menu-vertical li.toctree-l2.current > a:active,
|
||||
.wy-menu-vertical li.toctree-l2.current li.toctree-l3 > a:active,
|
||||
.wy-menu-vertical li.toctree-l3.current li.toctree-l4 > a:active {
|
||||
background-color: var(--navbar-current-background-color-active);
|
||||
}
|
||||
|
||||
.wy-menu-vertical a {
|
||||
/* This overrides 8px margin added in other multi-selector rules */
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
/* Banner panel in sidebar */
|
||||
.wy-nav-side .ethical-rtd.fixed {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
/* Version selector (only visible on Read the Docs) */
|
||||
|
||||
.rst-versions {
|
||||
background-color: var(--navbar-current-background-color);
|
||||
}
|
||||
|
||||
.rst-versions a,
|
||||
.rst-versions .rst-current-version,
|
||||
.rst-versions .rst-current-version .fa,
|
||||
.rst-versions .rst-other-versions dd a {
|
||||
color: var(--navbar-level-1-color);
|
||||
}
|
||||
|
||||
.rst-versions .rst-other-versions small {
|
||||
color: var(--navbar-level-3-color);
|
||||
}
|
||||
|
||||
.rst-versions .rst-other-versions dd a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.rst-versions .rst-other-versions {
|
||||
color: var(--navbar-heading-color);
|
||||
}
|
||||
|
||||
.rst-versions .rst-current-version {
|
||||
background-color: var(--navbar-current-background-color);
|
||||
}
|
||||
|
||||
.rst-versions .rst-current-version:hover {
|
||||
background-color: var(--navbar-current-background-color-hover);
|
||||
}
|
||||
|
||||
.rst-versions .rst-current-version:active {
|
||||
background-color: var(--navbar-current-background-color-active);
|
||||
}
|
||||
|
||||
.rst-versions.shift-up {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
/* Hide the obnoxious automatic highlight in search results */
|
||||
.rst-content .highlighted {
|
||||
background-color: transparent;
|
||||
font-weight: inherit;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Allows the scrollbar to be shown in the sidebar */
|
||||
@media only screen and (min-width: 769px) {
|
||||
.wy-side-scroll {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.wy-nav-side .wy-side-scroll .ethical-rtd {
|
||||
width: calc(300px - 1.25em);
|
||||
padding: 0 0 0 1em;
|
||||
}
|
||||
}
|
||||
.wy-menu.wy-menu-vertical {
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
max-height: calc(100% - 348px);
|
||||
}
|
||||
@media screen and (max-width: 768px) {
|
||||
.wy-nav-side {
|
||||
padding-bottom: 44px;
|
||||
}
|
||||
.wy-menu.wy-menu-vertical {
|
||||
overflow-y: initial;
|
||||
max-height: initial;
|
||||
}
|
||||
}
|
||||
|
||||
/* Scrollbar styling */
|
||||
.wy-menu.wy-menu-vertical {
|
||||
scrollbar-color: var(--navbar-scrollbar-color) var(--navbar-scrollbar-background);
|
||||
}
|
||||
.wy-menu.wy-menu-vertical::-webkit-scrollbar {
|
||||
width: .75rem;
|
||||
}
|
||||
.wy-menu.wy-menu-vertical::-webkit-scrollbar-track {
|
||||
background-color: var(--navbar-scrollbar-background);
|
||||
}
|
||||
.wy-menu.wy-menu-vertical::-webkit-scrollbar-thumb {
|
||||
background-color: var(--navbar-scrollbar-color);
|
||||
}
|
||||
/* Firefox does the dimming on hover automatically. We emulate it for Webkit-based browsers. */
|
||||
.wy-menu.wy-menu-vertical::-webkit-scrollbar-thumb:hover {
|
||||
background-color: var(--navbar-scrollbar-hover-color);
|
||||
}
|
||||
.wy-menu.wy-menu-vertical::-webkit-scrollbar-thumb:active {
|
||||
background-color: var(--navbar-scrollbar-active-color);
|
||||
}
|
||||
|
||||
/* Breathe tweaks */
|
||||
|
||||
.rst-content dl.group>dt, .rst-content dl.group>dd>p {
|
||||
display:none !important;
|
||||
}
|
||||
|
||||
.rst-content dl.group {
|
||||
margin: 0 0 1rem 0;
|
||||
}
|
||||
|
||||
.rst-content dl.group>dd {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
.rst-content p.breathe-sectiondef-title {
|
||||
font-size: 115%;
|
||||
color: var(--link-color);
|
||||
}
|
||||
|
||||
.rst-content div.breathe-sectiondef {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.rst-content dl:not(.docutils) dl dt, dl:not(.docutils,.rst-other-versions) dt {
|
||||
background: var(--admonition-note-background-color) !important;
|
||||
border-top: none !important;
|
||||
border-left: none !important;
|
||||
}
|
||||
|
||||
/* Misc tweaks */
|
||||
|
||||
.rst-columns {
|
||||
column-width: 18em;
|
||||
}
|
||||
|
||||
.figure {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wy-alert.wy-alert-danger {
|
||||
background-color: var(--admonition-danger-background-color);
|
||||
}
|
||||
|
||||
#dark-mode-toggle {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* Home page grid display */
|
||||
.grid {
|
||||
list-style-type: none !important;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
margin: 1rem auto;
|
||||
max-width: calc((160px + 2rem) * 4);
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
list-style-type: none !important;
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex: 0 0 auto;
|
||||
flex: 0 0 auto;
|
||||
width: 150px;
|
||||
text-align: center;
|
||||
margin: 1rem;
|
||||
}
|
||||
|
||||
.grid-item a {
|
||||
display: block;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
padding: 20px;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
border-radius: 0.5rem;
|
||||
background: linear-gradient(135deg, #0070c5 0%, #5c13a5 100%);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.grid-item h2 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.grid-item img {
|
||||
margin-bottom: 1rem;
|
||||
max-width: 75%;
|
||||
}
|
||||
|
||||
.grid-item a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.grid-item p {
|
||||
font-size: 0.9rem;
|
||||
margin-top: 0.5rem;
|
||||
color: var(--body-color);
|
||||
}
|
||||
|
||||
.grid-icon {
|
||||
line-height: 1.5;
|
||||
font-size: 3rem;
|
||||
color: white;
|
||||
}
|
93
doc/_static/css/dark.css
vendored
Normal file
93
doc/_static/css/dark.css
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
/**
|
||||
* Copyright (c) 2019-2020, Juan Linietsky, Ariel Manzur and the Godot community
|
||||
* Copyright (c) 2021, Teslabs Engineering S.L.
|
||||
* SPDX-License-Identifier: CC-BY-3.0
|
||||
*
|
||||
* Dark theme colors
|
||||
*/
|
||||
|
||||
:root {
|
||||
--body-color: rgba(255, 255, 255, 0.85);
|
||||
--content-wrap-background-color: #202326;
|
||||
--content-background-color: #2e3236;
|
||||
/* Decrease the logo opacity when using the dark theme to be less distracting */
|
||||
--logo-opacity: 0.85;
|
||||
--navbar-background-color: #25282b;
|
||||
--navbar-background-color-hover: #333639;
|
||||
--navbar-background-color-active: #111417;
|
||||
--navbar-current-background-color: #333639;
|
||||
--navbar-current-background-color-hover: #44474a;
|
||||
--navbar-current-background-color-active: #222528;
|
||||
--navbar-level-1-color: #ddd;
|
||||
--navbar-level-2-color: #ccc;
|
||||
--navbar-level-3-color: #bbb;
|
||||
--navbar-heading-color: #af7fe4;
|
||||
--navbar-scrollbar-color: #af7fe4;
|
||||
--navbar-scrollbar-hover-color: #9454db;
|
||||
--navbar-scrollbar-active-color: #7929d2;
|
||||
--navbar-scrollbar-background: #1c1e21;
|
||||
|
||||
--link-color: #8cf;
|
||||
--link-color-hover: #9df;
|
||||
--link-color-active: #6ad;
|
||||
--link-color-visited: #cb99f6;
|
||||
--external-reference-icon: url("data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEyIiB3aWR0aD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjOGNmIj48cGF0aCBkPSJtNy41IDcuMXYzLjRoLTZ2LTZoMy40Ii8+PHBhdGggZD0ibTUuNzY1IDFoNS4yMzV2NS4zOWwtMS41NzMgMS41NDctMS4zMS0xLjMxLTIuNzI0IDIuNzIzLTIuNjktMi42ODggMi44MS0yLjgwOC0xLjMxMy0xLjMxeiIvPjwvZz48L3N2Zz4K");
|
||||
--classref-badge-text-color: hsl(0, 0%, 70%);
|
||||
|
||||
--hr-color: #555;
|
||||
--table-row-odd-background-color: #3b3e41;
|
||||
--code-background-color: #434649;
|
||||
--code-border-color: #505356;
|
||||
--code-literal-color: #faa;
|
||||
--input-background-color: #333537;
|
||||
--input-focus-border-color: #5f8cff;
|
||||
|
||||
--search-input-background-color: #43464a; /* derived from --input-background-color */
|
||||
--search-match-color: #52b4ff; /* derived from --link-color */
|
||||
--search-match-background-color: #414c56; /* derived from --link-color */
|
||||
--search-active-color: #202326;
|
||||
--search-credits-background-color: #202123; /* derived from --navbar-background-color */
|
||||
--search-credits-color: #6b6b6b; /* derived from --footer-color */
|
||||
--search-credits-link-color: #628fb1; /* derived from --link-color */
|
||||
|
||||
/* Colors taken from the Godot script editor with the Adaptive theme */
|
||||
--highlight-background-color: #202531;
|
||||
--highlight-background-emph-color: #2d3444;
|
||||
--highlight-default-color: rgba(255, 255, 255, 0.85);
|
||||
--highlight-comment-color: rgba(204, 206, 211, 0.5);
|
||||
--highlight-keyword-color: #ff7085;
|
||||
--highlight-keyword2-color: #42ffc2;
|
||||
--highlight-number-color: #a1ffe0;
|
||||
--highlight-decorator-color: #abc8ff;
|
||||
--highlight-type-color: #8effda;
|
||||
--highlight-type2-color: #c6ffed;
|
||||
--highlight-function-color: #57b3ff;
|
||||
--highlight-operator-color: #abc8ff;
|
||||
--highlight-string-color: #ffeca1;
|
||||
|
||||
--admonition-note-background-color: #303d4f;
|
||||
--admonition-note-color: #bfeeff;
|
||||
--admonition-note-title-background-color: #305070;
|
||||
--admonition-note-title-color: #bfefff;
|
||||
--admonition-attention-background-color: #444033;
|
||||
--admonition-attention-color: #ffeeaf;
|
||||
--admonition-attention-title-background-color: #665022;
|
||||
--admonition-attention-title-color: #ffeeaf;
|
||||
--admonition-danger-background-color: #433;
|
||||
--admonition-danger-color: #fcc;
|
||||
--admonition-danger-title-background-color: #633;
|
||||
--admonition-danger-title-color: #fcc;
|
||||
--admonition-tip-background-color: #28382d;
|
||||
--admonition-tip-color: #dfd;
|
||||
--admonition-tip-title-background-color: #336648;
|
||||
--admonition-tip-title-color: #dfd;
|
||||
|
||||
--kbd-background-color: #595b5d;
|
||||
--kbd-outline-color: #3d4144;
|
||||
--kbd-shadow-color: #1e2023;
|
||||
--kbd-text-color: #e2f2ff;
|
||||
|
||||
--btn-neutral-background-color: #404040;
|
||||
--btn-neutral-hover-background-color: #505050;
|
||||
--footer-color: #aaa;
|
||||
}
|
91
doc/_static/css/light.css
vendored
Normal file
91
doc/_static/css/light.css
vendored
Normal file
|
@ -0,0 +1,91 @@
|
|||
/**
|
||||
* Copyright (c) 2019-2020, Juan Linietsky, Ariel Manzur and the Godot community
|
||||
* Copyright (c) 2021, Teslabs Engineering S.L.
|
||||
* SPDX-License-Identifier: CC-BY-3.0
|
||||
*
|
||||
* Light theme colors
|
||||
*/
|
||||
|
||||
:root {
|
||||
--body-color: #404040;
|
||||
--content-wrap-background-color: #efefef;
|
||||
--content-background-color: #fcfcfc;
|
||||
--logo-opacity: 1.0;
|
||||
--navbar-background-color: #333f67;
|
||||
--navbar-background-color-hover: #29355c;
|
||||
--navbar-background-color-active: #212d51;
|
||||
--navbar-current-background-color: #212d51;
|
||||
--navbar-current-background-color-hover: #182343;
|
||||
--navbar-current-background-color-active: #131e3b;
|
||||
--navbar-level-1-color: #c3e3ff;
|
||||
--navbar-level-2-color: #b8d6f0;
|
||||
--navbar-level-3-color: #a3c4e1;
|
||||
--navbar-heading-color: #af7fe4;
|
||||
--navbar-scrollbar-color: #af7fe4;
|
||||
--navbar-scrollbar-hover-color: #9454db;
|
||||
--navbar-scrollbar-active-color: #7929d2;
|
||||
--navbar-scrollbar-background: #131e2b;
|
||||
|
||||
--link-color: #2980b9;
|
||||
--link-color-hover: #3091d1;
|
||||
--link-color-active: #105078;
|
||||
--link-color-visited: #9b59b6;
|
||||
--external-reference-icon: url("data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEyIiB3aWR0aD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMjk4MGI5Ij48cGF0aCBkPSJtNy41IDcuMXYzLjRoLTZ2LTZoMy40Ii8+PHBhdGggZD0ibTUuNzY1IDFoNS4yMzV2NS4zOWwtMS41NzMgMS41NDctMS4zMS0xLjMxLTIuNzI0IDIuNzIzLTIuNjktMi42ODggMi44MS0yLjgwOC0xLjMxMy0xLjMxeiIvPjwvZz48L3N2Zz4K");
|
||||
--classref-badge-text-color: hsl(0, 0%, 45%);
|
||||
|
||||
--hr-color: #e1e4e5;
|
||||
--table-row-odd-background-color: #f3f6f6;
|
||||
--code-background-color: #fff;
|
||||
--code-border-color: #e1e4e5;
|
||||
--code-literal-color: #d04c60;
|
||||
--input-background-color: #fcfcfc;
|
||||
--input-focus-border-color: #5f8cff;
|
||||
|
||||
--search-input-background-color: #e6eef3; /* derived from --input-background-color */
|
||||
--search-match-color: #2c6b96; /* derived from --link-color */
|
||||
--search-match-background-color: #e3f2fd; /* derived from --link-color */
|
||||
--search-active-color: #efefef;
|
||||
--search-credits-background-color: #333f67; /* derived from --navbar-background-color */
|
||||
--search-credits-color: #b3b3b3; /* derived from --footer-color */
|
||||
--search-credits-link-color: #4392c5; /* derived from --link-color */
|
||||
|
||||
--highlight-background-color: #f0f2f4;
|
||||
--highlight-background-emph-color: #dbe6c3;
|
||||
--highlight-default-color: #404040;
|
||||
--highlight-comment-color: #408090;
|
||||
--highlight-keyword-color: #007020;
|
||||
--highlight-keyword2-color: #902000;
|
||||
--highlight-number-color: #208050;
|
||||
--highlight-decorator-color: #4070a0;
|
||||
--highlight-type-color: #007020;
|
||||
--highlight-type2-color: #0e84b5;
|
||||
--highlight-function-color: #06287e;
|
||||
--highlight-operator-color: #666666;
|
||||
--highlight-string-color: #4070a0;
|
||||
|
||||
--admonition-note-background-color: #e7f2fa;
|
||||
--admonition-note-color: #404040;
|
||||
--admonition-note-title-background-color: #6ab0de;
|
||||
--admonition-note-title-color: #fff;
|
||||
--admonition-attention-background-color: #ffedcc;
|
||||
--admonition-attention-color: #404040;
|
||||
--admonition-attention-title-background-color: #f0b37e;
|
||||
--admonition-attention-title-color: #fff;
|
||||
--admonition-danger-background-color: #fcf3f2;
|
||||
--admonition-danger-color: #404040;
|
||||
--admonition-danger-title-background-color: #e9a499;
|
||||
--admonition-danger-title-color: #fff;
|
||||
--admonition-tip-background-color: #dbfaf4;
|
||||
--admonition-tip-color: #404040;
|
||||
--admonition-tip-title-background-color: #1abc9c;
|
||||
--admonition-tip-title-color: #fff;
|
||||
|
||||
--kbd-background-color: #fafbfc;
|
||||
--kbd-outline-color: #d1d5da;
|
||||
--kbd-shadow-color: #b0b7bf;
|
||||
--kbd-text-color: #444d56;
|
||||
|
||||
--btn-neutral-background-color: #f3f6f6;
|
||||
--btn-neutral-hover-background-color: #e5ebeb;
|
||||
--footer-color: #808080;
|
||||
}
|
305
doc/_static/css/zephyr-custom.css
vendored
305
doc/_static/css/zephyr-custom.css
vendored
|
@ -1,305 +0,0 @@
|
|||
/* -- Extra CSS styles for Zephyr content (RTD theme) ----------------------- */
|
||||
|
||||
/* make the page width fill the window */
|
||||
.wy-nav-content {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
/* pygments tweak for white-on-black console */
|
||||
/* hold off on this change for now
|
||||
|
||||
.highlight-console .highlight {
|
||||
background-color: black;
|
||||
}
|
||||
.highlight-console .highlight .go, .highlight-console .highlight .gp {
|
||||
color: white;
|
||||
}
|
||||
.highlight-console .highlight .hll {
|
||||
background-color: white;
|
||||
}
|
||||
.highlight-console .highlight .hll .go, .highlight-console .highlight .hll .gp {
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
}
|
||||
*/
|
||||
|
||||
/* tweak doc version selection */
|
||||
.rst-versions {
|
||||
position: static !important;
|
||||
}
|
||||
|
||||
|
||||
.rst-versions .rst-current-version {
|
||||
padding: 5px;
|
||||
background-color: #2980B9;
|
||||
color: #80FF80;
|
||||
}
|
||||
|
||||
.rst-versions .rst-other-versions {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
div.rst-other-versions dl {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* tweak spacing after a toctree, fixing issue from sphinx-tabs */
|
||||
.toctree-wrapper ul, ul.simple ol.simple {
|
||||
margin-bottom: 24px !important;
|
||||
}
|
||||
|
||||
/* code block highlight color in rtd changed to lime green, no no no */
|
||||
|
||||
.rst-content tt.literal, .rst-content code.literal, .highlight {
|
||||
background: #f0f0f0;
|
||||
}
|
||||
.rst-content tt.literal, .rst-content code.literal {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
/* code literal links should be blue, and purple after visiting */
|
||||
a.internal code.literal {
|
||||
color: #2980B9;
|
||||
}
|
||||
a.internal:visited code.literal {
|
||||
color: #9B59B9;
|
||||
}
|
||||
|
||||
/* Make the version number more visible */
|
||||
.wy-side-nav-search>div.version {
|
||||
color: rgba(255,255,255,1);
|
||||
}
|
||||
|
||||
/* squish the space between a paragraph before a list */
|
||||
div > p + ul, div > p + ol {
|
||||
margin-top: -20px;
|
||||
}
|
||||
|
||||
/* squish space before an hlist in a list */
|
||||
li table.hlist {
|
||||
margin-top: -10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
/* add some space before the figure caption */
|
||||
p.caption {
|
||||
# border-top: 1px solid;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
/* decrease line leading a bit, 24px is too wide */
|
||||
|
||||
p {
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
/* add a colon after the figure/table number (before the caption) */
|
||||
span.caption-number::after {
|
||||
content: ": ";
|
||||
}
|
||||
|
||||
p.extrafooter {
|
||||
text-align: right;
|
||||
margin-top: -36px;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
display: table !important;
|
||||
}
|
||||
|
||||
/* put the table caption at the bottom, as done for figures */
|
||||
table {
|
||||
caption-side: bottom;
|
||||
}
|
||||
|
||||
.code-block-caption {
|
||||
color: #000;
|
||||
font: italic 85%/1 arial,sans-serif;
|
||||
padding: 1em 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* make .. hlist:: tables fill the page */
|
||||
table.hlist {
|
||||
width: 95% !important;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
/* override rtd theme white-space no-wrap in table heading and content */
|
||||
th,td {
|
||||
white-space: normal !important;
|
||||
}
|
||||
|
||||
/* dbk tweak for doxygen-generated API headings (for RTD theme) */
|
||||
.rst-content dl.group>dt, .rst-content dl.group>dd>p {
|
||||
display:none !important;
|
||||
}
|
||||
.rst-content dl.group {
|
||||
margin: 0 0 12px 0px;
|
||||
}
|
||||
.rst-content dl.group>dd {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
.rst-content p.breathe-sectiondef-title {
|
||||
text-decoration: underline; /* dbk for API sub-headings */
|
||||
font-size: 1.25rem;
|
||||
font-weight: bold;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.rst-content div.breathe-sectiondef {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
/* doxygenXX item color tweaks, light blue background with dark blue top border */
|
||||
.rst-content dl:not(.docutils) dl dt, dl:not(.docutils,.rst-other-versions) dt {
|
||||
background: #e7f2fa !important;
|
||||
border-top: none !important;
|
||||
border-left: none !important; */
|
||||
}
|
||||
|
||||
|
||||
/* tweak display of option tables to make first column wider */
|
||||
col.option {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
/* tweak format for <kbd> (:kbd:`F10`) */
|
||||
kbd
|
||||
{
|
||||
-moz-border-radius:3px;
|
||||
-moz-box-shadow:0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset;
|
||||
-webkit-border-radius:3px;
|
||||
-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset;
|
||||
background-color:#f7f7f7;
|
||||
border:1px solid #ccc;
|
||||
border-radius:3px;
|
||||
box-shadow:0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset;
|
||||
color:#333;
|
||||
display:inline-block;
|
||||
font-family:Arial,Helvetica,sans-serif;
|
||||
font-size:11px;
|
||||
line-height:1.4;
|
||||
margin:0 .1em;
|
||||
padding:.1em .6em;
|
||||
text-shadow:0 1px 0 #fff;
|
||||
}
|
||||
|
||||
/* home page grid display */
|
||||
|
||||
.grid {
|
||||
list-style-type: none !important;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
margin: 1rem auto;
|
||||
max-width: calc((250px + 2rem) * 4);
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
list-style-type: none !important;
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex: 0 0 auto;
|
||||
flex: 0 0 auto;
|
||||
width: 200px;
|
||||
text-align: center;
|
||||
margin: 1rem;
|
||||
}
|
||||
|
||||
.grid-item a {
|
||||
display: block;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 20px;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
border: 1px solid #c6cbce;
|
||||
background-color: #57D3FC;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.grid-item h2 {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.grid-item img {
|
||||
margin-bottom: 1.1rem;
|
||||
max-width: 75%;
|
||||
}
|
||||
|
||||
|
||||
.grid-item a:hover {
|
||||
background-color: #C756E9;
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
.grid-item p {
|
||||
margin-top: 0.5rem;
|
||||
color: #333e48;
|
||||
}
|
||||
|
||||
.grid-icon {
|
||||
line-height: 1.8;
|
||||
font-size: 4rem;
|
||||
color: mediumslateblue;
|
||||
}
|
||||
|
||||
/* add a class for multi-column support
|
||||
* in docs to replace use of .hlist with
|
||||
* a .. rst-class:: rst-columns
|
||||
*/
|
||||
|
||||
.rst-columns {
|
||||
column-width: 18em;
|
||||
}
|
||||
|
||||
/* numbered "h2" steps */
|
||||
|
||||
body {
|
||||
counter-reset: step-count;
|
||||
}
|
||||
|
||||
div.numbered-step h2::before {
|
||||
counter-increment: step-count;
|
||||
content: counter(step-count);
|
||||
background: #cccccc;
|
||||
border-radius: 0.8em;
|
||||
-moz-border-radius: 0.8em;
|
||||
-webkit-border-radius: 0.8em;
|
||||
color: #ffffff;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
line-height: 1.6em;
|
||||
margin-right: 5px;
|
||||
text-align: center;
|
||||
width: 1.6em;
|
||||
}
|
||||
|
||||
/* tweak bottom margin of a code block in a list */
|
||||
|
||||
.tab div[class^='highlight']:last-child {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
/* force table content font-size in responsive tables to be 100%
|
||||
* fixing larger font size for paragraphs in the kconfig tables */
|
||||
|
||||
.wy-table-responsive td p {
|
||||
font-size:100%;
|
||||
}
|
218
doc/_static/images/logo.svg
vendored
Normal file
218
doc/_static/images/logo.svg
vendored
Normal file
|
@ -0,0 +1,218 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
id="Layer_1"
|
||||
data-name="Layer 1"
|
||||
viewBox="0 0 1100 549.99995"
|
||||
version="1.1"
|
||||
sodipodi:docname="logo.svg"
|
||||
width="1100"
|
||||
height="550"
|
||||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
|
||||
<metadata
|
||||
id="metadata59">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Untitled-1</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1214"
|
||||
inkscape:window-height="795"
|
||||
id="namedview57"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.30950752"
|
||||
inkscape:cx="539.56686"
|
||||
inkscape:cy="251.03579"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="Layer_1" />
|
||||
<defs
|
||||
id="defs20">
|
||||
<style
|
||||
id="style2">.cls-1{fill:#7929d2;}.cls-2{fill:#9454db;}.cls-3{fill:#af7fe4;}.cls-4{fill:url(#linear-gradient);}.cls-5{fill:url(#linear-gradient-2);}.cls-6{fill:url(#linear-gradient-3);}.cls-7{fill:url(#linear-gradient-4);}.cls-8{fill:#2d3136;}</style>
|
||||
<linearGradient
|
||||
id="linear-gradient"
|
||||
x1="410.04001"
|
||||
y1="186.75999"
|
||||
x2="650.37"
|
||||
y2="186.75999"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#7929d2"
|
||||
id="stop4" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#0070c5"
|
||||
id="stop6" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linear-gradient-2"
|
||||
x1="426.39999"
|
||||
y1="-24.950001"
|
||||
x2="424.39001"
|
||||
y2="212.61"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#00aeff"
|
||||
id="stop9" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#9454db"
|
||||
id="stop11" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linear-gradient-3"
|
||||
x1="558.67999"
|
||||
y1="73.550003"
|
||||
x2="507.37"
|
||||
y2="-15.32"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#66a9dc"
|
||||
id="stop14" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#b1e4fa"
|
||||
id="stop16" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linear-gradient-4"
|
||||
x1="570.09003"
|
||||
y1="3.9200001"
|
||||
x2="599.23999"
|
||||
y2="205.55"
|
||||
xlink:href="#linear-gradient-2" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linear-gradient-2"
|
||||
id="linearGradient866"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="426.39999"
|
||||
y1="-24.950001"
|
||||
x2="424.39001"
|
||||
y2="212.61" />
|
||||
</defs>
|
||||
<title
|
||||
id="title22">Untitled-1</title>
|
||||
<polygon
|
||||
class="cls-1"
|
||||
points="320.11,282.9 240.72,316.42 308.22,350.51 "
|
||||
id="polygon24"
|
||||
style="fill:#7929d2"
|
||||
transform="translate(16.89,9.4249719)" />
|
||||
<polygon
|
||||
class="cls-2"
|
||||
points="148.7,327.32 64.01,295.62 83.64,362.2 "
|
||||
id="polygon26"
|
||||
style="fill:#9454db"
|
||||
transform="translate(16.89,9.4249719)" />
|
||||
<polygon
|
||||
class="cls-3"
|
||||
points="188.85,267.73 240.72,316.42 148.7,327.32 "
|
||||
id="polygon28"
|
||||
style="fill:#af7fe4"
|
||||
transform="translate(16.89,9.4249719)" />
|
||||
<polygon
|
||||
class="cls-3"
|
||||
points="74.24,221.98 64.01,295.62 0,231.73 "
|
||||
id="polygon30"
|
||||
style="fill:#af7fe4"
|
||||
transform="translate(16.89,9.4249719)" />
|
||||
<polygon
|
||||
class="cls-4"
|
||||
points="320.11,282.9 529.1,90.63 623.05,215.12 "
|
||||
id="polygon32"
|
||||
style="fill:url(#linear-gradient)"
|
||||
transform="translate(16.89,9.4249719)" />
|
||||
<polygon
|
||||
class="cls-5"
|
||||
points="320.11,282.9 409.38,0 529.1,90.63 "
|
||||
id="polygon34"
|
||||
style="fill:url(#linearGradient866)"
|
||||
transform="translate(16.89,9.4249719)" />
|
||||
<polygon
|
||||
class="cls-6"
|
||||
points="409.38,0 623.05,0 529.1,90.63 "
|
||||
id="polygon36"
|
||||
style="fill:url(#linear-gradient-3)"
|
||||
transform="translate(16.89,9.4249719)" />
|
||||
<polygon
|
||||
class="cls-7"
|
||||
points="623.05,215.12 623.05,0 529.1,90.63 "
|
||||
id="polygon38"
|
||||
style="fill:url(#linear-gradient-4)"
|
||||
transform="translate(16.89,9.4249719)" />
|
||||
<path
|
||||
class="cls-8"
|
||||
d="m 1049.41,376.05497 v 19.68 h -4.91 v -19.68 h -7.45 v -4.51 h 19.82 v 4.51 z"
|
||||
id="path40"
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
class="cls-8"
|
||||
d="m 1078.33,395.73497 v -16.24 l -5.8,10.1 h -2.84 l -5.74,-10.1 v 16.25 h -4.75 v -24.2 h 5.68 l 6.31,11.48 6.36,-11.48 h 5.56 v 24.19 z"
|
||||
id="path42"
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
class="cls-8"
|
||||
d="m 425.28,503.05499 v -22.56 l 60.3,-84.34002 h -57.45 v -24.5 h 89.46 v 21.56 l -60.88,85.38002 h 62.49 v 24.5 z"
|
||||
id="path44"
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
class="cls-8"
|
||||
d="m 556.5,459.65499 q 0.66,13.29 6.45,19.09 5.79,5.8 18.25,5.75 a 40.54,40.54 0 0 0 12.68,-1.8 20.27,20.27 0 0 0 9.54,-6.94 l 18.24,13 a 36.93,36.93 0 0 1 -15.53,12.91 q -9.54,4.28 -26.07,4.28 -24.6,0 -36.71,-12.92 -12.11,-12.92 -12.11,-39 0,-53.47002 47.87,-53.47002 21.27,0 32.43,12 11.16,12 11.16,35.00002 v 12.06 z m 41.88,-16.91 q 0,-22.69002 -19.85,-22.69002 a 22.64,22.64 0 0 0 -10.73,2.23 16.67,16.67 0 0 0 -6.7,6.65 q -2.52,4.41 -3.94,13.81002 z"
|
||||
id="path46"
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
class="cls-8"
|
||||
d="m 732.95,452.49499 q 0,16.05 -4.85,28.3 -4.85,12.25 -13.86,18.71 -9,6.45 -21.56,6.46 -16.53,0 -28.21,-10.36 v 44.92 h -24.5 V 403.43497 h 22.6 v 9.78 a 58.83,58.83 0 0 1 14.39,-9.26 42.06,42.06 0 0 1 17.33,-3.37 q 18.9,0 28.78,13.29 9.88,13.29 9.88,38.62002 z m -25.27,0.38 q 0,-14.53002 -5,-22.65002 -5,-8.12 -15,-8.12 a 30.14,30.14 0 0 0 -12.29,2.8 41.16,41.16 0 0 0 -10.89,6.92 v 43.59002 a 39.29,39.29 0 0 0 9.64,6.23 27.5,27.5 0 0 0 11.82,2.7 q 10.08,0 15.91,-8.59 5.83,-8.59 5.81,-22.84 z"
|
||||
id="path48"
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
class="cls-8"
|
||||
d="m 814.88,503.05499 v -54.89 q 0,-15.76002 -2.94,-20.90002 -2.94,-5.14 -10.44,-5.12 -10.92,0 -26.3,14.43 v 66.48002 H 750.68 V 361.64497 h 24.51 v 54.7 a 56.39,56.39 0 0 1 16.62,-11.77 41.81,41.81 0 0 1 17.28,-4 q 16.71,0 23.51,9.4 6.8,9.4 6.79,26.59 v 66.48002 z"
|
||||
id="path50"
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
class="cls-8"
|
||||
d="m 850.96,516.49499 a 44.33,44.33 0 0 0 14.34,2.76 15.07,15.07 0 0 0 9.68,-3.33 q 4.18,-3.32 8.65,-13.77 l 2.56,-5.89 -36,-92.78002 h 25.45 l 23.55,63.63002 24.12,-63.63002 h 24.89 l -42.83,106.41002 q -5.22,12.83 -10.16,19 a 29,29 0 0 1 -11.54,8.93 q -6.6,2.76 -16.57,2.75 a 81.53,81.53 0 0 1 -21.37,-2.84 z"
|
||||
id="path52"
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
class="cls-8"
|
||||
d="m 1019.7,427.36497 a 22.59,22.59 0 0 0 -10.07,-1.9 27,27 0 0 0 -13,3.28 56.92,56.92 0 0 0 -12.58,9.54 v 64.77002 h -24.51 v -99.62002 h 24.51 v 14.24 a 63.86,63.86 0 0 1 13.48,-11.3 30.12,30.12 0 0 1 16.15,-4.46 q 7.59,0 10.82,2 z"
|
||||
id="path54"
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0" />
|
||||
</svg>
|
After Width: | Height: | Size: 7.7 KiB |
218
doc/_static/js/custom.js
vendored
Normal file
218
doc/_static/js/custom.js
vendored
Normal file
|
@ -0,0 +1,218 @@
|
|||
// Copyright (c) 2019-2020, Juan Linietsky, Ariel Manzur and the Godot community
|
||||
// Copyright (c) 2021, Teslabs Engineering S.L.
|
||||
// SPDX-License-Identifier: CC-BY-3.0
|
||||
|
||||
// sphinx-rtd-theme customizations.
|
||||
|
||||
// Handle page scroll and adjust sidebar accordingly.
|
||||
// Each page has two scrolls: the main scroll, which is moving the content of the page;
|
||||
// and the sidebar scroll, which is moving the navigation in the sidebar.
|
||||
// We want the logo to gradually disappear as the main content is scrolled, giving
|
||||
// more room to the navigation on the left. This means adjusting the height
|
||||
// available to the navigation on the fly. There is also a banner below the navigation
|
||||
// that must be dealt with simultaneously.
|
||||
const registerOnScrollEvent = (function(){
|
||||
// Configuration.
|
||||
|
||||
// The number of pixels the user must scroll by before the logo is completely hidden.
|
||||
const scrollTopPixels = 129;
|
||||
// The target margin to be applied to the navigation bar when the logo is hidden.
|
||||
const menuTopMargin = 90;
|
||||
// The max-height offset when the logo is completely visible.
|
||||
const menuHeightOffset_default = 232;
|
||||
// The max-height offset when the logo is completely hidden.
|
||||
const menuHeightOffset_fixed = 102;
|
||||
// The distance between the two max-height offset values above; used for intermediate values.
|
||||
const menuHeightOffset_diff = (menuHeightOffset_default - menuHeightOffset_fixed);
|
||||
|
||||
// Media query handler.
|
||||
return function(mediaQuery) {
|
||||
// We only apply this logic to the "desktop" resolution (defined by a media query at the bottom).
|
||||
// This handler is executed when the result of the query evaluation changes, which means that
|
||||
// the page has moved between "desktop" and "mobile" states.
|
||||
|
||||
// When entering the "desktop" state, we register scroll events and adjust elements on the page.
|
||||
// When entering the "mobile" state, we clean up any registered events and restore elements on the page
|
||||
// to their initial state.
|
||||
|
||||
const $window = $(window);
|
||||
const $sidebar = $('.wy-side-scroll');
|
||||
const $search = $sidebar.children('.wy-side-nav-search');
|
||||
const $menu = $sidebar.children('.wy-menu-vertical');
|
||||
const $ethical = $sidebar.children('.ethical-rtd');
|
||||
|
||||
// This padding is needed to correctly adjust the height of the scrollable area in the sidebar.
|
||||
// It has to have the same height as the ethical block, if there is one.
|
||||
let $menuPadding = $menu.children('.wy-menu-ethical-padding');
|
||||
if ($menuPadding.length == 0) {
|
||||
$menuPadding = $('<div class="wy-menu-ethical-padding"></div>');
|
||||
$menu.append($menuPadding);
|
||||
}
|
||||
|
||||
if (mediaQuery.matches) {
|
||||
// Entering the "desktop" state.
|
||||
|
||||
// The main scroll event handler.
|
||||
// Executed as the page is scrolled and once immediately as the page enters this state.
|
||||
const handleMainScroll = (currentScroll) => {
|
||||
if (currentScroll >= scrollTopPixels) {
|
||||
// After the page is scrolled below the threshold, we fix everything in place.
|
||||
$search.css('margin-top', `-${scrollTopPixels}px`);
|
||||
$menu.css('margin-top', `${menuTopMargin}px`);
|
||||
$menu.css('max-height', `calc(100% - ${menuHeightOffset_fixed}px)`);
|
||||
}
|
||||
else {
|
||||
// Between the top of the page and the threshold we calculate intermediate values
|
||||
// to guarantee a smooth transition.
|
||||
$search.css('margin-top', `-${currentScroll}px`);
|
||||
$menu.css('margin-top', `${menuTopMargin + (scrollTopPixels - currentScroll)}px`);
|
||||
|
||||
if (currentScroll > 0) {
|
||||
const scrolledPercent = (scrollTopPixels - currentScroll) / scrollTopPixels;
|
||||
const offsetValue = menuHeightOffset_fixed + menuHeightOffset_diff * scrolledPercent;
|
||||
$menu.css('max-height', `calc(100% - ${offsetValue}px)`);
|
||||
} else {
|
||||
$menu.css('max-height', `calc(100% - ${menuHeightOffset_default}px)`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// The sidebar scroll event handler.
|
||||
// Executed as the sidebar is scrolled as well as after the main scroll. This is needed
|
||||
// because the main scroll can affect the scrollable area of the sidebar.
|
||||
const handleSidebarScroll = () => {
|
||||
const menuElement = $menu.get(0);
|
||||
const menuScrollTop = $menu.scrollTop();
|
||||
const menuScrollBottom = menuElement.scrollHeight - (menuScrollTop + menuElement.offsetHeight);
|
||||
|
||||
// As the navigation is scrolled we add a shadow to the top bar hanging over it.
|
||||
if (menuScrollTop > 0) {
|
||||
$search.addClass('fixed-and-scrolled');
|
||||
} else {
|
||||
$search.removeClass('fixed-and-scrolled');
|
||||
}
|
||||
|
||||
// Near the bottom we start moving the sidebar banner into view.
|
||||
if (menuScrollBottom < ethicalOffsetBottom) {
|
||||
$ethical.css('display', 'block');
|
||||
$ethical.css('margin-top', `-${ethicalOffsetBottom - menuScrollBottom}px`);
|
||||
} else {
|
||||
$ethical.css('display', 'none');
|
||||
$ethical.css('margin-top', '0px');
|
||||
}
|
||||
};
|
||||
|
||||
$search.addClass('fixed');
|
||||
$ethical.addClass('fixed');
|
||||
|
||||
// Adjust the inner height of navigation so that the banner can be overlaid there later.
|
||||
const ethicalOffsetBottom = $ethical.height() || 0;
|
||||
if (ethicalOffsetBottom) {
|
||||
$menuPadding.css('height', `${ethicalOffsetBottom}px`);
|
||||
} else {
|
||||
$menuPadding.css('height', `0px`);
|
||||
}
|
||||
|
||||
$window.scroll(function() {
|
||||
handleMainScroll(window.scrollY);
|
||||
handleSidebarScroll();
|
||||
});
|
||||
|
||||
$menu.scroll(function() {
|
||||
handleSidebarScroll();
|
||||
});
|
||||
|
||||
handleMainScroll(window.scrollY);
|
||||
handleSidebarScroll();
|
||||
} else {
|
||||
// Entering the "mobile" state.
|
||||
|
||||
$window.unbind('scroll');
|
||||
$menu.unbind('scroll');
|
||||
|
||||
$search.removeClass('fixed');
|
||||
$ethical.removeClass('fixed');
|
||||
|
||||
$search.css('margin-top', `0px`);
|
||||
$menu.css('margin-top', `0px`);
|
||||
$menu.css('max-height', 'initial');
|
||||
$menuPadding.css('height', `0px`);
|
||||
$ethical.css('margin-top', '0px');
|
||||
$ethical.css('display', 'block');
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
// Subscribe to DOM changes in the sidebar container, because there is a
|
||||
// banner that gets added at a later point, that we might not catch otherwise.
|
||||
const registerSidebarObserver = (function(){
|
||||
return function(callback) {
|
||||
const sidebarContainer = document.querySelector('.wy-side-scroll');
|
||||
|
||||
let sidebarEthical = null;
|
||||
const registerEthicalObserver = () => {
|
||||
if (sidebarEthical) {
|
||||
// Do it only once.
|
||||
return;
|
||||
}
|
||||
|
||||
sidebarEthical = sidebarContainer.querySelector('.ethical-rtd');
|
||||
if (!sidebarEthical) {
|
||||
// Do it only after we have the element there.
|
||||
return;
|
||||
}
|
||||
|
||||
// This observer watches over the ethical block in sidebar, and all of its subtree.
|
||||
const ethicalObserverConfig = { childList: true, subtree: true };
|
||||
const ethicalObserverCallback = (mutationsList, observer) => {
|
||||
for (let mutation of mutationsList) {
|
||||
if (mutation.type !== 'childList') {
|
||||
continue;
|
||||
}
|
||||
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
const ethicalObserver = new MutationObserver(ethicalObserverCallback);
|
||||
ethicalObserver.observe(sidebarEthical, ethicalObserverConfig);
|
||||
};
|
||||
registerEthicalObserver();
|
||||
|
||||
// This observer watches over direct children of the main sidebar container.
|
||||
const observerConfig = { childList: true };
|
||||
const observerCallback = (mutationsList, observer) => {
|
||||
for (let mutation of mutationsList) {
|
||||
if (mutation.type !== 'childList') {
|
||||
continue;
|
||||
}
|
||||
|
||||
callback();
|
||||
registerEthicalObserver();
|
||||
}
|
||||
};
|
||||
|
||||
const observer = new MutationObserver(observerCallback);
|
||||
observer.observe(sidebarContainer, observerConfig);
|
||||
};
|
||||
})();
|
||||
|
||||
$(document).ready(() => {
|
||||
const mediaQuery = window.matchMedia('only screen and (min-width: 769px)');
|
||||
|
||||
registerOnScrollEvent(mediaQuery);
|
||||
mediaQuery.addListener(registerOnScrollEvent);
|
||||
|
||||
registerSidebarObserver(() => {
|
||||
registerOnScrollEvent(mediaQuery);
|
||||
});
|
||||
|
||||
// Load instant.page to prefetch pages upon hovering. This makes navigation feel
|
||||
// snappier. The script is dynamically appended as Read the Docs doesn't have
|
||||
// a way to add scripts with a "module" attribute.
|
||||
const instantPageScript = document.createElement('script');
|
||||
instantPageScript.toggleAttribute('module');
|
||||
/*! instant.page v5.1.0 - (C) 2019-2020 Alexandre Dieulot - https://instant.page/license */
|
||||
instantPageScript.innerText = 'let t,e;const n=new Set,o=document.createElement("link"),i=o.relList&&o.relList.supports&&o.relList.supports("prefetch")&&window.IntersectionObserver&&"isIntersecting"in IntersectionObserverEntry.prototype,s="instantAllowQueryString"in document.body.dataset,a="instantAllowExternalLinks"in document.body.dataset,r="instantWhitelist"in document.body.dataset,c="instantMousedownShortcut"in document.body.dataset,d=1111;let l=65,u=!1,f=!1,m=!1;if("instantIntensity"in document.body.dataset){const t=document.body.dataset.instantIntensity;if("mousedown"==t.substr(0,"mousedown".length))u=!0,"mousedown-only"==t&&(f=!0);else if("viewport"==t.substr(0,"viewport".length))navigator.connection&&(navigator.connection.saveData||navigator.connection.effectiveType&&navigator.connection.effectiveType.includes("2g"))||("viewport"==t?document.documentElement.clientWidth*document.documentElement.clientHeight<45e4&&(m=!0):"viewport-all"==t&&(m=!0));else{const e=parseInt(t);isNaN(e)||(l=e)}}if(i){const n={capture:!0,passive:!0};if(f||document.addEventListener("touchstart",function(t){e=performance.now();const n=t.target.closest("a");if(!h(n))return;v(n.href)},n),u?c||document.addEventListener("mousedown",function(t){const e=t.target.closest("a");if(!h(e))return;v(e.href)},n):document.addEventListener("mouseover",function(n){if(performance.now()-e<d)return;const o=n.target.closest("a");if(!h(o))return;o.addEventListener("mouseout",p,{passive:!0}),t=setTimeout(()=>{v(o.href),t=void 0},l)},n),c&&document.addEventListener("mousedown",function(t){if(performance.now()-e<d)return;const n=t.target.closest("a");if(t.which>1||t.metaKey||t.ctrlKey)return;if(!n)return;n.addEventListener("click",function(t){1337!=t.detail&&t.preventDefault()},{capture:!0,passive:!1,once:!0});const o=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1,detail:1337});n.dispatchEvent(o)},n),m){let t;(t=window.requestIdleCallback?t=>{requestIdleCallback(t,{timeout:1500})}:t=>{t()})(()=>{const t=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const n=e.target;t.unobserve(n),v(n.href)}})});document.querySelectorAll("a").forEach(e=>{h(e)&&t.observe(e)})})}}function p(e){e.relatedTarget&&e.target.closest("a")==e.relatedTarget.closest("a")||t&&(clearTimeout(t),t=void 0)}function h(t){if(t&&t.href&&(!r||"instant"in t.dataset)&&(a||t.origin==location.origin||"instant"in t.dataset)&&["http:","https:"].includes(t.protocol)&&("http:"!=t.protocol||"https:"!=location.protocol)&&(s||!t.search||"instant"in t.dataset)&&!(t.hash&&t.pathname+t.search==location.pathname+location.search||"noInstant"in t.dataset))return!0}function v(t){if(n.has(t))return;const e=document.createElement("link");e.rel="prefetch",e.href=t,document.head.appendChild(e),n.add(t)}';
|
||||
document.head.appendChild(instantPageScript);
|
||||
});
|
2
doc/_static/js/dark-mode-toggle.min.mjs
vendored
Normal file
2
doc/_static/js/dark-mode-toggle.min.mjs
vendored
Normal file
File diff suppressed because one or more lines are too long
9
doc/_static/js/modernizr.min.js
vendored
9
doc/_static/js/modernizr.min.js
vendored
|
@ -1,9 +0,0 @@
|
|||
/* modernizr.min.js is causing unnecessary reloads of a page causing
|
||||
* flashing of the browser window during page load. This empty script
|
||||
* effectively wipes out the modernizr.min.js unnecessarily loaded by
|
||||
* the Sphinx rtd theme (see
|
||||
* https://github.com/readthedocs/sphinx_rtd_theme/issues/724)
|
||||
*
|
||||
* Copyright (c) 2019 Intel Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
6
doc/_static/js/zephyr-custom.js
vendored
6
doc/_static/js/zephyr-custom.js
vendored
|
@ -1,6 +0,0 @@
|
|||
/* tweak logo link to the project home page in a new tab*/
|
||||
|
||||
$(document).ready(function(){
|
||||
$( ".icon-home" ).attr("href", "https://zephyrproject.org/");
|
||||
$( ".icon-home" ).attr("target", "_blank");
|
||||
});
|
1
doc/_templates/breadcrumbs.html
vendored
1
doc/_templates/breadcrumbs.html
vendored
|
@ -11,4 +11,5 @@
|
|||
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a> »</li>
|
||||
{% endfor %}
|
||||
<li>{{ title }}</li>
|
||||
<dark-mode-toggle id="dark-mode-toggle" appearance="toggle" permanent="true"/>
|
||||
{% endblock %}
|
||||
|
|
6
doc/_templates/layout.html
vendored
6
doc/_templates/layout.html
vendored
|
@ -18,3 +18,9 @@
|
|||
{% include "zversions.html" %}
|
||||
{{ super() }}
|
||||
{% endblock %}
|
||||
{% block extrahead %}
|
||||
<meta name="color-scheme" content="dark light">
|
||||
{# Light/Dark stylesheets added here due to https://github.com/readthedocs/sphinx_rtd_theme/issues/1100 #}
|
||||
<link rel="stylesheet" href="{{ pathto('_static/css/light.css', 1) }}" type="text/css" media="(prefers-color-scheme: light)"/>
|
||||
<link rel="stylesheet" href="{{ pathto('_static/css/dark.css', 1) }}" type="text/css" media="(prefers-color-scheme: dark)"/>
|
||||
{% endblock %}
|
||||
|
|
|
@ -121,7 +121,7 @@ html_theme = "sphinx_rtd_theme"
|
|||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
html_theme_options = {"prev_next_buttons_location": None}
|
||||
html_title = "Zephyr Project Documentation"
|
||||
html_logo = "images/Zephyr-Kite-logo.png"
|
||||
html_logo = "_static/images/logo.svg"
|
||||
html_favicon = "images/zp_favicon.png"
|
||||
html_static_path = [str(ZEPHYR_BASE / "doc" / "_static")]
|
||||
html_last_updated_fmt = "%b %d, %Y"
|
||||
|
@ -209,8 +209,10 @@ linkcheck_anchors = False
|
|||
|
||||
|
||||
def setup(app):
|
||||
app.add_css_file("css/zephyr-custom.css")
|
||||
app.add_js_file("js/zephyr-custom.js")
|
||||
# theme customizations
|
||||
app.add_css_file("css/custom.css")
|
||||
app.add_js_file("js/custom.js")
|
||||
app.add_js_file("js/dark-mode-toggle.min.mjs", type="module")
|
||||
|
||||
app.add_js_file("https://www.googletagmanager.com/gtag/js?id=UA-831873-47")
|
||||
app.add_js_file("js/ga-tracker.js")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue