|
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`); |
8 | 12 | </script>
|
9 | 13 |
|
10 | 14 | <Icons />
|
|
14 | 18 | {/if}
|
15 | 19 |
|
16 | 20 | <SkipLink href="#main" />
|
17 |
| -<Nav {page} logo="/images/svelte-kit-horizontal.svg"> |
| 21 | +<Nav {page} logo="/stopwar.svg"> |
18 | 22 | <svelte:fragment slot="nav-center">
|
19 | 23 | {#if browser}
|
20 | 24 | <!-- the <Nav> component renders this content inside a <ul>, so
|
|
43 | 47 | </NavItem>
|
44 | 48 | </svelte:fragment>
|
45 | 49 | </Nav>
|
46 |
| - |
47 |
| -<main id="main"> |
| 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;"> |
48 | 63 | <slot />
|
49 | 64 |
|
50 | 65 | {#if browser}
|
|
57 | 72 | position: relative;
|
58 | 73 | margin: 0 auto;
|
59 | 74 | padding-top: var(--nav-h);
|
| 75 | + overflow: scroll; |
60 | 76 | overflow-x: hidden;
|
61 | 77 | }
|
62 | 78 |
|
|
119 | 135 | :global(body) {
|
120 | 136 | font-size: 1.6rem !important;
|
121 | 137 | }
|
| 138 | +
|
| 139 | + .ukr { |
| 140 | + background-color: #0066cc; |
| 141 | + color: white; |
| 142 | + position: fixed; |
| 143 | + bottom: 0; |
| 144 | + width: 100vw; |
| 145 | + text-align: center; |
| 146 | + padding: 0.75em; |
| 147 | + z-index: 999; |
| 148 | + } |
| 149 | + :global(.examples-container, .repl-outer, .tutorial-outer) { |
| 150 | + height: calc(100vh - var(--nav-h) - var(--ukr-footer-height)) !important; |
| 151 | + } |
| 152 | + :global(.toggle) { |
| 153 | + bottom: var(--ukr-footer-height) !important; |
| 154 | + } |
| 155 | + @media (max-width: 830px) { |
| 156 | + :global(aside) { |
| 157 | + z-index: 9999 !important; |
| 158 | + } |
| 159 | + } |
| 160 | + .ukr strong { |
| 161 | + color: #ffcc00; |
| 162 | + } |
122 | 163 | </style>
|
0 commit comments