diff --git a/docs/source/_static/css/custom.css b/docs/source/_static/css/custom.css index d59fb34d8..080c06157 100644 --- a/docs/source/_static/css/custom.css +++ b/docs/source/_static/css/custom.css @@ -1 +1,15 @@ -@import url("https://docs.pyrogram.org/_static/css/custom.css"); +body{ + --color-green: darkgreen; + --color-red: darkred; +} + +.usable-by { + border: 1px ; + border-radius: .2em; + padding: 2px 5px; + background-color: #1a1c1e; +} + +a { + text-decoration: none; +} diff --git a/docs/source/_static/css/my.css b/docs/source/_static/css/my.css deleted file mode 100644 index 1a1e1c354..000000000 --- a/docs/source/_static/css/my.css +++ /dev/null @@ -1,3 +0,0 @@ -.pre{ - color: #bfbfbf; -} diff --git a/docs/source/conf.py b/docs/source/conf.py index 0f4ae4cdf..fc72b744d 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -40,7 +40,7 @@ "sphinx.ext.autosummary", "sphinx.ext.intersphinx", "sphinx_copybutton", - "sphinx_rtd_dark_mode" + "sphinx_immaterial" ] intersphinx_mapping = { @@ -64,17 +64,37 @@ suppress_warnings = ["image.not_readable"] html_title = "Pyrofork Documentation" -html_theme = "sphinx_rtd_theme" +html_theme = "sphinx_immaterial" html_static_path = ["../resources/static","_static"] html_show_sourcelink = True html_show_copyright = False html_theme_options = { - "canonical_url": "https://pyrofork.mayuri.my.id/", - "collapse_navigation": True, - "sticky_navigation": False, - "logo_only": True, - "display_version": False, - "style_external_links": True + "icon": { + "repo": "fontawesome/brands/github", + "edit": "material/file-edit-outline", + }, + "site_url": "https://pyrofork.mayuri.my.id/", + "repo_url": "https://github.com/Mayuri-Chan/pyrofork/", + "repo_name": "pyrofork", + "globaltoc_collapse": True, + "features": [ + "navigation.expand", + "navigation.tabs", + "navigation.sections", + "navigation.top", + "search.share", + "toc.follow", + "toc.sticky", + "content.tabs.link", + "announce.dismiss", + ], + "palette": [ + { + "media": "(prefers-color-scheme: dark)", + "scheme": "slate" + } + ], + "toc_title_is_page_title": True } html_logo = "../resources/static/img/pyrogram.png" @@ -93,7 +113,6 @@ } html_css_files = [ - "css/my.css", "css/custom.css", "css/all.min.css", ] diff --git a/pyproject.toml b/pyproject.toml index 0d464cb21..48cfbe4c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,8 +59,7 @@ dev = [ docs = [ "sphinx", - "sphinx_rtd_theme==2.0.0", - "sphinx-rtd-dark-mode", + "sphinx-immaterial==0.11.9", "sphinx_copybutton", "sphinx-autobuild", "tornado>=6.3.3"