Skip to content

Commit 9db49ec

Browse files
committed
doc: conf: add sphinx-design extension
Add sphinx-design to the list of Sphinx extensions in conf.py to enable additional design components for documentation, starting with cards. https://sphinx-design.readthedocs.io/en/latest/ Signed-off-by: Benjamin Cabé <[email protected]>
1 parent e5c0cb8 commit 9db49ec

File tree

4 files changed

+38
-0
lines changed

4 files changed

+38
-0
lines changed

doc/_static/css/custom.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,3 +1181,34 @@ li>a.code-sample-link.reference.internal {
11811181
li>a.code-sample-link.reference.internal.current {
11821182
text-decoration: underline;
11831183
}
1184+
1185+
/* sphinx-design classes */
1186+
1187+
.sd-card {
1188+
background-color: var(--navbar-background-color) !important;
1189+
border-radius: 0.75rem !important;
1190+
border: 1px solid transparent !important;
1191+
transition: all 0.15s ease;
1192+
box-shadow: none !important;
1193+
}
1194+
1195+
.sd-card:hover {
1196+
transform: translateY(-3px);
1197+
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25) !important;
1198+
border-color: rgba(255, 255, 255, 0.05);
1199+
}
1200+
1201+
.sd-card-title {
1202+
font-size: 1.125rem !important;
1203+
font-weight: bold !important;
1204+
margin-bottom: 0.25rem !important;
1205+
color: #fff !important;
1206+
}
1207+
1208+
.sd-card-text {
1209+
color: var(--navbar-level-1-color) !important;
1210+
font-weight: 300 !important;
1211+
font-size: 0.9rem !important;
1212+
margin: 0 !important;
1213+
opacity: 0.85;
1214+
}

doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"sphinx.ext.graphviz",
7878
"sphinxcontrib.jquery",
7979
"sphinxcontrib.programoutput",
80+
"sphinx_design",
8081
"zephyr.application",
8182
"zephyr.html_redirects",
8283
"zephyr.kconfig",

doc/requirements.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ sphinx-togglebutton
1212
sphinx-sitemap
1313
sphinx-autobuild
1414
sphinxcontrib.programoutput
15+
sphinx-design
1516

1617
# YAML validation. Used by zephyr_module.
1718
PyYAML>=6.0

doc/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,7 @@ sphinx==8.2.3 \
537537
# -r requirements.in
538538
# sphinx-autobuild
539539
# sphinx-copybutton
540+
# sphinx-design
540541
# sphinx-last-updated-by-git
541542
# sphinx-notfound-page
542543
# sphinx-rtd-theme
@@ -553,6 +554,10 @@ sphinx-copybutton==0.5.2 \
553554
--hash=sha256:4cf17c82fb9646d1bc9ca92ac280813a3b605d8c421225fd9913154103ee1fbd \
554555
--hash=sha256:fb543fd386d917746c9a2c50360c7905b605726b9355cd26e9974857afeae06e
555556
# via -r requirements.in
557+
sphinx-design==0.6.1 \
558+
--hash=sha256:b11f37db1a802a183d61b159d9a202314d4d2fe29c163437001324fe2f19549c \
559+
--hash=sha256:b44eea3719386d04d765c1a8257caca2b3e6f8421d7b3a5e742c0fd45f84e632
560+
# via -r requirements.in
556561
sphinx-last-updated-by-git==0.3.8 \
557562
--hash=sha256:6382c8285ac1f222483a58569b78c0371af5e55f7fbf9c01e5e8a72d6fdfa499 \
558563
--hash=sha256:c145011f4609d841805b69a9300099fc02fed8f5bb9e5bcef77d97aea97b7761

0 commit comments

Comments
 (0)