Skip to content

Commit 1e0c7d8

Browse files
committed
Add the Sphinx docs source files for first docs version
1 parent 3c98baa commit 1e0c7d8

File tree

254 files changed

+10089
-0
lines changed

Some content is hidden

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

254 files changed

+10089
-0
lines changed

docs/Makefile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
9+
# Path base is the source directory
10+
SOURCEDIR = .
11+
BUILDDIR = ../build
12+
13+
# Put it first so that "make" without argument is like "make help".
14+
help:
15+
@(cd source; $(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O))
16+
17+
.PHONY: help Makefile i18n
18+
19+
# All the code is executed as if everything was launched in one shell.
20+
.ONESHELL:
21+
# Like make clean but also remove files generated by autosummary and
22+
# rendered videos.
23+
cleanall: clean
24+
@rm source/reference/*
25+
@rm -rf source/media
26+
@rm -f rendering_times.csv
27+
i18n:
28+
@(cd source; $(SPHINXBUILD) -M gettext "$(SOURCEDIR)" ../i18n/ -t skip-manim $(SPHINXOPTS) $(O);cd ../i18n;bash stripUntranslatable.sh)
29+
30+
# Catch-all target: route all unknown targets to Sphinx using the new
31+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
32+
%: Makefile
33+
@(cd source; $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O))

docs/make.bat

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0\source
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
11+
REM The paths are taken from the source directory
12+
set SOURCEDIR=.
13+
set BUILDDIR=..\build
14+
15+
if "%1" == "" goto help
16+
17+
%SPHINXBUILD% >NUL 2>NUL
18+
if errorlevel 9009 (
19+
echo.
20+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
21+
echo.installed, then set the SPHINXBUILD environment variable to point
22+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
23+
echo.may add the Sphinx directory to PATH.
24+
echo.
25+
echo.If you don't have Sphinx installed, grab it from
26+
echo.http://sphinx-doc.org/
27+
exit /b 1
28+
)
29+
30+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
31+
goto end
32+
33+
:help
34+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
35+
36+
:end
37+
popd

docs/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
furo
2+
myst-parser
3+
sphinx<5.1
4+
sphinx-copybutton
5+
sphinxext-opengraph

docs/rtd-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sphinxcontrib-programoutput

docs/source/_static/DelphiFMX4Python-sidebar-dark.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/source/_static/DelphiFMX4Python-sidebar.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/source/_static/custom.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
@media (prefers-color-scheme: dark) {
2+
span.nc {
3+
text-decoration: none !important;
4+
}
5+
}
6+
7+
p.rubric{
8+
text-transform: capitalize;
9+
font-size: 1.25rem;
10+
font-weight: bold;
11+
}
12+
13+
.sig-param{
14+
color: var(--color-content-foreground);
15+
}
16+
17+
dl.c .field-list dt, dl.cpp .field-list dt, dl.js .field-list dt, dl.py .field-list dt {
18+
text-transform: capitalize;
19+
font-weight: bold;
20+
font-size: var(--font-size--normal);
21+
}
22+
23+
h4, h5, h6{
24+
text-transform: none;
25+
}
26+
27+
/* yikes-ish attempt at bugfix for navbar on some browsers */
28+
.sidebar-tree a.internal.reference {
29+
display: table-cell;
30+
}

docs/source/_static/favicon.ico

271 KB
Binary file not shown.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
2+
window.addEventListener("load", function () {
3+
const styleElements = []
4+
const colorSchemeQuery = window.matchMedia('(prefers-color-scheme: dark)');
5+
const diagrams = document.querySelectorAll("object.inheritance.graphviz");
6+
7+
for (let diagram of diagrams) {
8+
style = document.createElement('style');
9+
styleElements.push(style);
10+
console.log(diagram);
11+
diagram.contentDocument.firstElementChild.appendChild(style);
12+
}
13+
14+
function setColorScheme(e) {
15+
let colors, additions = "";
16+
if (e.matches) {
17+
// Dark
18+
colors = {
19+
text: "#e07a5f",
20+
box: "#383838",
21+
edge: "#d0d0d0",
22+
background: "#131416"
23+
};
24+
} else {
25+
// Light
26+
colors = {
27+
text: "#e07a5f",
28+
box: "#fff",
29+
edge: "#413c3c",
30+
background: "#ffffff"
31+
};
32+
additions = `
33+
.node polygon {
34+
filter: drop-shadow(0 1px 3px #0002);
35+
}
36+
`
37+
}
38+
for (let style of styleElements) {
39+
style.innerHTML = `
40+
svg {
41+
background-color: ${colors.background};
42+
}
43+
44+
.node text {
45+
fill: ${colors.text};
46+
}
47+
48+
.node polygon {
49+
fill: ${colors.box};
50+
}
51+
52+
.edge polygon {
53+
fill: ${colors.edge};
54+
stroke: ${colors.edge};
55+
}
56+
57+
.edge path {
58+
stroke: ${colors.edge};
59+
}
60+
${additions}
61+
`;
62+
}
63+
}
64+
65+
setColorScheme(colorSchemeQuery);
66+
colorSchemeQuery.addEventListener("change", setColorScheme);
67+
});
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{{ name | escape | underline}}
2+
3+
Qualified name: ``{{ fullname | escape }}``
4+
5+
.. currentmodule:: {{ module }}
6+
7+
.. autoclass:: {{ objname }}
8+
:show-inheritance:
9+
:members:
10+
11+
{% block methods %}
12+
{%- if methods %}
13+
.. rubric:: {{ _('Methods') }}
14+
15+
.. autosummary::
16+
:nosignatures:
17+
{% for item in methods if item != '__init__' and item not in inherited_members %}
18+
~{{ name }}.{{ item }}
19+
{%- endfor %}
20+
{%- endif %}
21+
{%- endblock %}
22+
23+
{% block attributes %}
24+
{%- if attributes %}
25+
.. rubric:: {{ _('Attributes') }}
26+
27+
.. autosummary::
28+
{% for item in attributes %}
29+
~{{ name }}.{{ item }}
30+
{%- endfor %}
31+
{%- endif %}
32+
{% endblock %}

0 commit comments

Comments
 (0)