mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-21 14:32:44 +08:00
docs(1-level TOC styling): multiple fixes... (#8431)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
*-------------------------------------------------------------------------
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
|
||||
.. toctree::
|
||||
:class: toctree-1-deep
|
||||
:maxdepth: 1
|
||||
|
||||
arduino_esp_littlefs
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
.. _intro-page:
|
||||
|
||||
============
|
||||
Introduction
|
||||
============
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
introduction
|
||||
getting_started
|
||||
Reference in New Issue
Block a user