Skip to content

Commit 0f7fc57

Browse files
authored
Single decker nav (#310)
* single decker nav * mobile fix * lint
1 parent 1abac9d commit 0f7fc57

File tree

5 files changed

+7
-24
lines changed

5 files changed

+7
-24
lines changed

apps/svelte.dev/src/routes/(authed)/playground/[id]/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
flex-direction: column;
185185
186186
@media (min-width: 800px) {
187-
--app-controls-h: 5rem;
187+
--app-controls-h: 6rem;
188188
}
189189
}
190190

apps/svelte.dev/src/routes/(authed)/playground/[id]/AppControls.svelte

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -305,20 +305,8 @@ export default app;`
305305
flex: 0;
306306
gap: 1rem;
307307
308-
&::after {
309-
content: '';
310-
position: absolute;
311-
left: 0;
312-
bottom: -4px;
313-
width: 100%;
314-
height: 4px;
315-
z-index: 2;
316-
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05), transparent);
317-
}
318-
319308
@media (min-width: 800px) {
320-
padding-top: 0;
321-
padding-bottom: 1rem;
309+
padding-top: 1rem;
322310
}
323311
}
324312
@@ -383,6 +371,7 @@ export default app;`
383371
border-radius: var(--sk-border-radius);
384372
color: currentColor;
385373
font-family: var(--sk-font-ui);
374+
width: 0;
386375
flex: 1;
387376
padding: 0.2rem 0.6rem;
388377
height: 3.2rem;

apps/svelte.dev/src/routes/+layout.svelte

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@
3838

3939
<Shell nav_visible={$page.route.id !== '/(authed)/playground/[id]/embed'}>
4040
{#snippet top_nav()}
41-
<Nav
42-
title={data.nav_title}
43-
links={data.nav_links}
44-
shadow={!$page.route.id?.startsWith('/(authed)/playground')}
45-
>
41+
<Nav title={data.nav_title} links={data.nav_links}>
4642
{#snippet search()}
4743
<Search />
4844
{/snippet}

packages/repl/src/lib/Repl.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@
337337
width: 100%;
338338
height: calc(100dvh - var(--sk-nav-height));
339339
background: var(--sk-back-1);
340-
padding: 1rem 0 0 0;
340+
padding: 0;
341341
342342
&.embedded {
343343
height: 100%;

packages/site-kit/src/lib/nav/Nav.svelte

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ Top navigation bar for the application. It provides a slot for the left side, th
2121
links: NavigationLink[];
2222
search?: Snippet;
2323
external_links?: Snippet;
24-
shadow: boolean;
2524
}
2625
27-
let { home_title = 'Homepage', title, links, search, external_links, shadow }: Props = $props();
26+
let { home_title = 'Homepage', title, links, search, external_links }: Props = $props();
2827
2928
let visible = $state(true);
3029
@@ -67,7 +66,6 @@ Top navigation bar for the application. It provides a slot for the left side, th
6766
class:visible={visible || $nav_open}
6867
class:$nav_open
6968
class:dark={$theme.current === 'dark'}
70-
class:shadow
7169
style:z-index={$overlay_open && ($searching || $on_this_page_open) ? 80 : null}
7270
aria-label="Primary"
7371
>
@@ -300,7 +298,7 @@ Top navigation bar for the application. It provides a slot for the left side, th
300298
display: grid;
301299
grid-template-columns: auto 1fr 1fr;
302300
303-
&.shadow::after {
301+
&::after {
304302
top: auto;
305303
bottom: -4px;
306304
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05), transparent);

0 commit comments

Comments
 (0)