From e0e7dc89cb62bd585f69cda22783d245bd434604 Mon Sep 17 00:00:00 2001 From: pngwn Date: Mon, 28 Feb 2022 11:11:04 +0000 Subject: [PATCH 1/8] feat: add ukraine banner --- sites/svelte.dev/src/routes/__layout.svelte | 39 ++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/sites/svelte.dev/src/routes/__layout.svelte b/sites/svelte.dev/src/routes/__layout.svelte index a56dd428..ead44e43 100644 --- a/sites/svelte.dev/src/routes/__layout.svelte +++ b/sites/svelte.dev/src/routes/__layout.svelte @@ -2,6 +2,7 @@ import '@sveltejs/site-kit/base.css'; import { setContext } from 'svelte'; import { page, navigating, session } from '$app/stores'; + import { browser } from '$app/env'; import { Icon, Icons, Nav, NavItem, SkipLink } from '@sveltejs/site-kit'; import PreloadingIndicator from '$lib/components/PreloadingIndicator.svelte'; @@ -28,6 +29,10 @@ if (r.ok) $session.user = null; } }); + + let h = 0; + $: console.log($page.url.pathname); + $: browser && document.documentElement.style.setProperty('--ukr-footer-height', `${h}px`); @@ -62,13 +67,45 @@ + +
+ We stand with Ukraine. + Petition your leaders. + Donate to show support. +
+ {/if} -
+
\ No newline at end of file From 00eb2288c5c680201566156f9acfbb3eac71190d Mon Sep 17 00:00:00 2001 From: pngwn Date: Mon, 28 Feb 2022 12:23:21 +0000 Subject: [PATCH 4/8] correct fixed position on chrome + ff mobile --- sites/svelte.dev/src/routes/__layout.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/sites/svelte.dev/src/routes/__layout.svelte b/sites/svelte.dev/src/routes/__layout.svelte index 5009ec20..3b039010 100644 --- a/sites/svelte.dev/src/routes/__layout.svelte +++ b/sites/svelte.dev/src/routes/__layout.svelte @@ -109,6 +109,7 @@ margin: 0 auto; /* padding: var(--nav-h) var(--side-nav) 0 var(--side-nav); */ padding: var(--nav-h) 0 0 0; + overflow: scroll; } .small { From ab3e6d436ba33b8e118f029254ee0768def20cac Mon Sep 17 00:00:00 2001 From: pngwn Date: Mon, 28 Feb 2022 13:45:00 +0000 Subject: [PATCH 5/8] ensure mobile menu is always visible --- sites/svelte.dev/src/routes/__layout.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sites/svelte.dev/src/routes/__layout.svelte b/sites/svelte.dev/src/routes/__layout.svelte index 3b039010..0caa8c60 100644 --- a/sites/svelte.dev/src/routes/__layout.svelte +++ b/sites/svelte.dev/src/routes/__layout.svelte @@ -99,6 +99,12 @@ bottom: var(--ukr-footer-height) !important; } + @media (max-width: 830px) { + :global(aside) { + z-index: 9999 !important; + } + } + .ukr strong, .ukr a { color: #ffcc00; From c124b1f8629eb044e11c1cc71be399ecf392b0b1 Mon Sep 17 00:00:00 2001 From: pngwn Date: Mon, 28 Feb 2022 13:49:33 +0000 Subject: [PATCH 6/8] change donation link --- sites/svelte.dev/src/routes/__layout.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/svelte.dev/src/routes/__layout.svelte b/sites/svelte.dev/src/routes/__layout.svelte index 0caa8c60..0ece6c31 100644 --- a/sites/svelte.dev/src/routes/__layout.svelte +++ b/sites/svelte.dev/src/routes/__layout.svelte @@ -70,7 +70,7 @@
We stand with Ukraine. Petition your leaders. - Donate to show support.
From bae847aa516e2c0f6b0aae8225cd64abf0490729 Mon Sep 17 00:00:00 2001 From: pngwn Date: Mon, 28 Feb 2022 14:05:45 +0000 Subject: [PATCH 7/8] more tweaks --- sites/svelte.dev/src/routes/__layout.svelte | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/sites/svelte.dev/src/routes/__layout.svelte b/sites/svelte.dev/src/routes/__layout.svelte index 0ece6c31..95ffcf5e 100644 --- a/sites/svelte.dev/src/routes/__layout.svelte +++ b/sites/svelte.dev/src/routes/__layout.svelte @@ -31,6 +31,7 @@ }); let h = 0; + let w = 0; $: browser && document.documentElement.style.setProperty('--ukr-footer-height', `${h}px`); @@ -67,13 +68,17 @@ -
- We stand with Ukraine. - Petition your leaders. - Donate to show support. -
+
+ {#if w < 830} + We stand with Ukraine. + Donate → + {:else} + We stand with Ukraine. + Petition your leaders. Show your support. + {/if} +
{/if}
@@ -88,7 +93,7 @@ bottom: 0; width: 100vw; text-align: center; - padding: 1em; + padding: 0.75em; z-index: 999; } From 79b4cbbc60c4d6667bf0f2a0f0a121d726796544 Mon Sep 17 00:00:00 2001 From: pngwn Date: Mon, 28 Feb 2022 14:06:55 +0000 Subject: [PATCH 8/8] remove unused class --- sites/svelte.dev/src/routes/__layout.svelte | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sites/svelte.dev/src/routes/__layout.svelte b/sites/svelte.dev/src/routes/__layout.svelte index 95ffcf5e..f6dc696b 100644 --- a/sites/svelte.dev/src/routes/__layout.svelte +++ b/sites/svelte.dev/src/routes/__layout.svelte @@ -110,8 +110,7 @@ } } - .ukr strong, - .ukr a { + .ukr strong { color: #ffcc00; }