aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2024-12-16 10:42:25 +0100
committerCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2024-12-16 16:10:43 +0100
commit1d4c936e6b826ae63fcfb4b992ecc9d795d629ba (patch)
treec75dda6132040fcd38692f46d7932fd7fc2d5df9
parenta60fe77b7be816a95cb2ee62f74c2e2c5c8fa018 (diff)
doc: use footer instead of body for hover text
Pick-to: 6.8 Change-Id: Ia185a68fe276c9b83bd47fdb2b964d22bee5e382 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
-rw-r--r--sources/pyside6/doc/_static/css/qt_style.css4
-rw-r--r--tools/example_gallery/main.py7
2 files changed, 8 insertions, 3 deletions
diff --git a/sources/pyside6/doc/_static/css/qt_style.css b/sources/pyside6/doc/_static/css/qt_style.css
index c8339586d..f9eedd9f7 100644
--- a/sources/pyside6/doc/_static/css/qt_style.css
+++ b/sources/pyside6/doc/_static/css/qt_style.css
@@ -150,7 +150,7 @@ section#examples .sd-card-hover:hover {
box-shadow: 0 4px 8px rgba(27, 31, 35, 0.12), 0 12px 48px rgba(27, 31, 35, 0.24);
}
-section#examples .sd-card-hover:hover .sd-card-body p {
+section#examples .sd-card-hover:hover .sd-card-footer {
bottom: 0;
display: block;
left: 0;
@@ -168,7 +168,7 @@ section#examples .sd-card-hover:hover a {
z-index: 7;
}
-section#examples details .sd-card .sd-card-body p {
+section#examples details .sd-card .sd-card-footer {
display: none;
}
diff --git a/tools/example_gallery/main.py b/tools/example_gallery/main.py
index 7d12faee2..59c986438 100644
--- a/tools/example_gallery/main.py
+++ b/tools/example_gallery/main.py
@@ -334,12 +334,17 @@ def get_module_gallery(examples):
if not title:
title = f"{name} from ``{underline}``."
+ # Clean refs from desc
+ if ":ref:" in desc:
+ desc = desc.replace(":ref:`", "")
+ desc = desc.replace("`", "")
+
gallery += f"{ind(2)}.. grid-item-card:: {title}\n"
gallery += f"{ind(3)}:class-item: cover-img\n"
gallery += f"{ind(3)}:link: {doc_file_name}\n"
gallery += f"{ind(3)}:link-type: ref\n"
gallery += f"{ind(3)}:img-top: {img_name}\n\n"
- gallery += f"{ind(3)}{desc}...\n"
+ gallery += f"{ind(3)}+++\n{ind(3)}{desc}\n"
return f"{gallery}\n"