From 48097818a4e22c9957e66acb9ff795a9bf599356 Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 12 Jan 2023 19:44:59 +0100 Subject: [PATCH] Removed some files. --- .mailmap | 30 - .readthedocs.yml | 27 - Makefile | 199 ------ _extensions/gdscript.py | 371 ---------- _extensions/godot_descriptions.py | 120 ---- _static/css/custom.css | 1050 ----------------------------- _static/js/custom.js | 213 ------ _templates/breadcrumbs.html | 24 - _templates/layout.html | 19 - conf.py | 290 -------- make.bat | 36 - requirements.txt | 16 - robots.txt | 3 - 13 files changed, 2398 deletions(-) delete mode 100644 .mailmap delete mode 100644 .readthedocs.yml delete mode 100644 Makefile delete mode 100644 _extensions/gdscript.py delete mode 100644 _extensions/godot_descriptions.py delete mode 100644 _static/css/custom.css delete mode 100644 _static/js/custom.js delete mode 100644 _templates/breadcrumbs.html delete mode 100644 _templates/layout.html delete mode 100644 conf.py delete mode 100644 make.bat delete mode 100644 requirements.txt delete mode 100644 robots.txt diff --git a/.mailmap b/.mailmap deleted file mode 100644 index 3ad8821..0000000 --- a/.mailmap +++ /dev/null @@ -1,30 +0,0 @@ -Andreas Haas -Andrew Conrad -Andrii Doroshenko -puchik <48544263+puchik@users.noreply.github.com> -Chris Bradfield -clayjohn -clayjohn -corrigentia <20541985+corrigentia@users.noreply.github.com> -Frido -Frido <43795127+mega-bit@users.noreply.github.com> -Hugo Locurcio -Hugo Locurcio -Ignacio Etcheverry -Julian Murgia -Kelly Thomas -Leon Krause -Leon Krause -Max Hilbrunner -Max Hilbrunner -Michael Alexsander -Nathan Lovato -Paul Joannon <437025+paulloz@users.noreply.github.com> -Rémi Verschelde -skyace65 -skyace65 -TwistedTwigleg -Will Nations -Yuri Roubinsky -Yuri Sizov -ZX-WT diff --git a/.readthedocs.yml b/.readthedocs.yml deleted file mode 100644 index 2bb1660..0000000 --- a/.readthedocs.yml +++ /dev/null @@ -1,27 +0,0 @@ -# .readthedocs.yml -# Read the Docs configuration file -# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - -version: 2 - -build: - image: latest - -sphinx: - configuration: conf.py - -# Possible options: htmlzip, pdf, epub -# All disabled for now: -# - single-page htmlzip is too big to be usable, and requires too much memory. -# - pdf generates too many latex warnings and the build is killed once logs -# reach 4 MB. Could likely be improved if someone is motivated. -# - epub is too big, and has tons of validation errors which make most readers -# treat it as invalid (GH-3862). Also, it's ugly. -# Hopefully one day we'll have a multi-page HTML zip option, but until -# then, all offline download options are worthless. -# (Track https://github.com/readthedocs/readthedocs.org/issues/3242) -formats: [] - -python: - install: - - requirements: requirements.txt diff --git a/Makefile b/Makefile deleted file mode 100644 index f1fa052..0000000 --- a/Makefile +++ /dev/null @@ -1,199 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build -LATEXDEPS = latex dvipng - -# User-friendly check for sphinx-build -ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) -endif - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) -t i18n . - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " applehelp to make an Apple Help Book" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - @echo " coverage to run coverage check of the documentation (if enabled)" - @echo " dummy to run only the parse steps without generating output" - -clean: - rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/GodotEngine.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/GodotEngine.qhc" - -applehelp: - $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp - @echo - @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." - @echo "N.B. You won't be able to view it unless you put it in" \ - "~/Library/Documentation/Help or install it in your application" \ - "bundle." - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/GodotEngine" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/GodotEngine" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) ../sphinx/templates - @echo - @echo "Build finished. The message catalogs are in ../sphinx/templates." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -coverage: - $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage - @echo "Testing of coverage in the sources finished, look at the " \ - "results in $(BUILDDIR)/coverage/python.txt." - -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." - -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." - -dummy: - $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. No output." diff --git a/_extensions/gdscript.py b/_extensions/gdscript.py deleted file mode 100644 index 57ae272..0000000 --- a/_extensions/gdscript.py +++ /dev/null @@ -1,371 +0,0 @@ -# -*- coding: utf-8 -*- -""" - pygments.lexers.gdscript - ~~~~~~~~~~~~~~~~~~~~~~ - - Lexer for GDScript. - - :copyright: Copyright 2xxx by The Godot Engine Community - :license: MIT. - - modified by Daniel J. Ramirez based on the original python.py pygment -""" - -import re - -from pygments.lexer import ( - RegexLexer, - include, - bygroups, - default, - words, - combined, -) -from pygments.token import ( - Text, - Comment, - Operator, - Keyword, - Name, - String, - Number, - Punctuation, -) - -__all__ = ["GDScriptLexer"] - -line_re = re.compile(".*?\n") - - -class GDScriptLexer(RegexLexer): - """ - For `GDScript source code `_. - """ - - name = "GDScript" - aliases = ["gdscript", "gd"] - filenames = ["*.gd"] - mimetypes = ["text/x-gdscript", "application/x-gdscript"] - - def innerstring_rules(ttype): - return [ - # the old style '%s' % (...) string formatting - ( - r"%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?" - "[hlL]?[E-GXc-giorsux%]", - String.Interpol, - ), - # backslashes, quotes and formatting signs must be parsed one at a time - (r'[^\\\'"%\n]+', ttype), - (r'[\'"\\]', ttype), - # unhandled string formatting sign - (r"%", ttype), - # newlines are an error (use "nl" state) - ] - - tokens = { - "root": [ - (r"\n", Text), - ( - r'^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")', - bygroups(Text, String.Affix, String.Doc), - ), - ( - r"^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')", - bygroups(Text, String.Affix, String.Doc), - ), - (r"[^\S\n]+", Text), - (r"#.*$", Comment.Single), - (r"[]{}:(),;[]", Punctuation), - (r"\\\n", Text), - (r"\\", Text), - (r"(in|and|or|not)\b", Operator.Word), - ( - r"!=|==|<<|>>|&&|\+=|-=|\*=|/=|%=|&=|\|=|\|\||[-~+/*%=<>&^.!|$]", - Operator, - ), - include("keywords"), - (r"(func)((?:\s|\\\s)+)", bygroups(Keyword, Text), "funcname"), - (r"(class)((?:\s|\\\s)+)", bygroups(Keyword, Text), "classname"), - include("builtins"), - ( - '([rR]|[uUbB][rR]|[rR][uUbB])(""")', - bygroups(String.Affix, String.Double), - "tdqs", - ), - ( - "([rR]|[uUbB][rR]|[rR][uUbB])(''')", - bygroups(String.Affix, String.Single), - "tsqs", - ), - ( - '([rR]|[uUbB][rR]|[rR][uUbB])(")', - bygroups(String.Affix, String.Double), - "dqs", - ), - ( - "([rR]|[uUbB][rR]|[rR][uUbB])(')", - bygroups(String.Affix, String.Single), - "sqs", - ), - ( - '([uUbB]?)(""")', - bygroups(String.Affix, String.Double), - combined("stringescape", "tdqs"), - ), - ( - "([uUbB]?)(''')", - bygroups(String.Affix, String.Single), - combined("stringescape", "tsqs"), - ), - ( - '([uUbB]?)(")', - bygroups(String.Affix, String.Double), - combined("stringescape", "dqs"), - ), - ( - "([uUbB]?)(')", - bygroups(String.Affix, String.Single), - combined("stringescape", "sqs"), - ), - include("name"), - include("numbers"), - ], - "keywords": [ - ( - words( - ( - "and", - "in", - "not", - "or", - "as", - "breakpoint", - "class", - "class_name", - "extends", - "is", - "func", - "setget", - "signal", - "tool", - "const", - "enum", - "export", - "onready", - "static", - "var", - "break", - "continue", - "if", - "elif", - "else", - "for", - "pass", - "return", - "match", - "while", - "remote", - "master", - "puppet", - "remotesync", - "mastersync", - "puppetsync", - ), - suffix=r"\b", - ), - Keyword, - ), - ], - "builtins": [ - ( - words( - ( - "Color8", - "ColorN", - "abs", - "acos", - "asin", - "assert", - "atan", - "atan2", - "bytes2var", - "cartesian2polar", - "ceil", - "char", - "clamp", - "convert", - "cos", - "cosh", - "db2linear", - "decimals", - "dectime", - "deep_equal", - "deg2rad", - "dict2inst", - "ease", - "exp", - "floor", - "fmod", - "fposmod", - "funcref", - "get_stack", - "hash", - "inst2dict", - "instance_from_id", - "inverse_lerp", - "is_equal_approx", - "is_inf", - "is_instance_valid", - "is_nan", - "is_zero_approx", - "len", - "lerp", - "lerp_angle", - "linear2db", - "load", - "log", - "max", - "min", - "move_toward", - "nearest_po2", - "ord", - "parse_json", - "polar2cartesian", - "posmod", - "pow", - "preload", - "print", - "print_debug", - "print_stack", - "printerr", - "printraw", - "prints", - "printt", - "push_error", - "push_warning", - "rad2deg", - "rand_range", - "rand_seed", - "randf", - "randi", - "randomize", - "range", - "range_lerp", - "round", - "seed", - "sign", - "sin", - "sinh", - "smoothstep", - "sqrt", - "step_decimals", - "stepify", - "str", - "str2var", - "tan", - "tanh", - "to_json", - "type_exists", - "typeof", - "validate_json", - "var2bytes", - "var2str", - "weakref", - "wrapf", - "wrapi", - "yield", - ), - prefix=r"(? self.max_length - or self.n_sections > self.n_sections_max - ): - return - - if isinstance(node, addnodes.compact_paragraph) and node.get("toctree"): - raise nodes.SkipChildren - - add = True - - if isinstance(node, nodes.paragraph): - text = node.astext() - - if self.is_class: - # Skip OOP hierarchy info for description - if ( - text.startswith("Inherits:") - or text.startswith("Inherited By:") - or text.strip() == "Example:" - ): - add = False - - # If we're in a class doc and reached the first table, - # stop adding to the description - if text.strip() == "Properties": - self.stop_word_reached = True - add = False - - if add: - self.text_list.append(text) - self.current_length = self.current_length + len(text) - - if add and isinstance(node, nodes.section): - self.n_sections += 1 - - def dispatch_departure(self, node): - pass - - def format_description(self, desc): - # Replace newlines with spaces - desc = re.sub("\r|\n", " ", desc) - - # Replace multiple spaces with single spaces - desc = re.sub("\\s+", " ", desc) - - # Escape double quotes for HTML - desc = re.sub('"', """, desc) - - return desc - - def create_description(self, cutoff_suffix="..."): - text = " ".join(self.text_list) - - text = self.format_description(text) - - # Cut to self.max_length, add cutoff_suffix at end - if len(text) > self.max_length: - text = text[: self.max_length - len(cutoff_suffix)].strip() + cutoff_suffix - - return text - - -def generate_description(app, pagename, templatename, context, doctree): - if not doctree: - return - - generator = DescriptionGenerator(doctree, pagename) - doctree.walkabout(generator) - - description = ( - '\n' - ) - - context["metatags"] += description - - -def setup(app): - # Hook into Sphinx for all pages to - # generate meta description tag and add to meta tag list - app.connect("html-page-context", generate_description) - - return { - "parallel_read_safe": True, - "parallel_write_safe": True, - } diff --git a/_static/css/custom.css b/_static/css/custom.css deleted file mode 100644 index 3dd7718..0000000 --- a/_static/css/custom.css +++ /dev/null @@ -1,1050 +0,0 @@ -/** - * Various tweaks to the Read the Docs theme to better conform with Godot's - * visual identity. Many colors are also overridden to use CSS variables. - * This makes it possible to provide an automatically-used dark theme - * based on browser preferences. - */ - - /* Default (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: #ff7381; - --navbar-scrollbar-color: #d45a66; - --navbar-scrollbar-hover-color: #b14550; - --navbar-scrollbar-active-color: #72383e; - --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"); - - --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: #f5ffe1; - --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; -} - -/* Dark theme colors */ -@media (prefers-color-scheme: dark) { - :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: #ee7381; - --navbar-scrollbar-color: #be5460; - --navbar-scrollbar-hover-color: #963e48; - --navbar-scrollbar-active-color: #5f3034; - --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"); - - --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; - } -} - -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; -} - -/* See for context. */ -.rst-content .align-right, -.rst-content .align-left { - clear: both; -} - -.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; -} - -.rst-content section ul li { - /* Increase spacing between list items. */ - margin-top: 8px; - margin-bottom: 8px; -} - -body, -.rst-content table.docutils thead { - color: var(--body-color); -} - -a { - color: var(--link-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); -} - -.sphinx-tabs-panel { - background-color: var(--code-background-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; -} - -/* 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 */ -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) 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-color: var(--admonition-note-background-color); - border-color: var(--admonition-note-title-background-color); - color: var(--admonition-note-color); -} -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dl dt { - background-color: transparent; - border-color: transparent; - color: var(--footer-color); -} -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).class dt, -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).function dt, -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).method dt, -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).attribute dt { - font-weight: 600; - padding: 0 8px; - margin-bottom: 1px; - width: 100%; -} -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).class > dt, -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).function > dt, -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).method > dt, -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).attribute > dt { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, Courier, monospace; - font-size: 90%; - font-weight: normal; - margin-bottom: 16px; - padding: 6px 8px; -} -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .sig-prename.descclassname { - color: var(--highlight-type2-color); - font-weight: normal; -} -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .sig-name.descname { - color: var(--highlight-function-color); - font-weight: 700; -} -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .sig-paren, -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .optional { - color: var(--highlight-operator-color) !important; - font-weight: normal; - padding: 0 2px; -} -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .optional { - font-style: italic; -} -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .sig-param, -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).class dt > em, -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).function dt > em, -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).method dt > em { - color: var(--code-literal-color); - font-style: normal; - padding: 0 4px; -} -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .k { - font-style: normal; -} -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .sig-param, -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).class dt > .optional ~ em, -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).function dt > .optional ~ em, -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).method dt > .optional ~ em { - color: var(--highlight-number-color); - font-style: italic; -} -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).class dt > em.property { - color: var(--highlight-keyword-color); -} -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dt a.headerlink { - color: var(--link-color) !important; -} -html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dt a.headerlink:visited { - color: var(--link-color-visited); -} -html.writer-html5 .rst-content dl.field-list > dd strong { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, Courier, monospace; -} - -footer, -#search-results .context { - color: var(--footer-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-body-for-nav { - /* Center the page on wide displays for better readability */ - max-width: 1100px; - margin: 0 auto; - } -} - -/* 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; -} - -/* 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: var(--code-border-color); -} - -.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; -} - -/* Code tab display tweaks */ - -.ui.tabular.menu .active.item, -.ui.segment { - background-color: var(--code-background-color); -} - -/* Syntax highlighting */ - -/* Remove default red boxes around Pygments errors */ -.highlight .err { - border: none; -} - -.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; -} - -/* Unset excessive styles for nested kbd tags. */ -kbd.compound > kbd, -kbd.compound > .kbd, -.kbd.compound > kbd, -.kbd.compound > .kbd { - border: none; - box-shadow: none; - padding: 0; -} - -/* 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×200 at 100% scaling. */ - width: 210px; - height: 210px; -} - -.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); -} - -@media only screen and (min-width: 769px) { - .wy-nav-side { - /* Required to center the page on wide displays */ - left: inherit; - } -} - -.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 button.toctree-expand, -.wy-menu-vertical li.toctree-l1 a button.toctree-expand, -.wy-menu-vertical li.toctree-l2 a button.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 button.toctree-expand, -.wy-menu-vertical li.toctree-l1 a:hover button.toctree-expand, -.wy-menu-vertical li.toctree-l2 a:hover button.toctree-expand { - color: var(--navbar-level-2-color); - opacity: 1; -} - -.wy-side-nav-search, .wy-menu-vertical a, .wy-menu-vertical a:active button.toctree-expand, -.wy-menu-vertical li.toctree-l1 a:active button.toctree-expand, -.wy-menu-vertical li.toctree-l2 a:active button.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); -} - -@media only screen and (min-width: 769px) { - .rst-versions { - /* Required to center the page on wide displays */ - left: inherit; - } -} - -.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); -} - -/* 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); -} diff --git a/_static/js/custom.js b/_static/js/custom.js deleted file mode 100644 index f97f684..0000000 --- a/_static/js/custom.js +++ /dev/null @@ -1,213 +0,0 @@ -// 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 = 234; - // 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 = 338; - // 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 = $('
'); - $menu.append($menuPadding); - } - - if (mediaQuery.matches) { - // Entering the "desktop" state. - - // The main scroll event handler. - // Executed as the page is scrolled and once immediatelly 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{v(o.href),t=void 0},l)},n),c&&document.addEventListener("mousedown",function(t){if(performance.now()-e1||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); -}); diff --git a/_templates/breadcrumbs.html b/_templates/breadcrumbs.html deleted file mode 100644 index 0a60a7a..0000000 --- a/_templates/breadcrumbs.html +++ /dev/null @@ -1,24 +0,0 @@ -{%- extends "sphinx_rtd_theme/breadcrumbs.html" %} - -{% block breadcrumbs_aside %} -{% if not meta or meta.get('github_url') != 'hide' %} -{{ super() }} - - - - Learn how to contribute! - -{% endif %} -{% endblock %} diff --git a/_templates/layout.html b/_templates/layout.html deleted file mode 100644 index fdec13a..0000000 --- a/_templates/layout.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "!layout.html" -%} -{% block linktags -%} - - {% if godot_inject_language_links -%} - {% for alternate_lang in godot_docs_supported_languages -%} - {# Convert to ISO 639-1 format, e.g. zh_CN -> zh-cn -#} - {% set alternate_lang_href = alternate_lang.lower().replace("_", "-") -%} - - {% endfor -%} - - - - {% endif -%} - {{ super() }} -{% endblock -%} - -{% block htmltitle -%} -{{ godot_title_prefix }}{{ title|striptags|e }}{{ titlesuffix }} -{% endblock -%} diff --git a/conf.py b/conf.py deleted file mode 100644 index 666b7d3..0000000 --- a/conf.py +++ /dev/null @@ -1,290 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Godot Engine documentation build configuration file - -import sphinx_rtd_theme -import sys -import os - -# -- General configuration ------------------------------------------------ - -needs_sphinx = "1.3" - -# Sphinx extension module names and templates location -sys.path.append(os.path.abspath("_extensions")) -extensions = [ - "sphinx_tabs.tabs", - "notfound.extension", - "sphinxext.opengraph", -] - -# Warning when the Sphinx Tabs extension is used with unknown -# builders (like the dummy builder) - as it doesn't cause errors, -# we can ignore this so we still can treat other warnings as errors. -sphinx_tabs_nowarn = True - -# Custom 4O4 page HTML template. -# https://github.com/readthedocs/sphinx-notfound-page -notfound_context = { - "title": "Page not found", - "body": """ -

