With the recent update to Sphinx RTD theme 3.0.0, a 19px-high element
that used to display the version number is not visible anymore, so the
JS code that hides the upper-left logo when scrolling down needs to be
adjusted to account for this change.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
A new zephyr:board:: Sphinx directive allows to flag a documentation
page as being the documentation for a specific board, allowing to
auto-populate some of the contents, ex. by adding a board overview a la
Wikipedia, and later things like supported HW features, etc.
A corresponding :zephyr:board: role allows to link to a board doc page.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Sync the section of the custom.css dedicated to object
signatures with Godot custom CSS.
Fixes#80005.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit adds support for categorizing code samples in the
documentation.
It introduces two new directives:
- `zephyr:code-sample-category::` to create a category and associated
brief description, that implicitly acts as a toctree too.
- `zephyr:code-sample-listing::` to allow dumping a list of samples
corresponding to a category anywhere in the documentation.
Fixes#62453.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Before this change, headings in documentation pages were using the same
font family as the rest of the content, which made them blend in too
much.
This introduces a humanist font stack for the headings as well as some
minor tweaks to make the hierarchy of the document clearer through
better differentiation of the different levels (i.e. not just relying on
font size).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
added a missing dvh causing footer to be footer to be displayed outside
of the viewport on mobile when browsing "Desktop site" version, and also
added fallback "vh" rules for slightly better browser compatibility.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Make actual document take all vertical space available so that footer is
always at the bottom, even when the page has very little content.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
There is likely no need for the footer to be so prominently asking folks
to report issues with a page based on the number of issues that have
been reported in the past year or so.
This change makes the footer less crowded and saves some vertical space.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Make lists of code samples more compact (a lot of vertical real estate was
being wasted) and more visually appealing.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The descriptions of the homepage grid items were too long and often
repetitive (e.g. there's no need to repeat "Zephyr" in almost every
descriptions). This commit shortens them to aim at having them fit on
two lines, three at most.
Also updated the look&feel slightly.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add an initial version of doxybridge, an extension that allows to use
Sphinx C domain to automatically reference Doxygen pages.
It also introduces minimal support for `.. doxygengroup` directive,
which effectively links to the group's Doxygen page.
Co-authored-by: Benjamin Cabé <benjamin@zephyrproject.org>
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Make sure that captions (tables, figures, ...) can be properly
seen on both light and dark them by setting their text color
to the default "body" color.
Fixes#73190.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add UI to select preferred search engine when Google Programmable Search is
enabled. The user's preference is saved using local storage.
This also makes the search input field of type "search" for better UX (in
particular on mobile).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add Google Programmable Search engine to the documentation, while
leaving it possible to easily revert to the built-in Sphinx search
engine. As the styling of the search results is apparently not thought
to be easy to tweak, the gcs.css stylesheet might require further
improvements.
Fixes#55173.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The "Sphinx search extension" CSS rules are not needed as we are not
using this extension since we are not hosting on readthedocs.io.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This picks up custom javscript from Godot documentation and uses CSS
rules we already had in place (only they were not used) to tweak the
page scroll behavior. As folks scroll down the page, the Zephyr logo in
the top right corner gradually disappears, leaving more room for the
navigation menu.
Also, when scrolling in the navigation pane, the UI there is slightly
adapted to make it more clear that the search box is "fixed", plus,
when one reaches the bottom of the navigation tree and continues
scrolling, the "main" page scrolls down.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Enable the pdflscape package (available in the Latex distros recommended
for Zephyr) to allow for some pages to be rendered in landscape mode.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Backport a useful CSS rule from Godot that allows to have *all* cells of
a table to wrap. This can be useful for list-tables in particular,
where otherwise the first column don't wrap.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Missed this usability issue earlier. This makes the text and icon in
collapsible admonition the same color as the admonition title.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Instead of breathe.
I'm not sure of the best version comparison to use. There is no
intention to break the API for docleaf but it is also still young
in some ways and there might be adjustments to the configuration values
that would need to be reflected in the version number as it is still
pre-1.0 that would only be a minor version change.
Signed-off-by: Michael Jones <m.pricejones@gmail.com>
Fixes CSS styling issue causing keyboard shortcuts to sometimes not be
visible (white text on white background) using dark theme.
Fixes#55126.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit replaces the Zephyr logo for the PDF documentations with
the new registered trademark version.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit replaces the Zephyr logo for the HTML documentations with
the new registered trademark version.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit replaces the Zephyr logo for the README page with the new
registered trademark version.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The CSS classes used by figures in docutils has changed in recent
versions. Adjust CSS so that figures are centered again by default.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The logo did not display black text when using the Github light theme in
a system configured to prefer dark mode. An alternative solution: just
make text grayish (#4e4e4e) so that it looks "ok" in both light and dark
modes.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Use an SVG based logo with embedded style that toggles title color using
media queries. The SVG logo is not exactly the same as the previous one
as I only had this version in SVG (taken from docs actually).
Note that we cannot use the method described in
https://github.blog/changelog/
2021-11-24-specify-theme-context-for-images-in-markdown/ because the
README is written in rst, not Markdown.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
New Sphinx version (or docutils) has slightly changed the output format
for code documentation directives. These changes try to mimic previous
behavior, even though it does not achieve 100% equal result. In some
cases the new default style does not require further tweaks, and in some
others styling as before is not possible.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Only certain type of admonitions were styled (e.g. notes, warnings,
etc.). This change also styles generic admonitions such as:
```rst
... admonition:: Rationale
...
```
Fixes#40622
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
- Use designated CSS parts to style the toggle properly
- Use breadcrumbs_aside block to render dark mode toggle
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This patch improves the general look and feel of the LaTeX (PDF)
documentation build. Changes include:
- A custom title with relevant information has been created
- Some colors have been adjusted to match those in the web template
- Charter font family is used
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Logo was accidentally deleted as part of some docs cleanup. Add it back
with a new name making it more explicit that it belongs to the readme.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Flag Sphinx tabs style properties as !important, it looks like the
default style used by the latest extension version take precedence.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Setting overflow:auto adds a scrollbar to admonitions if the content
overflows. Some adminitions overflow specially on mobile devices.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
With current CSS construct like void f() are rendered together, i.e.
voidf(). Add some spacing to make it more like "void f()".
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The scrolling customizations were used to hide the logo when scrolling
down. With this change, logo is always displayed.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Since logo already brings to home page, remove the link displayed above.
It saves some vertical pixels while making docs nicer. Also adjusted
wy-menu-vertical max-height to account for the new height (note: was
wrong before).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Some users reported issues on Windows regarding navigation bar title
location. Scroll values have been adjusted to fix the problem. Tested on
both Linux and Windows (Chromium/Firefox).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
A new look and feel for the Zephyr documentation. It is largerly based
on the work done by Godot Engine docs, but with some Zephyr specific
customizations.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>