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 all 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
4 changes: 3 additions & 1 deletion docs/reference/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ 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"
sphinx-copybutton = ">=0.5.2"
linkify-it-py = ">=2.0.3"

[requires]
python_version = "3"
33 changes: 22 additions & 11 deletions docs/reference/_static/theme_tweak.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
.wy-table-responsive table td,
.wy-table-responsive table th {
white-space: normal;
html[data-theme="light"] {
body {
background-color:#fff;
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
color: #151D21;
}
}

.wy-table-responsive {
margin-bottom: 24px;
max-width: 100%;
overflow: visible;
html[data-theme="dark"] {
body {
background-color: #151D21;
background-image: url(https://slint.dev/assets/img/bg-dark.svg);
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
color: #fff;
}
--pst-color-background: transparent;
--pst-color-on-background: transparent;
}

img.logo {
max-height: 70px;
border-radius: 12% !important;
}
div.sidebar-primary-item:first-child {
text-align: center;
}
81 changes: 54 additions & 27 deletions docs/reference/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@
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 ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ["myst_parser", "sphinx_markdown_tables", "sphinx.ext.autosectionlabel", "sphinxcontrib.jquery", "sphinx_tabs.tabs", "sphinx_design"]
extensions = ["myst_parser", "sphinx_markdown_tables", "sphinx.ext.autosectionlabel", "sphinxcontrib.jquery", "sphinx_tabs.tabs", "sphinx_design", "sphinx_copybutton"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand All @@ -56,43 +57,69 @@
# 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_css_files = [
'css/theme_tweak.css',
]
html_show_sourcelink = False

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

myst_enable_extensions = [
"html_image", "colon_fence"
"html_image", "colon_fence", "linkify"
]

myst_url_schemes = {
Expand Down
44 changes: 38 additions & 6 deletions docs/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,48 @@
.. toctree::
:hidden:
:maxdepth: 2
:caption: Introduction

SlintPad <https://slintpad.com>
Showcase <https://madewithslint.com>
Blog <https://blog.slint.dev>
Video Tutorials <https://www.youtube.com/@Slint-UI/playlists>

.. toctree::
:hidden:
:maxdepth: 2
:caption: Setting Up

src/introduction/index.rst
src/introduction/supported_platforms.md
src/quickstart/index.rst
src/introduction/embedded.rst
src/introduction/desktop.rst
src/introduction/mobile.rst

.. toctree::
:hidden:
:maxdepth: 2
:caption: First Steps

src/quickstart/getting_started.rst
src/quickstart/memory_tile.md
src/quickstart/polishing_the_tile.md
src/quickstart/from_one_to_multiple_tiles.md
src/quickstart/creating_the_tiles.md
src/quickstart/game_logic.md
src/quickstart/running_in_a_browser.md
src/quickstart/ideas_for_the_reader.md
src/quickstart/conclusion.md

.. toctree::
:hidden:
:maxdepth: 2
:caption: Reference

src/reference/syntax/index.rst

.. toctree::
:hidden:
:maxdepth: 2
:caption: Language Reference
:caption: Language Reference (Old)

src/language/index.rst
src/language/concepts/index.rst
Expand All @@ -27,14 +59,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
52 changes: 52 additions & 0 deletions docs/reference/src/introduction/desktop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!-- Copyright © SixtyFPS GmbH <[email protected]> ; SPDX-License-Identifier: MIT -->

# Build Desktop Applications

Slint runs on many desktop and embedded platforms and micro-controllers.

The platform descriptions below cover what has been tested for deployment. For the development environment,
we recommend using a recent desktop operating system and compiler version.

Contact [SixtyFPS GmbH](https://slint.dev/contact) if you need to support specific or older versions.

## Desktop Platforms

Generally, Slint runs on Windows, macOS, and popular Linux distributions. The following tables
cover versions that we specifically test. The general objective is to support the operating systems that
are supported by their vendors at the time of a Slint version release.

### Windows

| Operating System | Architecture |
| ---------------- | ------------ |
| Windows 10 | x86-64 |
| Windows 11 | x86-64 |

### macOS

| Operating System | Architecture |
| ----------------- | --------------- |
| macOS 12 Monterey | x86-64, aarch64 |
| macOS 13 Ventura | x86-64, aarch64 |
| macOS 14 Sonoma | x86-64, aarch64 |

### Linux

Linux desktop distribution present a diverse landscape, and Slint should run on any of them, provided that they
are using Wayland or X-Windows, glibc, and d-bus. If a Linux distribution provides Long Term Support (LTS),
Slint should run on the most recent LTS or newer, at the time of a Slint version release.

## Embedded Platforms

Slint runs on a variety of embedded platforms. Generally speaking, Slint requires a modern Linux userspace
with working OpenGL ES 2.0 (or newer) or Vulkan drivers. We've had success running Slint on

- Yocto based distributions. For C++ applications see [meta-slint](https://github.com/slint-ui/meta-slint) for recipes. Rust application work out of the box with Yocto's rust support.
- BuildRoot based distributions.
- [TorizonCore](https://www.torizon.io/torizoncore-os).

### Microcontrollers

Slint's platform abstraction allows for integration into any Rust or C++ based Microcontroller development
environment. Developers need to implement functionality to feed input events such as touch or keyboard, as
well as displaying the pixels rendered by Slint into a frame- or linebuffer.
52 changes: 52 additions & 0 deletions docs/reference/src/introduction/embedded.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!-- Copyright © SixtyFPS GmbH <[email protected]> ; SPDX-License-Identifier: MIT -->

# Build Embedded Applications

Slint runs on many desktop and embedded platforms and micro-controllers.

The platform descriptions below cover what has been tested for deployment. For the development environment,
we recommend using a recent desktop operating system and compiler version.

Contact [SixtyFPS GmbH](https://slint.dev/contact) if you need to support specific or older versions.

## Desktop Platforms

Generally, Slint runs on Windows, macOS, and popular Linux distributions. The following tables
cover versions that we specifically test. The general objective is to support the operating systems that
are supported by their vendors at the time of a Slint version release.

### Windows

| Operating System | Architecture |
| ---------------- | ------------ |
| Windows 10 | x86-64 |
| Windows 11 | x86-64 |

### macOS

| Operating System | Architecture |
| ----------------- | --------------- |
| macOS 12 Monterey | x86-64, aarch64 |
| macOS 13 Ventura | x86-64, aarch64 |
| macOS 14 Sonoma | x86-64, aarch64 |

### Linux

Linux desktop distribution present a diverse landscape, and Slint should run on any of them, provided that they
are using Wayland or X-Windows, glibc, and d-bus. If a Linux distribution provides Long Term Support (LTS),
Slint should run on the most recent LTS or newer, at the time of a Slint version release.

## Embedded Platforms

Slint runs on a variety of embedded platforms. Generally speaking, Slint requires a modern Linux userspace
with working OpenGL ES 2.0 (or newer) or Vulkan drivers. We've had success running Slint on

- Yocto based distributions. For C++ applications see [meta-slint](https://github.com/slint-ui/meta-slint) for recipes. Rust application work out of the box with Yocto's rust support.
- BuildRoot based distributions.
- [TorizonCore](https://www.torizon.io/torizoncore-os).

### Microcontrollers

Slint's platform abstraction allows for integration into any Rust or C++ based Microcontroller development
environment. Developers need to implement functionality to feed input events such as touch or keyboard, as
well as displaying the pixels rendered by Slint into a frame- or linebuffer.
Loading
Loading