|
5 | 5 | import { Icon, Icons, Nav, NavItem, PreloadingIndicator, SkipLink } from '@sveltejs/site-kit'; |
6 | 6 | import Search from '$lib/search/Search.svelte'; |
7 | 7 | import SearchBox from '$lib/search/SearchBox.svelte'; |
8 | | -
|
9 | | - let h = 0; |
10 | | - let w = 0; |
11 | | - $: browser && document.documentElement.style.setProperty('--ukr-footer-height', `${h}px`); |
12 | 8 | </script> |
13 | 9 |
|
14 | 10 | <Icons /> |
|
47 | 43 | </NavItem> |
48 | 44 | </svelte:fragment> |
49 | 45 | </Nav> |
50 | | - <a target="_blank" rel="noopener noreferrer" href="https://www.stopputin.net/" |
51 | | - ><div class="ukr" bind:clientHeight={h} bind:clientWidth={w}> |
52 | | - {#if w < 830} |
53 | | - <strong>We stand with Ukraine.</strong> |
54 | | - Donate → |
55 | | - {:else} |
56 | | - <strong>We stand with Ukraine.</strong> |
57 | | - Petition your leaders. Show your support. |
58 | | - {/if} |
59 | | - </div></a |
60 | | - > |
61 | | - |
62 | | -<main id="main" style="padding-bottom: {h}px;"> |
| 46 | + |
| 47 | +<main id="main"> |
63 | 48 | <slot /> |
64 | 49 |
|
65 | 50 | {#if browser} |
66 | 51 | <SearchBox /> |
67 | 52 | {/if} |
68 | 53 | </main> |
69 | 54 |
|
| 55 | +<a target="_blank" rel="noopener noreferrer" href="https://www.stopputin.net/"> |
| 56 | + <div class="ukr"> |
| 57 | + <span class="small"> |
| 58 | + <strong>We stand with Ukraine.</strong> Donate → |
| 59 | + </span> |
| 60 | + <span class="large"> |
| 61 | + <strong>We stand with Ukraine.</strong> Petition your leaders. Show your support. |
| 62 | + </span> |
| 63 | + </div> |
| 64 | +</a> |
| 65 | + |
70 | 66 | <style> |
71 | 67 | main { |
72 | 68 | position: relative; |
|
136 | 132 | font-size: 1.6rem !important; |
137 | 133 | } |
138 | 134 |
|
| 135 | + /** Ukraine banner */ |
| 136 | + :root { |
| 137 | + --ukr-footer-height: 48px; |
| 138 | + } |
| 139 | +
|
| 140 | + main { |
| 141 | + padding-bottom: var(--ukr-footer-height); |
| 142 | + } |
| 143 | +
|
139 | 144 | .ukr { |
140 | 145 | background-color: #0066cc; |
141 | 146 | color: white; |
142 | 147 | position: fixed; |
| 148 | + display: flex; |
| 149 | + align-items: center; |
| 150 | + justify-content: center; |
143 | 151 | bottom: 0; |
144 | 152 | width: 100vw; |
145 | | - text-align: center; |
146 | | - padding: 0.75em; |
| 153 | + height: var(--ukr-footer-height); |
147 | 154 | z-index: 999; |
148 | 155 | } |
| 156 | +
|
149 | 157 | :global(.examples-container, .repl-outer, .tutorial-outer) { |
150 | 158 | height: calc(100vh - var(--nav-h) - var(--ukr-footer-height)) !important; |
151 | 159 | } |
| 160 | +
|
152 | 161 | :global(.toggle) { |
153 | 162 | bottom: var(--ukr-footer-height) !important; |
154 | 163 | } |
| 164 | +
|
155 | 165 | @media (max-width: 830px) { |
156 | 166 | :global(aside) { |
157 | 167 | z-index: 9999 !important; |
|
0 commit comments