diff --git a/docs/conf.py b/docs/conf.py index e0f7969..71bad71 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,7 +20,7 @@ ] exclude_patterns: list[str] = [] -templates_path: list[str] = [] +templates_path = ["source/_static/_templates/furo"] intersphinx_mapping = { "python": ("https://docs.python.org/3", None), @@ -40,6 +40,20 @@ "source_branch": "main", "source_directory": "docs/source/", } +html_sidebars = { + "**": [ + "sidebar/brand.html", + "sidebar/search.html", + "sidebar/scroll-start.html", + "sidebar/navigation.html", + "sidebar/ethical-ads.html", + "sidebar/scroll-end.html", + "side-github.html", + "sidebar/variant-selector.html", + ] +} +html_context = {"repository": "useblocks/sphinx-mounts"} +html_css_files = ["furo.css"] # Named hyperlink targets for sibling useblocks projects. Defined once # here (appended to every RST source via ``rst_epilog``) so the URLs are diff --git a/docs/source/_static/_templates/furo/side-github.html b/docs/source/_static/_templates/furo/side-github.html new file mode 100644 index 0000000..abdbca7 --- /dev/null +++ b/docs/source/_static/_templates/furo/side-github.html @@ -0,0 +1,37 @@ + + + + + + {{ repository }} + + + + + {{ version }} + + + diff --git a/docs/source/_static/furo.css b/docs/source/_static/furo.css new file mode 100644 index 0000000..c18b92d --- /dev/null +++ b/docs/source/_static/furo.css @@ -0,0 +1,45 @@ +/* Source-repo link in the left sidebar (rendered by side-github.html). */ +.gh-source { + display: flex; + align-items: center; + gap: .5em; + padding-left: var(--sidebar-item-spacing-horizontal); + padding-right: var(--sidebar-item-spacing-horizontal); + padding-top: .6em; + padding-bottom: .6em; + text-decoration: none; + border-top: 1px solid var(--color-background-border); + border-bottom: 1px solid var(--color-background-border); +} + +.gh-source--icon { + height: 1.5em; + color: var(--color-foreground-primary); +} + +.gh-source:hover .gh-source--info * { + color: var(--color-foreground-primary); +} + +.gh-source--info { + display: inline-flex; + flex-direction: column; + gap: .1em; +} + +.gh-source--version { + display: inline-flex; + align-items: center; + gap: .2em; +} + +.gh-source--version-icon { + height: .8em; +} + +.gh-source--version-icon, +.gh-source--version-text, +.gh-source--repo-text { + font-size: .8em; + color: var(--color-foreground-muted); +}