Repository navigation
Commit aac71f1
authored
Fix the stickiness of the version warning banner, and rename the config option to
This PR renames the `sticky_version_warning_banner` theme configuration
option to `sticky_banners` and fixes issues reported in #2328 after the
initial fix landed in #2372.
The fix is that the stickiness moves one level up. I've added
`.pst-sticky-header` which wraps both the `.pst-async-banner-revealer`
banner and the `.bd-header` navbar. The rule also overrides `.bd-header
{ position: sticky }` for the navbar inside the wrapper to neutralise
its effect.
**[EDIT: Resolved!]** ~There is no behaviour change besides the fix, but
I do have some additional thoughts below:
#2385 (comment)
Closes #2328
### Some screenshots
<details><summary>Click to expand</summary>
<p>
| Scenario | Screenshot |
|--------|--------|
| Default view on the home page | <img width="5088" height="2978"
alt="Default view on the home page"
src="https://github.com/user-attachments/assets/f00bfdef-d2c2-47bc-990d-546574e63e33"
/> |
| Scrolled down on the home page, the version warning banner still
remains sticky | <img width="5088" height="2978" alt="image"
src="https://github.com/user-attachments/assets/c6d07c6d-a8b6-41f8-92a3-732b7d8de6e5"
/> |
| Navigated to a new page that's not the home page | <img width="5088"
height="2978" alt="image"
src="https://github.com/user-attachments/assets/e54b0c86-573d-40ac-b25e-bab093cd1bdc"
/> |
| Navigated to a new page that's not the home page, and scrolled down
from the top | <img width="5088" height="2978" alt="image"
src="https://github.com/user-attachments/assets/130a4919-4acc-410d-ab0f-c80f31d45b15"
/> |
| Navigated to a new page that's not the home page, with the
announcement banner checked off, default view | <img width="5088"
height="2978" alt="image"
src="https://github.com/user-attachments/assets/6767943d-c988-4841-a06f-0002bcc2c8be"
/> |
| Navigated to a new page that's not the home page, with the
announcement banner checked off, and scrolled down from the top | <img
width="5088" height="2978" alt="image"
src="https://github.com/user-attachments/assets/58041152-c583-47f3-855c-b77bc5d37849"
/> |
</p>
</details>sticky_banners (#2385)1 parent 5d30788 commit aac71f1
7 files changed
Lines changed: 46 additions & 30 deletions
File tree
- docs/user_guide
- src/pydata_sphinx_theme
- assets/styles/sections
- theme/pydata_sphinx_theme
- sections
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
| 97 | + | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
109 | | - | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | | - | |
113 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 16 | | |
25 | 17 | | |
26 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
8 | 22 | | |
9 | 23 | | |
10 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
84 | 89 | | |
85 | 90 | | |
86 | 91 | | |
| |||
89 | 94 | | |
90 | 95 | | |
91 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
92 | 101 | | |
93 | 102 | | |
94 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 2 | + | |
7 | 3 | | |
8 | 4 | | |
9 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
356 | | - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
357 | 359 | | |
358 | | - | |
| 360 | + | |
359 | 361 | | |
360 | 362 | | |
361 | 363 | | |
362 | | - | |
| 364 | + | |
363 | 365 | | |
364 | | - | |
365 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
366 | 370 | | |
367 | 371 | | |
368 | | - | |
| 372 | + | |
369 | 373 | | |
370 | 374 | | |
371 | 375 | | |
372 | | - | |
373 | 376 | | |
374 | | - | |
375 | | - | |
| 377 | + | |
| 378 | + | |
376 | 379 | | |
377 | 380 | | |
378 | 381 | | |
| |||
0 commit comments