Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/docs structure auri change theme #6238

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/reference/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ myst_parser = ">=2.0.0"
sphinx-design = ">=0.5.0"
sphinx-tabs = ">=3.4.5"
sphinx-markdown-tables = ">=0.0.15"
furo = ">=2022.12.7"
sphinx_book_theme = ">=1.1.3"
sphinxcontrib-jquery = ">=4.1"

[requires]
Expand Down
74 changes: 49 additions & 25 deletions docs/reference/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
html_title = f'Slint {version} Reference' # Set title here, otherwise it will say "Slint Reference documentation"
copyright = "SixtyFPS GmbH"
author = "Slint Developers <[email protected]>"
github_url = "https://github.com/slint-ui/slint"

# -- General configuration ---------------------------------------------------

Expand Down Expand Up @@ -56,41 +57,64 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "furo"

html_theme = "sphinx_book_theme"
html_favicon = "https://slint.dev/favicon.svg"
html_theme_options = {
"collapse_navigation": False,
"footer_icons": [
{
"name": "Slint",
"url": "https://slint.dev",
"html": """
<img src="https://slint.dev/logo/slint-logo-small-light.svg">
""",
"class": "",
},
{
"name": "GitHub",
"url": "https://github.com/slint-ui/slint",
"html": """
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path>
</svg>
""",
"class": "",
},
],
"repository_url": "https://github.com/slint-ui/slint",
"use_repository_button": True,
"use_issues_button": True,
"use_edit_page_button": True,
"use_download_button": False,
"use_fullscreen_button": False,
"home_page_in_toc": True,
"logo": {
"text": f'Slint {version} Reference',
"image_light": "https://slint.dev/logo/slint-logo-small-light.svg",
"image_dark": "https://slint.dev/logo/slint-logo-small-dark.svg",
"link": "https://slint.dev"
},
"switcher": {
"json_url": "https://releases.slint.dev/versions.json",
"version_match": version,
},
"extra_footer": "<div><a href=\"https://slint.dev\">https://slint.dev</a></div>",
}

html_sidebars = {
"**": ["version-switcher", "navbar-logo.html", "search-button-field.html", "sbt-sidebar-nav.html"]
}

# html_theme_options = {
# "collapse_navigation": False,
# "footer_icons": [
# {
# "name": "Slint",
# "url": "https://slint.dev",
# "html": """
# <img src="https://slint.dev/logo/slint-logo-small-light.svg">
# """,
# "class": "",
# },
# {
# "name": "GitHub",
# "url": "https://github.com/slint-ui/slint",
# "html": """
# <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16">
# <path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path>
# </svg>
# """,
# "class": "",
# },
# ],
# }

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_js_files = ['expand_tabs.js']
html_show_sourcelink = False

html_logo = "https://slint.dev/logo/slint-logo-small-light.svg"

myst_enable_extensions = [
"html_image", "colon_fence"
]
Expand Down
15 changes: 11 additions & 4 deletions docs/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@
.. toctree::
:hidden:
:maxdepth: 2
:caption: Introduction
:caption: Reference

src/reference/syntax/index.rst

.. toctree::
:hidden:
:maxdepth: 2
:caption: Introduction (Old)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you meant to merge this to master.
Should this go in the feature branch?


src/introduction/index.rst
src/introduction/supported_platforms.md
Expand All @@ -16,7 +23,7 @@
.. toctree::
:hidden:
:maxdepth: 2
:caption: Language Reference
:caption: Language Reference (Old)

src/language/index.rst
src/language/concepts/index.rst
Expand All @@ -27,14 +34,14 @@
.. toctree::
:hidden:
:maxdepth: 2
:caption: Recipes & Examples
:caption: Recipes & Examples (Old)

src/recipes/recipes.md

.. toctree::
:hidden:
:maxdepth: 2
:caption: Advanced Topics
:caption: Advanced Topics (Old)

src/advanced/debugging_techniques.md
src/advanced/style.md
Expand Down
4 changes: 1 addition & 3 deletions docs/reference/src/language/syntax/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ Syntax
.. toctree::
:hidden:
:maxdepth: 2
:caption: Reference
:caption: Reference (Old)

comments.md
identifiers.md
types.md
properties.md
expressions.md
Expand Down
13 changes: 13 additions & 0 deletions docs/reference/src/reference/syntax/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. Copyright © SixtyFPS GmbH <[email protected]>
.. SPDX-License-Identifier: MIT

Syntax
======

.. toctree::
:hidden:
:maxdepth: 2
:caption: Syntax

comments.md
identifiers.md
Loading