docs(1-level TOC styling): multiple fixes... (#8431)

This commit is contained in:
Victor Wheeler
2025-06-24 02:03:47 -06:00
committed by GitHub
parent 6b34873c96
commit 56daedd2ff
11 changed files with 48 additions and 46 deletions
+1 -1
View File
@@ -587,7 +587,7 @@ def _create_rst_files_for_dir(src_root_dir_len: int,
f.write(subdir_stem + '\n')
f.write(section_line)
f.write('\n')
f.write('.. toctree::\n :maxdepth: 1\n\n')
f.write('.. toctree::\n :maxdepth: 1\n :class: toctree-1-deep\n\n')
# One entry per `.rst` file
for h_file in elig_h_files:
+37 -14
View File
@@ -441,6 +441,10 @@ code.literal {
padding-top: 4rem;
}
/*-------------------------------------------------------------------------
* TOC Level 1
*-------------------------------------------------------------------------*/
#furo-main-content ul:has(.toctree-l1) {
max-width: 50%;
list-style-type: none;
@@ -461,6 +465,35 @@ code.literal {
margin-top: 2rem;
}
/* Special Case: 1-level-deep TOCs.
* Note: `...:not(:has(.toctree-l2))` won't do it because it ALSO selects
* .toctree-l1 elements in more complex TOCs, some of which simply don't have
* .toctree-l2 children! Instead, we want the special case where the TOC
* is limited by design to 1 level. Example: Widgets overview TOC.
*/
#furo-main-content .toctree-1-deep .toctree-l1 + .toctree-l1 {
margin-top: 0.65rem;
}
/*
* Welcome to LVGL Docs (home page) table of contents
*-------------------------------------------------------------------------
*/
#furo-main-content .toctree-landing-page .toctree-l1 > a {
font-size: 1rem;
font-weight: 600;
}
#furo-main-content .toctree-landing-page .toctree-l1 + .toctree-l1 {
margin-top: 0.125rem;
}
/*-------------------------------------------------------------------------
* TOC Level 2
*-------------------------------------------------------------------------*/
#furo-main-content ul:has(.toctree-l2) {
list-style-type: none;
padding: 0;
@@ -479,6 +512,10 @@ code.literal {
text-decoration: underline;
}
/*-------------------------------------------------------------------------
* TOC Level 3
*-------------------------------------------------------------------------*/
#furo-main-content .toctree-l3 > a {
color: var(--color-text-base);
}
@@ -622,20 +659,6 @@ table.docutils th p {
background-color: rgba(var(--color-background-base-rgb), 0.04);
}
/*
* Welcome to LVGL Docs (home page) table of contents
*-------------------------------------------------------------------------
*/
#welcome-to-lvgl-docs .toctree-l1 > a {
font-size: 1rem;
font-weight: 600;
}
#welcome-to-lvgl-docs .toctree-l1 + .toctree-l1 {
margin-top: 0.125rem;
}
/*
* Language selector (home page)
*-------------------------------------------------------------------------
+1
View File
@@ -5,6 +5,7 @@ Contributing
============
.. toctree::
:class: toctree-1-deep
:maxdepth: 1
introduction
@@ -5,6 +5,7 @@ XML - Declarative UI
====================
.. toctree::
:class: toctree-1-deep
:maxdepth: 1
intro
-20
View File
@@ -1,20 +0,0 @@
.. _reference:
=======
Details
=======
.. toctree::
:maxdepth: 2
../examples
integration/index
common-widget-features/index
widgets/index
main-modules/index
auxiliary-modules/index
libs/index
debugging/index
../contributing/index
../CHANGELOG
../API/index
@@ -11,6 +11,7 @@ platforms on a single Linux-based development system.
.. toctree::
:class: toctree-1-deep
:titlesonly:
:maxdepth: 1
@@ -18,6 +18,7 @@ concepts of Yocto and to help beginners to start with Yocto.
.. toctree::
:class: toctree-1-deep
:titlesonly:
:maxdepth: 1
+1
View File
@@ -6,6 +6,7 @@
.. toctree::
:class: toctree-1-deep
:maxdepth: 1
arduino_esp_littlefs
+2
View File
@@ -5,6 +5,7 @@ All Widgets
===========
.. toctree::
:class: toctree-1-deep
:maxdepth: 1
base_widget
@@ -12,6 +13,7 @@ All Widgets
|hr_left_250|
.. toctree::
:class: toctree-1-deep
:maxdepth: 1
3dtexture
+3
View File
@@ -58,6 +58,7 @@ Introduction
------------
.. toctree::
:class: toctree-1-deep toctree-landing-page
:maxdepth: 1
intro/introduction
@@ -68,6 +69,7 @@ Details
-------
.. toctree::
:class: toctree-1-deep toctree-landing-page
:maxdepth: 1
examples
@@ -84,6 +86,7 @@ Appendix
--------
.. toctree::
:class: toctree-1-deep toctree-landing-page
:maxdepth: 1
contributing/index
-11
View File
@@ -1,11 +0,0 @@
.. _intro-page:
============
Introduction
============
.. toctree::
:maxdepth: 1
introduction
getting_started