|
1 | | -<header class="bg-black-050 ps-fixed h64 t0 l0 r0 z-nav-fixed bb bc-black-100 js-stacks-topbar print:d-none"> |
2 | | - <div class="d-flex ai-center px16 h100 mx-auto wmx12"> |
3 | | - <button class="s-btn__unset c-pointer d-flex flex__center p8 mr8 fc-black-300 d-none md:d-block js-hamburger-btn"> |
4 | | - {% icon "Hamburger", "js-hamburger-icon" %} |
5 | | - {% icon "Clear", "d-none js-hamburger-close-icon" %} |
6 | | - </button> |
7 | | - <a class="flex--item js-logo" href="{{ "/" | relative_url }}"> |
| 1 | +<header class="s-topbar stacks-topbar ps-fixed h64 js-stacks-topbar print:d-none"> |
| 2 | + <div class="s-topbar--container px8"> |
| 3 | + <a href="#" class="s-topbar--menu-btn d-none md:d-flex js-hamburger-btn"><span></span></a> |
| 4 | + <a class="s-topbar--logo" href="{{ "/" | relative_url }}"> |
8 | 5 | <span class="v-visible-sr">Stacks home</span> |
9 | 6 | {% icon "LogoGlyphMd", "native" %} |
10 | 7 | </a> |
11 | 8 |
|
12 | 9 | {% if site-navigation %} |
13 | | - <nav class="s-navigation mx16 fw-nowrap sm:d-none"> |
| 10 | + <ul class="s-navigation ml8 fw-nowrap sm:d-none"> |
14 | 11 | {% assign slug = page.url | replace:'/',' ' | truncatewords: 2 | remove:'...' %} |
15 | 12 |
|
16 | 13 | {% for section in site-navigation.sections %} |
17 | 14 | {% assign url = section.url | replace:'/',' ' | truncatewords: 2 | remove:'...' %} |
18 | | - <a class="s-navigation--item{% if url == slug %} is-selected{% endif %}" href="{{ section.url }}">{{ section.title }}</a> |
| 15 | + <li><a class="s-navigation--item{% if url == slug %} is-selected{% endif %}" href="{{ section.url }}">{{ section.title }}</a></li> |
19 | 16 | {% endfor %} |
20 | | - </nav> |
| 17 | + </ul> |
21 | 18 | {% endif %} |
22 | 19 |
|
23 | | - <div class="d-flex ai-center jc-end fl-grow1"> |
24 | | - <div class="d-flex ai-center js-links"> |
25 | | - <a class="flex--item fc-black-300 sm:d-none" title="Stack Overflow" href="https://stackoverflow.com"> |
| 20 | + <ol class="s-topbar--content sm:ml0 overflow-hidden"> |
| 21 | + <li> |
| 22 | + <a class="s-topbar--item sm:d-none" title="Stack Overflow" href="https://stackoverflow.com"> |
26 | 23 | {% icon "LogoGlyphSm" %} |
27 | 24 | </a> |
28 | | - |
29 | | - <a class="flex--item fc-black-300 ml12 sm:ml16" title="Stacks on GitHub" href="https://github.com/StackExchange/Stacks"> |
| 25 | + </li> |
| 26 | + <li> |
| 27 | + <a class="s-topbar--item title="Stacks on GitHub" href="https://github.com/StackExchange/Stacks"> |
30 | 28 | {% icon "GitHub", "", "24" %} |
31 | 29 | </a> |
32 | | - |
33 | | - <a class="flex--item fc-black-300 ml12" title="Stacks Template on Codepen" href="https://codepen.io/pen?template=VwvKygL"> |
| 30 | + </li> |
| 31 | + <li> |
| 32 | + <a class="s-topbar--item" title="Stacks Template on Codepen" href="https://codepen.io/pen?template=VwvKygL"> |
34 | 33 | <svg aria-hidden="true" class="svg-icon iconCodepen" width="24" height="24" viewBox="0 0 18 18"><path d="M12.67 8.17l-2.98-2v-3.2l5.38 3.6-2.4 1.6zM13.9 9l1.73-1.15v2.3L13.9 9zm-4.2 2.82l2.98-2 2.4 1.62-5.38 3.59v-3.2zm-4.36-2l2.98 2v3.2l-5.38-3.58 2.4-1.61zM4.1 9l-1.73 1.15v-2.3L4.1 9zm4.2-2.82l-2.98 2-2.4-1.62L8.3 2.97v3.2zm.7 4.45L6.57 9 9 7.37 11.43 9 9 10.63zm7.99-4.19l-.01-.05-.01-.04-.02-.05-.02-.03a.6.6 0 0 0-.02-.05l-.02-.03a.69.69 0 0 0-.15-.17L16.7 6h-.02L9.4 1.11a.69.69 0 0 0-.77 0L1.3 5.99h-.02c0 .02-.02.02-.03.03a.81.81 0 0 0-.12.13.69.69 0 0 0-.03.04l-.02.03-.02.05-.02.03-.02.05v.04L1 6.44v.03a.7.7 0 0 0-.01.1v4.87a.7.7 0 0 0 0 .09l.01.03.01.05.01.04.02.05.02.03a.51.51 0 0 0 .07.12.53.53 0 0 0 .08.1c.02 0 .03.02.04.03l.03.02h.02l7.3 4.88a.69.69 0 0 0 .77 0l7.31-4.87h.02c0-.02.02-.02.03-.03a.72.72 0 0 0 .04-.04l.02-.02a.62.62 0 0 0 .13-.19l.02-.03a.6.6 0 0 0 .02-.05v-.04l.02-.05v-.03a.7.7 0 0 0 .01-.1V6.57a.7.7 0 0 0 0-.09l-.01-.03z"/></svg> |
35 | 34 | </a> |
36 | | - </div> |
| 35 | + </li> |
| 36 | + </ol> |
37 | 37 |
|
38 | | - <div class="flex--item ps-relative ml16 w100 wmx3 sm:wmx-initial sm:ml0 sm:d-none js-search"> |
39 | | - <input id="searchbox" class="s-input s-input__search bar-md js-stacks-search-bar" type="text" placeholder="Search Stacks…"> |
| 38 | + <div class="s-topbar--searchbar w100 wmx3 sm:wmx-initial js-search"> |
| 39 | + <div class="s-topbar--searchbar--input-group"> |
| 40 | + <input id="searchbox" type="text" placeholder="Search Stacks…" value="" autocomplete="off" class="s-input s-input__search" /> |
40 | 41 | {% icon "Search", "s-input-icon s-input-icon__search" %} |
41 | 42 | </div> |
| 43 | + </div> |
42 | 44 |
|
43 | | - <button class="d-flex flex__center s-btn__unset c-pointer p8 ml-auto fc-black-300 d-none sm:d-block js-search-btn"> |
44 | | - {% icon "Search", "js-search-icon" %} |
45 | | - {% icon "Clear", "d-none js-search-close-icon" %} |
46 | | - </button> |
47 | | - |
48 | | - <button class="s-btn__unset c-pointer flex--item fc-black-300 ml12 stacks-theme-button" |
49 | | - aria-controls="theming-popover" |
50 | | - data-controller="s-popover" |
51 | | - data-action="s-popover#toggle" |
52 | | - data-s-popover-toggle-class="is-selected" |
53 | | - data-s-popover-placement="bottom-end" |
54 | | - title="Select a theme"> |
55 | | - {% icon "Theme", "", "24" %} |
56 | | - </button> |
| 45 | + <ol class="s-topbar--content ml0 sm:fl1 overflow-hidden"> |
| 46 | + <li class="d-none sm:d-inline-flex ml-auto"> |
| 47 | + <button class="s-topbar--item s-btn__unset c-pointer p8 ml-auto js-search-btn"> |
| 48 | + {% icon "Search", "js-search-icon" %} |
| 49 | + {% icon "Clear", "d-none js-search-close-icon" %} |
| 50 | + </button> |
| 51 | + </li> |
| 52 | + <li> |
| 53 | + <button type="button" class="s-topbar--item s-btn__unset c-pointer stacks-theme-button" |
| 54 | + aria-controls="theming-popover" |
| 55 | + data-controller="s-popover" |
| 56 | + data-action="s-popover#toggle" |
| 57 | + data-s-popover-toggle-class="is-selected" |
| 58 | + data-s-popover-placement="bottom-end" |
| 59 | + title="Select a theme"> |
| 60 | + {% icon "Theme", "", "24" %} |
| 61 | + </button> |
| 62 | + </li> |
| 63 | + </ol> |
57 | 64 |
|
58 | | - <div class="s-popover w-auto wmn-initial wmx-initial" |
59 | | - id="theming-popover" |
60 | | - role="menu"> |
61 | | - <div class="s-popover--arrow"></div> |
62 | | - <div class="d-flex fd-column gs12 gsy"> |
63 | | - <div class="flex--item"> |
64 | | - <div class="d-flex ai-center jc-space-between gs8"> |
65 | | - <label class="flex--item s-label fs-body1 fw-normal" for="toggle-theme-dark">Dark mode</label> |
66 | | - <div class="flex--item s-toggle-switch"> |
67 | | - <input id="toggle-theme-dark" type="checkbox"> |
68 | | - <div class="s-toggle-switch--indicator"></div> |
69 | | - </div> |
| 65 | + <div class="s-popover w-auto wmn-initial wmx-initial" |
| 66 | + id="theming-popover" |
| 67 | + role="menu"> |
| 68 | + <div class="s-popover--arrow"></div> |
| 69 | + <div class="d-flex fd-column gs12 gsy"> |
| 70 | + <div class="flex--item"> |
| 71 | + <div class="d-flex ai-center jc-space-between gs8"> |
| 72 | + <label class="flex--item s-label fs-body1 fw-normal" for="toggle-theme-dark">Dark mode</label> |
| 73 | + <div class="flex--item s-toggle-switch"> |
| 74 | + <input id="toggle-theme-dark" type="checkbox"> |
| 75 | + <div class="s-toggle-switch--indicator"></div> |
70 | 76 | </div> |
71 | 77 | </div> |
72 | | - <div class="flex--item"> |
73 | | - <div class="d-flex ai-center jc-space-between gs8"> |
74 | | - <label class="flex--item s-label fs-body1 fw-normal" for="toggle-theme-custom">Custom theme</label> |
75 | | - <div class="flex--item s-toggle-switch"> |
76 | | - <input id="toggle-theme-custom" type="checkbox"> |
77 | | - <div class="s-toggle-switch--indicator"></div> |
78 | | - </div> |
| 78 | + </div> |
| 79 | + <div class="flex--item"> |
| 80 | + <div class="d-flex ai-center jc-space-between gs8"> |
| 81 | + <label class="flex--item s-label fs-body1 fw-normal" for="toggle-theme-custom">Custom theme</label> |
| 82 | + <div class="flex--item s-toggle-switch"> |
| 83 | + <input id="toggle-theme-custom" type="checkbox"> |
| 84 | + <div class="s-toggle-switch--indicator"></div> |
79 | 85 | </div> |
80 | 86 | </div> |
81 | | - <div class="flex--item"> |
82 | | - <div class="d-flex ai-center jc-space-between gs8"> |
83 | | - <label class="flex--item s-label fs-body1 fw-normal js-highcontrast-btn" for="toggle-theme-highcontrast">High contrast mode</label> |
84 | | - <div class="flex--item s-toggle-switch"> |
85 | | - <input id="toggle-theme-highcontrast" type="checkbox"> |
86 | | - <div class="s-toggle-switch--indicator"></div> |
87 | | - </div> |
| 87 | + </div> |
| 88 | + <div class="flex--item"> |
| 89 | + <div class="d-flex ai-center jc-space-between gs8"> |
| 90 | + <label class="flex--item s-label fs-body1 fw-normal js-highcontrast-btn" for="toggle-theme-highcontrast">High contrast mode</label> |
| 91 | + <div class="flex--item s-toggle-switch"> |
| 92 | + <input id="toggle-theme-highcontrast" type="checkbox"> |
| 93 | + <div class="s-toggle-switch--indicator"></div> |
88 | 94 | </div> |
89 | 95 | </div> |
90 | 96 | </div> |
|
0 commit comments