|
6 | 6 | When JavaScript is enabled, the button opens the Gecko search overlay (wired |
7 | 7 | in static/js/search-shortcut.js; Ctrl/Cmd+K shortcut). When JavaScript is |
8 | 8 | disabled, the button and keyboard hint are hidden via an inline <style> in |
9 | | - <noscript>, and a non-interactive span explains that search is unavailable. |
| 9 | + <noscript> and a fallback message is shown instead. |
10 | 10 |
|
11 | 11 | Variables: |
12 | 12 | current_version (object, required) — current Boost release (from context processor) |
|
27 | 27 | Search |
28 | 28 | </button> |
29 | 29 | <span class="header__search-kbd" aria-hidden="true">CTRL+K</span> |
| 30 | + |
| 31 | + {% comment %} No-JS fallback (hidden when JS is enabled via CSS) {% endcomment %} |
30 | 32 | <noscript> |
31 | 33 | <style> |
32 | 34 | #gecko-search-button, |
33 | 35 | .header__search-kbd { display: none; } |
34 | 36 | .header__search-bar > noscript { display: contents; } |
| 37 | + .header__search-bar, |
| 38 | + .header__search-bar:hover { |
| 39 | + color: var(--color-text-tertiary); |
| 40 | + background: var(--color-surface-mid); |
| 41 | + cursor: not-allowed; |
| 42 | + } |
| 43 | + .header__search-bar .header__search-icon, |
| 44 | + .header__search-bar:hover .header__search-icon, |
| 45 | + .header__search-bar:hover .header__search-input-trigger { |
| 46 | + color: var(--color-icon-secondary); |
| 47 | + cursor: not-allowed; |
| 48 | + } |
35 | 49 | </style> |
36 | 50 | <span class="header__search-input-trigger" aria-disabled="true"> |
37 | 51 | <span class="header__search-icon" aria-hidden="true"> |
38 | 52 | {% include "includes/icon.html" with icon_name="search" icon_class="header__icon" icon_size=16 %} |
39 | 53 | </span> |
40 | 54 | Search is not available with JS disabled |
41 | 55 | </span> |
| 56 | + <span class="header__search-icon" aria-hidden="true"> |
| 57 | + {% include "includes/icon.html" with icon_name="lock" icon_class="header__icon" icon_size=16 icon_viewbox="0 0 16 16" %} |
| 58 | + </span> |
42 | 59 | </noscript> |
43 | 60 | </search> |
0 commit comments