Page not found

-

- Sorry, we couldn't find that page. It may have been renamed or removed - in the version of the documentation you're currently browsing. -

-

- If you're currently browsing the - stable version of the documentation, try browsing the - latest version of the documentation. -

-

- Alternatively, use the - Search docs - box on the left or go to the homepage. -

- """, -} - -# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org -on_rtd = os.environ.get("READTHEDOCS", None) == "True" - -# Don't add `/en/latest` prefix during local development. -# This makes it easier to test the custom 404 page by loading `/404.html` -# on a local web server. -if not on_rtd: - notfound_urls_prefix = '' - -# Specify the site name for the Open Graph extension. -ogp_site_name = "Godot Engine documentation" - -if not os.getenv("SPHINX_NO_GDSCRIPT"): - extensions.append("gdscript") - -if not os.getenv("SPHINX_NO_DESCRIPTIONS"): - extensions.append("godot_descriptions") - -templates_path = ["_templates"] - -# You can specify multiple suffix as a list of string: ['.rst', '.md'] -source_suffix = ".rst" -source_encoding = "utf-8-sig" - -# The master toctree document -master_doc = "index" - -# General information about the project -project = "Godot Engine" -copyright = ( - "2014-2022, Juan Linietsky, Ariel Manzur and the Godot community (CC-BY 3.0)" -) -author = "Juan Linietsky, Ariel Manzur and the Godot community" - -# Version info for the project, acts as replacement for |version| and |release| -# The short X.Y version -version = os.getenv("READTHEDOCS_VERSION", "3.5") -# The full version, including alpha/beta/rc tags -release = version - -# Parse Sphinx tags passed from RTD via environment -env_tags = os.getenv("SPHINX_TAGS") -if env_tags is not None: - for tag in env_tags.split(","): - print("Adding Sphinx tag: %s" % tag.strip()) - tags.add(tag.strip()) # noqa: F821 - -# Language / i18n - -supported_languages = { - "en": "Godot Engine (%s) documentation in English", - "de": "Godot Engine (%s) Dokumentation auf Deutsch", - "es": "Documentación de Godot Engine (%s) en español", - "fr": "Documentation de Godot Engine (%s) en français", - "fi": "Godot Engine (%s) dokumentaatio suomeksi", - "it": "Godot Engine (%s) documentazione in italiano", - "ja": "Godot Engine (%s)の日本語のドキュメント", - "ko": "Godot Engine (%s) 문서 (한국어)", - "pl": "Dokumentacja Godot Engine (%s) w języku polskim", - "pt_BR": "Documentação da Godot Engine (%s) em Português Brasileiro", - "ru": "Документация Godot Engine (%s) на русском языке", - "uk": "Документація до Godot Engine (%s) українською мовою", - "zh_CN": "Godot Engine (%s) 简体中文文档", - "zh_TW": "Godot Engine (%s) 正體中文 (台灣) 文件", -} - -language = os.getenv("READTHEDOCS_LANGUAGE", "en") -if not language in supported_languages.keys(): - print("Unknown language: " + language) - print("Supported languages: " + ", ".join(supported_languages.keys())) - print( - "The configured language is either wrong, or it should be added to supported_languages in conf.py. Falling back to 'en'." - ) - language = "en" - -is_i18n = tags.has("i18n") # noqa: F821 - -exclude_patterns = ["_build"] - -# fmt: off -# These imports should *not* be moved to the start of the file, -# they depend on the sys.path.append call registering "_extensions". -# GDScript syntax highlighting -from gdscript import GDScriptLexer -from sphinx.highlighting import lexers - -lexers["gdscript"] = GDScriptLexer() -# fmt: on - -smartquotes = False - -# Pygments (syntax highlighting) style to use -pygments_style = "sphinx" -highlight_language = "gdscript" - -# -- Options for HTML output ---------------------------------------------- - -html_theme = "sphinx_rtd_theme" -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] -if on_rtd: - using_rtd_theme = True - -# Theme options -html_theme_options = { - # if we have a html_logo below, this shows /only/ the logo with no title text - "logo_only": True, - # Collapse navigation (False makes it tree-like) - "collapse_navigation": False, -} - -html_title = supported_languages[language] % version - -# VCS options: https://docs.readthedocs.io/en/latest/vcs.html#github -html_context = { - "display_github": not is_i18n, # Integrate GitHub - "github_user": "godotengine", # Username - "github_repo": "godot-docs", # Repo name - "github_version": "master", # Version - "conf_py_path": "/", # Path in the checkout to the docs root - "godot_inject_language_links": True, - "godot_docs_supported_languages": list(supported_languages.keys()), - "godot_docs_basepath": "https://docs.godotengine.org/", - "godot_docs_suffix": ".html", - "godot_default_lang": "en", - "godot_canonical_version": "stable", - # Distinguish local development website from production website. - # This prevents people from looking for changes on the production website after making local changes :) - "godot_title_prefix": "" if on_rtd else "(DEV) ", -} - -html_logo = "img/docs_logo.png" - -# These folders are copied to the documentation's HTML output -html_static_path = ["_static"] - -html_extra_path = ["robots.txt"] - -# These paths are either relative to html_static_path -# or fully qualified paths (e.g. https://...) -html_css_files = [ - "css/custom.css", -] - -html_js_files = [ - "js/custom.js", -] - -# Output file base name for HTML help builder -htmlhelp_basename = "GodotEnginedoc" - -# -- Options for reStructuredText parser ---------------------------------- - -# Enable directives that insert the contents of external files -file_insertion_enabled = False - -# -- Options for LaTeX output --------------------------------------------- - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - ( - master_doc, - "GodotEngine.tex", - "Godot Engine Documentation", - "Juan Linietsky, Ariel Manzur and the Godot community", - "manual", - ), -] - -# -- Options for linkcheck builder ---------------------------------------- - -# disable checking urls with about.html#this_part_of_page anchors -linkcheck_anchors = False - -linkcheck_timeout = 10 - -# -- I18n settings -------------------------------------------------------- - -# Godot localization is handled via https://github.com/godotengine/godot-docs-l10n -# where the main docs repo is a submodule. Therefore the translated material is -# actually in the parent folder of this conf.py, hence the "../". - -locale_dirs = ["../sphinx/po/"] -gettext_compact = False - -# We want to host the localized images in godot-docs-l10n, but Sphinx does not provide -# the necessary feature to do so. `figure_language_filename` has `{root}` and `{path}`, -# but they resolve to (host) absolute paths, so we can't use them as is to access "../". -# However, Python is glorious and lets us redefine Sphinx's internal method that handles -# `figure_language_filename`, so we do our own post-processing to fix the absolute path -# and point to the parallel folder structure in godot-docs-l10n. -# Note: Sphinx's handling of `figure_language_filename` may change in the future, monitor -# https://github.com/sphinx-doc/sphinx/issues/7768 to see what would be relevant for us. -figure_language_filename = "{root}.{language}{ext}" - -import sphinx -cwd = os.getcwd() - -sphinx_original_get_image_filename_for_language = sphinx.util.i18n.get_image_filename_for_language - -def godot_get_image_filename_for_language(filename, env): - """ - Hack the absolute path returned by Sphinx based on `figure_language_filename` - to insert our `../images` relative path to godot-docs-l10n's images folder, - which mirrors the folder structure of the docs repository. - The returned string should also be absolute so that `os.path.exists` can properly - resolve it when trying to concatenate with the original doc folder. - """ - path = sphinx_original_get_image_filename_for_language(filename, env) - path = os.path.abspath(os.path.join("../images/", os.path.relpath(path, cwd))) - return path - -sphinx.util.i18n.get_image_filename_for_language = godot_get_image_filename_for_language - -# Similar story for the localized class reference, it's out of tree and there doesn't -# seem to be an easy way for us to tweak the toctree to take this into account. -# So we're deleting the existing class reference and adding a symlink instead... -if is_i18n and os.path.exists("../classes/" + language): - import shutil - - if os.path.islink("classes"): # Previously made symlink. - os.unlink("classes") - else: - shutil.rmtree("classes") - - os.symlink("../classes/" + language, "classes") - -# Couldn't find a way to retrieve variables nor do advanced string -# concat from reST, so had to hardcode this in the "epilog" added to -# all pages. This is used in index.rst to display the Weblate badge. -# On English pages, the badge points to the language-neutral engage page. -rst_epilog = """ -.. |weblate_widget| image:: https://hosted.weblate.org/widgets/godot-engine/{image_locale}/godot-docs/287x66-white.png - :alt: Translation status - :target: https://hosted.weblate.org/engage/godot-engine{target_locale}/?utm_source=widget - :width: 287 - :height: 66 -""".format( - image_locale="-" if language == "en" else language, - target_locale="" if language == "en" else "/" + language, -) diff --git a/make.bat b/make.bat deleted file mode 100644 index c1e71af..0000000 --- a/make.bat +++ /dev/null @@ -1,36 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation on Windows - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=. -set BUILDDIR=_build -set SPHINXPROJ=Test - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% - -:end -popd diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 327b14a..0000000 --- a/requirements.txt +++ /dev/null @@ -1,16 +0,0 @@ -# Base dependencies - -# Sync with readthedocs: -# https://github.com/readthedocs/readthedocs.org/blob/master/requirements/pip.txt -# https://github.com/readthedocs/readthedocs.org/blob/master/requirements/docs.txt -sphinx==4.4.0 -sphinx_rtd_theme==1.0.0 - -# Code tabs extension for GDScript/C# -sphinx-tabs==3.3.1 - -# Custom 404 error page (more useful than the default) -sphinx-notfound-page==0.8.3 - -# Adds Open Graph tags in the HTML `` tag -sphinxext-opengraph==0.6.3 diff --git a/robots.txt b/robots.txt deleted file mode 100644 index 06d7055..0000000 --- a/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -user-agent: * - -sitemap: https://docs.godotengine.org/sitemap.xml