Skip to content

Commit 3a49c72

Browse files
Deployed 20cfe44 to v0.17-dev with MkDocs 1.6.1 and mike 2.1.3
1 parent 148610b commit 3a49c72

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+50996
-1
lines changed

v0.17-dev/404.html

Lines changed: 790 additions & 0 deletions
Large diffs are not rendered by default.

v0.17-dev/CONTRIBUTING/index.html

Lines changed: 1149 additions & 0 deletions
Large diffs are not rendered by default.

v0.17-dev/SUMMARY/index.html

Lines changed: 815 additions & 0 deletions
Large diffs are not rendered by default.

v0.17-dev/_css/mkdocstrings.css

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/* Recommended style from:
2+
* https://mkdocstrings.github.io/python/customization/#recommended-style-material
3+
* With some additions from:
4+
* https://github.com/mkdocstrings/mkdocstrings/blob/master/docs/css/mkdocstrings.css
5+
*/
6+
7+
/* Indentation. */
8+
div.doc-contents:not(.first) {
9+
padding-left: 25px;
10+
border-left: .05rem solid var(--md-typeset-table-color);
11+
}
12+
13+
/* Indentation. */
14+
div.doc-contents:not(.first) {
15+
padding-left: 25px;
16+
border-left: 4px solid rgba(230, 230, 230);
17+
margin-bottom: 80px;
18+
}
19+
20+
/* Avoid breaking parameters name, etc. in table cells. */
21+
td code {
22+
word-break: normal !important;
23+
}
24+
25+
/* Mark external links as such. */
26+
a.autorefs-external::after {
27+
/* https://primer.style/octicons/arrow-up-right-24 */
28+
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="rgb(0, 0, 0)" d="M18.25 15.5a.75.75 0 00.75-.75v-9a.75.75 0 00-.75-.75h-9a.75.75 0 000 1.5h7.19L6.22 16.72a.75.75 0 101.06 1.06L17.5 7.56v7.19c0 .414.336.75.75.75z"></path></svg>');
29+
content: ' ';
30+
31+
display: inline-block;
32+
position: relative;
33+
top: 0.1em;
34+
margin-left: 0.2em;
35+
margin-right: 0.1em;
36+
37+
height: 1em;
38+
width: 1em;
39+
border-radius: 100%;
40+
background-color: var(--md-typeset-a-color);
41+
}
42+
a.autorefs-external:hover::after {
43+
background-color: var(--md-accent-fg-color);
44+
}

v0.17-dev/_css/style.css

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/* Based on:
2+
* https://github.com/mkdocstrings/mkdocstrings/blob/master/docs/css/style.css
3+
*/
4+
5+
/* Increase logo size */
6+
.md-header__button.md-logo {
7+
padding-bottom: 0.2rem;
8+
padding-right: 0;
9+
}
10+
.md-header__button.md-logo img {
11+
height: 1.5rem;
12+
}
13+
14+
/* Mark external links as such (also in nav) */
15+
a.external:hover::after, a.md-nav__link[href^="https:"]:hover::after {
16+
/* https://primer.style/octicons/link-external-16 */
17+
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="rgb(233, 235, 252)" d="M10.604 1h4.146a.25.25 0 01.25.25v4.146a.25.25 0 01-.427.177L13.03 4.03 9.28 7.78a.75.75 0 01-1.06-1.06l3.75-3.75-1.543-1.543A.25.25 0 0110.604 1zM3.75 2A1.75 1.75 0 002 3.75v8.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 12.25v-3.5a.75.75 0 00-1.5 0v3.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-8.5a.25.25 0 01.25-.25h3.5a.75.75 0 000-1.5h-3.5z"></path></svg>');
18+
height: 0.8em;
19+
width: 0.8em;
20+
margin-left: 0.2em;
21+
content: ' ';
22+
display: inline-block;
23+
}
24+
25+
/* More space at the bottom of the page */
26+
.md-main__inner {
27+
margin-bottom: 1.5rem;
28+
}
29+
30+
/* Code annotations with numbers.
31+
*
32+
* Normally annotations are shown with a (+) button that expands the
33+
* annotation. To be able to explain code step by step, it is good to have
34+
* annotations with numbers, to be able to follow the notes in a particular
35+
* order.
36+
*
37+
* To do this, we need some custom CSS rules. Before this customization was
38+
* officially supported and documented, but now they are not officially
39+
* supported anymore, so it could eventually break (it already did once).
40+
*
41+
* If that happens we either need to look into how to fix the CSS ourselves or
42+
* remove the feature. To do the customization, this is what we should be able
43+
* to count on:
44+
*
45+
* "you can be sure that the data-md-annotation-id attribute will always be
46+
* present in the source, which means you can always number them in any way you
47+
* like."
48+
*
49+
* Code annotation are described here:
50+
* https://squidfunk.github.io/mkdocs-material/reference/code-blocks/#code-annotations
51+
*
52+
* Here are the original docs on how to enable numbered annotations:
53+
* https://web.archive.org/web/20230724161216/https://squidfunk.github.io/mkdocs-material/reference/code-blocks/#annotations-with-numbers
54+
*
55+
* This is the PR fixing the numbered annotations when they broke:
56+
* https://github.com/frequenz-floss/frequenz-sdk-python/pull/684
57+
*
58+
* And this is the reported regression when it was decided to drop support for
59+
* numbered annotations officially:
60+
* https://github.com/squidfunk/mkdocs-material/issues/6042
61+
*/
62+
.md-typeset .md-annotation__index > ::before {
63+
content: attr(data-md-annotation-id);
64+
}
65+
.md-typeset :focus-within > .md-annotation__index > ::before {
66+
transform: none;
67+
}
68+
.md-typeset .md-annotation__index {
69+
width: 4ch;
70+
}

