diff --git a/docs/source/_static/zndraw-dark.svg b/docs/source/_static/zndraw-dark.svg new file mode 100644 index 00000000..3a089808 --- /dev/null +++ b/docs/source/_static/zndraw-dark.svg @@ -0,0 +1,8 @@ + + + + + + + + D awZn \ No newline at end of file diff --git a/docs/source/_static/zndraw-light.svg b/docs/source/_static/zndraw-light.svg new file mode 100644 index 00000000..e9e80ade --- /dev/null +++ b/docs/source/_static/zndraw-light.svg @@ -0,0 +1,8 @@ + + + + + + + + D awZn \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 6b868e98..d7b0d544 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -18,6 +18,7 @@ extensions = [ "nbsphinx", + "sphinx_copybutton", ] templates_path = ["_templates"] @@ -29,3 +30,25 @@ html_theme = "furo" html_static_path = ["_static"] + +html_theme_options: dict = { + "light_logo": "zndraw-light.svg", + "dark_logo": "zndraw-dark.svg", + "footer_icons": [ + { + "name": "GitHub", + "url": "https://github.com/zincware/zndraw", + "html": "", + "class": "fa-brands fa-github fa-2x", + }, + ], + "source_repository": "https://github.com/zincware/zndraw", + "source_branch": "main", + "source_directory": "docs/source/", + "navigation_with_keys": True, +} + +# font-awesome logos +html_css_files = [ + "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/brands.min.css", +] diff --git a/poetry.lock b/poetry.lock index 3c5b9463..c4cb7be1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -4883,6 +4883,24 @@ sphinx = ">=4.0" [package.extras] docs = ["furo", "ipython", "myst-parser", "sphinx-copybutton", "sphinx-inline-tabs"] +[[package]] +name = "sphinx-copybutton" +version = "0.5.2" +description = "Add a copy button to each of your code cells." +optional = false +python-versions = ">=3.7" +files = [ + {file = "sphinx-copybutton-0.5.2.tar.gz", hash = "sha256:4cf17c82fb9646d1bc9ca92ac280813a3b605d8c421225fd9913154103ee1fbd"}, + {file = "sphinx_copybutton-0.5.2-py3-none-any.whl", hash = "sha256:fb543fd386d917746c9a2c50360c7905b605726b9355cd26e9974857afeae06e"}, +] + +[package.dependencies] +sphinx = ">=1.8" + +[package.extras] +code-style = ["pre-commit (==2.12.1)"] +rtd = ["ipython", "myst-nb", "sphinx", "sphinx-book-theme", "sphinx-examples"] + [[package]] name = "sphinxcontrib-applehelp" version = "2.0.0" @@ -5675,4 +5693,4 @@ znjson = ">=0.2,<0.3" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "d307c655a667b2c41999a4a5d53d841b66510a710245cf87ab55112dbd147ee2" +content-hash = "452c8a8d15b7f203700280b3e49981d8920df19ba76ab622e6d7719b3fbbfc35" diff --git a/pyproject.toml b/pyproject.toml index 60d45156..f50935d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,7 @@ znh5md = {version = "^0.3"} sphinx = "^8.1.3" furo = "^2024.8.6" nbsphinx = "^0.9.5" +sphinx-copybutton = "^0.5.2" [build-system] requires = ["poetry-core"]