From b1354d5579239f98db5a388963eda394e14b1d6f Mon Sep 17 00:00:00 2001 From: wulan17 Date: Mon, 2 Jan 2023 16:23:58 +0700 Subject: [PATCH] PyroFork: docs: Add usable by Signed-off-by: wulan17 --- docs/requirements.txt | 1 + docs/source/_includes/usable-by/bots.rst | 5 +++++ docs/source/_includes/usable-by/users-bots.rst | 5 +++++ docs/source/_includes/usable-by/users.rst | 5 +++++ docs/source/_static/css/my.css | 3 +++ docs/source/conf.py | 11 +++++++++-- 6 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 docs/source/_includes/usable-by/bots.rst create mode 100644 docs/source/_includes/usable-by/users-bots.rst create mode 100644 docs/source/_includes/usable-by/users.rst create mode 100644 docs/source/_static/css/my.css diff --git a/docs/requirements.txt b/docs/requirements.txt index 874e5366..73f3e54d 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,7 @@ pyston_lite-autoload sphinx sphinx_rtd_theme==1.0.0 +sphinx-rtd-dark-mode sphinx_copybutton sphinx-autobuild tgcrypto diff --git a/docs/source/_includes/usable-by/bots.rst b/docs/source/_includes/usable-by/bots.rst new file mode 100644 index 00000000..a54a754d --- /dev/null +++ b/docs/source/_includes/usable-by/bots.rst @@ -0,0 +1,5 @@ +.. raw:: html + + Usable by + Users + Bots diff --git a/docs/source/_includes/usable-by/users-bots.rst b/docs/source/_includes/usable-by/users-bots.rst new file mode 100644 index 00000000..50b87907 --- /dev/null +++ b/docs/source/_includes/usable-by/users-bots.rst @@ -0,0 +1,5 @@ +.. raw:: html + + Usable by + Users + Bots diff --git a/docs/source/_includes/usable-by/users.rst b/docs/source/_includes/usable-by/users.rst new file mode 100644 index 00000000..5b09bd54 --- /dev/null +++ b/docs/source/_includes/usable-by/users.rst @@ -0,0 +1,5 @@ +.. raw:: html + + Usable by + Users + Bots diff --git a/docs/source/_static/css/my.css b/docs/source/_static/css/my.css new file mode 100644 index 00000000..f82f885e --- /dev/null +++ b/docs/source/_static/css/my.css @@ -0,0 +1,3 @@ +.pre{ + color: #bfbfbf; +} \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 0f2b0086..3dcd9cdb 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -39,7 +39,8 @@ extensions = [ "sphinx.ext.napoleon", "sphinx.ext.autosummary", "sphinx.ext.intersphinx", - "sphinx_copybutton" + "sphinx_copybutton", + "sphinx_rtd_dark_mode" ] intersphinx_mapping = { @@ -64,7 +65,7 @@ suppress_warnings = ["image.not_readable"] html_title = "PyroFork Documentation" html_theme = "sphinx_rtd_theme" -html_static_path = ["../resources/static"] +html_static_path = ["../resources/static","_static"] html_show_sourcelink = True html_show_copyright = False html_theme_options = { @@ -90,3 +91,9 @@ latex_elements = { \setmonofont{Ubuntu Mono} """ } + +html_css_files = [ + "css/my.css", + "https://docs.pyrogram.org/_static/css/custom.css", + "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css", +] \ No newline at end of file