Skip to content

Commit ad5ec7a

Browse files
committed
homepage tweak
1 parent 397e5e7 commit ad5ec7a

File tree

11 files changed

+54
-103
lines changed

11 files changed

+54
-103
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
<Hero />
2626

27-
<Blurb --background="var(--sk-back-1)">
27+
<Blurb>
2828
{#snippet one()}
2929
<div>
3030
<h2>fast</h2>

apps/svelte.dev/src/routes/_home/Features.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { Section } from '@sveltejs/site-kit/components';
33
</script>
44

5-
<Section --background="var(--sk-back-1)">
5+
<Section>
66
<div class="container">
77
<div class="features">
88
<h2><span>features? we got 'em.</span></h2>

apps/svelte.dev/src/routes/_home/Hero.svelte

Lines changed: 42 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,9 @@
99

1010
<div class="hero">
1111
<div class="hero-content">
12-
<img alt="Svelte logotype" class="logotype" src={SvelteLogotype} width="300" height="56" />
13-
<strong>
14-
<span style="white-space: nowrap">Web development</span> <br /> but fun
15-
</strong>
16-
<div class="buttons">
17-
<a href="/tutorial" class="cta">tutorial</a>
18-
<a href="/docs" class="cta basic">read the docs</a>
19-
</div>
12+
<!-- <img alt="Svelte logotype" class="logotype" src={SvelteLogotype} width="300" height="56" /> -->
13+
<h1>web development for the rest of us</h1>
14+
<a href="/docs" class="cta basic">get started</a>
2015
</div>
2116

2217
<picture class="machine">
@@ -51,16 +46,35 @@
5146
<style>
5247
.hero {
5348
position: relative;
54-
background: radial-gradient(circle at 40% 30%, rgb(235, 243, 249), rgb(214, 222, 228));
5549
padding: 6rem 0 34vw 0;
5650
margin-bottom: 3rem;
57-
}
5851
59-
.machine img {
60-
position: absolute;
61-
pointer-events: none;
62-
width: 100%;
63-
height: auto;
52+
&::before {
53+
content: '';
54+
position: absolute;
55+
width: 100%;
56+
height: 200%;
57+
left: 0;
58+
top: 0;
59+
background: linear-gradient(to bottom, transparent, var(--sk-back-1)),
60+
radial-gradient(circle at 40% 30%, rgb(235, 243, 249), rgb(214, 222, 228));
61+
}
62+
63+
:root.dark &::before {
64+
background: linear-gradient(to bottom, transparent, var(--sk-back-1)),
65+
radial-gradient(
66+
64.14% 72.25% at 47.58% 31.75%,
67+
hsl(209deg 6% 47% / 52%) 0%,
68+
hsla(0, 0%, 100%, 0) 100%
69+
),
70+
linear-gradient(
71+
92.4deg,
72+
hsl(210, 7%, 16%) 14.67%,
73+
hsl(0deg 0% 0% / 48%) 54.37%,
74+
hsla(207, 22%, 13%, 0.62) 92.49%
75+
),
76+
linear-gradient(0deg, hsl(204, 38%, 20%), hsl(204, 10%, 90%));
77+
}
6478
}
6579
6680
.hero-content {
@@ -69,78 +83,35 @@
6983
align-items: center;
7084
gap: 1rem;
7185
margin-bottom: 4rem;
86+
text-align: center;
7287
}
7388
74-
strong {
75-
font-size: var(--sk-font-size-h2);
76-
text-align: center;
77-
font-family: var(--sk-font-heading);
78-
text-transform: lowercase;
79-
font-weight: 400;
80-
color: var(--sk-text-2);
81-
line-height: 1.2;
89+
h1 {
90+
max-width: 9em;
8291
}
8392
84-
.buttons {
85-
display: flex;
86-
gap: 1rem;
87-
align-items: center;
93+
.machine img {
94+
position: absolute;
95+
pointer-events: none;
96+
width: 100%;
97+
height: auto;
8898
}
8999
90100
.cta {
91-
display: flex;
92-
align-items: center;
93-
gap: 0.1rem;
94-
background: var(--sk-theme-1);
95-
padding: 0.35em 0.8em;
96101
font-family: var(--sk-font-ui);
97102
font-size: var(--sk-font-size-ui-medium);
98-
font-weight: 600;
99-
white-space: nowrap;
100-
border-radius: var(--sk-border-radius);
101-
box-shadow: 0px 6px 14px rgba(0, 0, 0, 0.08);
102-
color: #fff;
103-
transition: 0.5s var(--quint-out);
104-
transition-property: box-shadow, color;
105-
}
106-
107-
.cta:hover {
108-
text-decoration: none;
109-
box-shadow:
110-
0px 0.8px 3.8px rgba(0, 0, 0, 0.115),
111-
0px 6px 30px rgba(0, 0, 0, 0.23);
112-
}
113-
114-
.cta.basic {
115-
background-color: var(--sk-back-5);
116-
color: var(--sk-text-1);
117-
}
118-
119-
.logotype {
120-
width: min(45vw, 40em);
121-
height: auto;
103+
color: var(--sk-theme-1);
104+
text-transform: uppercase;
122105
}
123106
124107
@media (min-width: 800px) {
125108
.hero-content {
126109
--width: clamp(60rem, 50vw, 80rem);
110+
align-items: start;
127111
position: absolute;
128-
display: grid;
129-
grid-template-columns: 1fr 1fr;
130-
grid-column-gap: 4rem;
131-
grid-row-gap: 2rem;
132112
width: var(--width);
133113
left: calc(0.5 * (100% - min(100vw, 120rem)) + var(--sk-page-padding-side));
134-
top: 6rem;
135-
font-size: 0.9em;
136-
}
137-
138-
.logotype {
139-
width: 100%;
140-
justify-self: end;
141-
}
142-
143-
strong {
114+
top: calc(8vw - 2rem);
144115
text-align: left;
145116
}
146117
@@ -152,33 +123,12 @@
152123
153124
@media (min-width: 1400px) {
154125
.hero-content {
155-
grid-template-columns: 1fr;
156-
width: calc(0.5 * var(--width));
157-
top: 6vw;
126+
/* top: 6vw; */
158127
}
159128
160129
.hero {
161130
height: calc(10rem + 20vw);
162131
padding: 10rem 0 0 0;
163132
}
164133
}
165-
166-
:global(html.dark) .hero {
167-
background: radial-gradient(
168-
64.14% 72.25% at 47.58% 31.75%,
169-
hsl(209deg 6% 47% / 52%) 0%,
170-
hsla(0, 0%, 100%, 0) 100%
171-
),
172-
linear-gradient(
173-
92.4deg,
174-
hsl(210, 7%, 16%) 14.67%,
175-
hsl(0deg 0% 0% / 48%) 54.37%,
176-
hsla(207, 22%, 13%, 0.62) 92.49%
177-
),
178-
linear-gradient(0deg, hsl(204, 38%, 20%), hsl(204, 10%, 90%));
179-
}
180-
181-
:global(html.dark) .logotype {
182-
filter: invert(4) brightness(1.2);
183-
}
184134
</style>

apps/svelte.dev/src/routes/tutorial/[slug]/Menu.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/** @type {import('$lib/tutorial').Exercise} */
1414
export let current;
1515
16-
const is_mobile = mql('(max-width: 800px)');
16+
const is_mobile = mql('(max-width: 799px)');
1717
1818
const duration = $reduced_motion ? 0 : 200;
1919
@@ -401,7 +401,7 @@
401401
outline-offset: -2px;
402402
}
403403
404-
@media screen and (max-width: 800px) {
404+
@media screen and (max-width: 799px) {
405405
.container {
406406
border-right: none;
407407
}

apps/svelte.dev/src/routes/tutorial/[slug]/Sidebar.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@
224224
line-height: 1;
225225
}
226226
227-
@media (max-width: 800px) {
227+
@media (max-width: 799px) {
228228
.text {
229229
border-right: none;
230230
}

packages/site-kit/src/lib/components/Banner.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
display: none;
118118
}
119119
120-
@media screen and (max-width: 800px) {
120+
@media screen and (max-width: 799px) {
121121
.banner-bottom {
122122
bottom: initial;
123123
top: 0;

packages/site-kit/src/lib/components/Section.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010

1111
<style>
1212
section {
13+
position: relative;
1314
padding: 6rem 0;
14-
background: var(--background, white);
15+
background: var(--background, transparent);
1516
}
1617
1718
section::after {

packages/site-kit/src/lib/components/Shell.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ The main shell of the application. It provides a slot for the top navigation, th
7878
overflow-x: hidden;
7979
}
8080
81-
@media (max-width: 800px) {
81+
@media (max-width: 799px) {
8282
main {
8383
padding-top: var(--sk-banner-bottom-height);
8484
padding-bottom: 0;

packages/site-kit/src/lib/home/Blurb.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
let { one, two, three }: { one?: Snippet; two?: Snippet; three?: Snippet } = $props();
66
</script>
77

8-
<Section --background="var(--sk-back-1)">
8+
<Section>
99
<div class="grid">
1010
{#if one}
1111
<div>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Top navigation bar for the application. It provides a slot for the left side, th
172172
font-size: var(--sk-font-size-ui-small);
173173
}
174174
175-
@media (max-width: 800px) {
175+
@media (max-width: 799px) {
176176
nav:not(.visible):not(:focus-within) {
177177
transform: translate(0, calc(var(--sk-nav-height)));
178178
}

0 commit comments

Comments
 (0)