v0.17-dev/_img/logo.png

55.9 KB
Loading

v0.17-dev/_overrides/main.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% extends "base.html" %}
2+
3+
{% block outdated %}
4+
You're not viewing the latest (stable) version.
5+
<a href="{{ '../' ~ base_url }}">
6+
<strong>Click here to go to latest (stable) version</strong>
7+
</a>
8+
{% endblock %}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# License: MIT
2+
# Copyright © 2024 Frequenz Energy-as-a-Service GmbH
3+
4+
"""Generate the code reference pages."""
5+
6+
from frequenz.repo.config.mkdocs import api_pages
7+
8+
api_pages.generate_python_api_pages("src", "reference")

v0.17-dev/assets/_mkdocstrings.css

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
2+
/* Avoid breaking parameter names, etc. in table cells. */
3+
.doc-contents td code {
4+
word-break: normal !important;
5+
}
6+
7+
/* No line break before first paragraph of descriptions. */
8+
.doc-md-description,
9+
.doc-md-description>p:first-child {
10+
display: inline;
11+
}
12+
13+
/* No text transformation from Material for MkDocs for H5 headings. */
14+
.md-typeset h5 .doc-object-name {
15+
text-transform: none;
16+
}
17+
18+
/* Max width for docstring sections tables. */
19+
.doc .md-typeset__table,
20+
.doc .md-typeset__table table {
21+
display: table !important;
22+
width: 100%;
23+
}
24+
25+
.doc .md-typeset__table tr {
26+
display: table-row;
27+
}
28+
29+
/* Defaults in Spacy table style. */
30+
.doc-param-default {
31+
float: right;
32+
}
33+
34+
/* Parameter headings must be inline, not blocks. */
35+
.doc-heading-parameter {
36+
display: inline;
37+
}
38+
39+
/* Default font size for parameter headings. */
40+
.md-typeset .doc-heading-parameter {
41+
font-size: inherit;
42+
}
43+
44+
/* Prefer space on the right, not the left of parameter permalinks. */
45+
.doc-heading-parameter .headerlink {
46+
margin-left: 0 !important;
47+
margin-right: 0.2rem;
48+
}
49+
50+
/* Backward-compatibility: docstring section titles in bold. */
51+
.doc-section-title {
52+
font-weight: bold;
53+
}
54+
55+
/* Backlinks crumb separator. */
56+
.doc-backlink-crumb {
57+
display: inline-flex;
58+
gap: .2rem;
59+
white-space: nowrap;
60+
align-items: center;
61+
vertical-align: middle;
62+
}
63+
.doc-backlink-crumb:not(:first-child)::before {
64+
background-color: var(--md-default-fg-color--lighter);
65+
content: "";
66+
display: inline;
67+
height: 1rem;
68+
--md-path-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6z"/></svg>');
69+
-webkit-mask-image: var(--md-path-icon);
70+
mask-image: var(--md-path-icon);
71+
width: 1rem;
72+
}
73+
.doc-backlink-crumb.last {
74+
font-weight: bold;
75+
}
76+
77+
/* Symbols in Navigation and ToC. */
78+
:root, :host,
79+
[data-md-color-scheme="default"] {
80+
--doc-symbol-parameter-fg-color: #df50af;
81+
--doc-symbol-attribute-fg-color: #953800;
82+
--doc-symbol-function-fg-color: #8250df;
83+
--doc-symbol-method-fg-color: #8250df;
84+
--doc-symbol-class-fg-color: #0550ae;
85+
--doc-symbol-module-fg-color: #5cad0f;
86+
87+
--doc-symbol-parameter-bg-color: #df50af1a;
88+
--doc-symbol-attribute-bg-color: #9538001a;
89+
--doc-symbol-function-bg-color: #8250df1a;
90+
--doc-symbol-method-bg-color: #8250df1a;
91+
--doc-symbol-class-bg-color: #0550ae1a;
92+
--doc-symbol-module-bg-color: #5cad0f1a;
93+
}
94+
95+
[data-md-color-scheme="slate"] {
96+
--doc-symbol-parameter-fg-color: #ffa8cc;
97+
--doc-symbol-attribute-fg-color: #ffa657;
98+
--doc-symbol-function-fg-color: #d2a8ff;
99+
--doc-symbol-method-fg-color: #d2a8ff;
100+
--doc-symbol-class-fg-color: #79c0ff;
101+
--doc-symbol-module-fg-color: #baff79;
102+
103+
--doc-symbol-parameter-bg-color: #ffa8cc1a;
104+
--doc-symbol-attribute-bg-color: #ffa6571a;
105+
--doc-symbol-function-bg-color: #d2a8ff1a;
106+
--doc-symbol-method-bg-color: #d2a8ff1a;
107+
--doc-symbol-class-bg-color: #79c0ff1a;
108+
--doc-symbol-module-bg-color: #baff791a;
109+
}
110+
111+
code.doc-symbol {
112+
border-radius: .1rem;
113+
font-size: .85em;
114+
padding: 0 .3em;
115+
font-weight: bold;
116+
}
117+
118+
code.doc-symbol-parameter,
119+
a code.doc-symbol-parameter {
120+
color: var(--doc-symbol-parameter-fg-color);
121+
background-color: var(--doc-symbol-parameter-bg-color);
122+
}
123+
124+
code.doc-symbol-parameter::after {
125+
content: "param";
126+
}
127+
128+
code.doc-symbol-attribute,
129+
a code.doc-symbol-attribute {
130+
color: var(--doc-symbol-attribute-fg-color);
131+
background-color: var(--doc-symbol-attribute-bg-color);
132+
}
133+
134+
code.doc-symbol-attribute::after {
135+
content: "attr";
136+
}
137+
138+
code.doc-symbol-function,
139+
a code.doc-symbol-function {
140+
color: var(--doc-symbol-function-fg-color);
141+
background-color: var(--doc-symbol-function-bg-color);
142+
}
143+
144+
code.doc-symbol-function::after {
145+
content: "func";
146+
}
147+
148+
code.doc-symbol-method,
149+
a code.doc-symbol-method {
150+
color: var(--doc-symbol-method-fg-color);
151+
background-color: var(--doc-symbol-method-bg-color);
152+
}
153+
154+
code.doc-symbol-method::after {
155+
content: "meth";
156+
}
157+
158+
code.doc-symbol-class,
159+
a code.doc-symbol-class {
160+
color: var(--doc-symbol-class-fg-color);
161+
background-color: var(--doc-symbol-class-bg-color);
162+
}
163+
164+
code.doc-symbol-class::after {
165+
content: "class";
166+
}
167+
168+
code.doc-symbol-module,
169+
a code.doc-symbol-module {
170+
color: var(--doc-symbol-module-fg-color);
171+
background-color: var(--doc-symbol-module-bg-color);
172+
}
173+
174+
code.doc-symbol-module::after {
175+
content: "mod";
176+
}
177+
178+
.doc-signature .autorefs {
179+
color: inherit;
180+
border-bottom: 1px dotted currentcolor;
181+
}
1.83 KB
Loading

0 commit comments

Comments
 (0)