You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.rst
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ Simply install and add ``sphinx_peek`` to your ``conf.py`` extensions list.
41
41
.. important::
42
42
43
43
The scroll-to-target behaviour, inside the iframe,
44
-
only works reliably for same-origin references, due to browser security restrictions (see `CORS reference <https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS>`__).
44
+
only works reliably for same-origin_ or CORS_ enabled references.
45
45
46
46
To test the feature locally, rather than directly opening the ``.html`` file, you can serve the documentation using a simple HTTP server, e.g.:
47
47
@@ -64,6 +64,18 @@ Also, the CSS of the peek modal can be customized (see `html_css_files <https://
64
64
- ``.sp-iframe``: the iframe containing the target document
65
65
- ``.sp-overlay``: the overlay that covers the rest of the page
66
66
67
+
After loading the page, into the iframe, the extension will also add a class ``.sp-iframe-document`` to the root document.
68
+
This allows you to customize the CSS of the target document, e.g. to hide header and footer elements in the furo theme:
69
+
70
+
.. code-block:: css
71
+
72
+
.sp-iframe-document.mobile-header,
73
+
.sp-iframe-document.back-to-top,
74
+
.sp-iframe-document.bottom-of-page,
75
+
.sp-iframe-document.related-pages {
76
+
display: none;
77
+
}
78
+
67
79
More Examples
68
80
-------------
69
81
@@ -83,3 +95,7 @@ A reference to :ref:`other:subsection` within a paragraph.
0 commit comments