Skip to content

Commit 8667f0f

Browse files
authored
add teaser page (#9210)
* add teaser page * add origin * host card externally * fix * remove unused styles * redesign * black bg * fix og image * tweak font-sizes and alignment --------- Co-authored-by: Rich Harris <[email protected]>
1 parent a5cde37 commit 8667f0f

File tree

2 files changed

+100
-1
lines changed

2 files changed

+100
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</script>
1111

1212
<svelte:head>
13-
{#if $page.route.id !== '/blog/[slug]'}
13+
{#if !$page.route.id.startsWith('/blog/')}
1414
<meta name="twitter:card" content="summary" />
1515
<meta name="twitter:image" content="https://svelte.dev/images/twitter-thumbnail.jpg" />
1616
<meta name="og:image" content="https://svelte.dev/images/twitter-thumbnail.jpg" />
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<svelte:head>
2+
<title>Something magical is coming</title>
3+
4+
<meta name="twitter:card" content="summary_large_image" />
5+
<meta name="twitter:title" content="Something magical is coming" />
6+
<meta
7+
name="twitter:description"
8+
content="We've got something to show you. We think you're going to like it."
9+
/>
10+
<meta
11+
name="Description"
12+
content="We've got something to show you. We think you're going to like it."
13+
/>
14+
15+
<meta
16+
name="twitter:image"
17+
content="https://sveltejs.github.io/assets/artwork/svelte-5-teaser.jpg"
18+
/>
19+
<meta name="og:image" content="https://sveltejs.github.io/assets/artwork/svelte-5-teaser.jpg" />
20+
</svelte:head>
21+
22+
<div class="teaser">
23+
<div class="copy">
24+
<div class="copy-inner">
25+
<h1>Something magical is coming</h1>
26+
<p>We've got something to show you. We think you're going to like it.</p>
27+
<p>
28+
Join us here on <strong>Wednesday September 20</strong> for a glimpse at the future of Svelte.
29+
</p>
30+
</div>
31+
</div>
32+
</div>
33+
34+
<style>
35+
.teaser {
36+
display: flex;
37+
flex-direction: column;
38+
justify-content: end;
39+
position: absolute;
40+
left: 0;
41+
top: 0;
42+
width: 100%;
43+
height: 100%;
44+
background-color: black;
45+
background-image: url(https://sveltejs.github.io/assets/artwork/svelte-5-teaser-background.jpg);
46+
background-size: cover;
47+
background-position: center;
48+
}
49+
50+
.copy {
51+
padding: var(--sk-page-padding-top) var(--sk-page-padding-side) 6rem var(--sk-page-padding-side);
52+
width: 100%;
53+
margin: 0 auto;
54+
color: white;
55+
background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
56+
padding-bottom: 8rem;
57+
}
58+
59+
.copy-inner {
60+
max-width: 70rem;
61+
margin: 0 auto;
62+
}
63+
64+
h1,
65+
p {
66+
color: white;
67+
}
68+
69+
h1 {
70+
margin: 0 0 0em 0;
71+
line-height: 1.2;
72+
max-width: 9em;
73+
font-size: 4rem;
74+
}
75+
76+
p {
77+
margin: 0.5em 0;
78+
text-wrap: balance;
79+
}
80+
81+
strong {
82+
white-space: nowrap;
83+
}
84+
85+
@media (min-width: 600px) {
86+
h1 {
87+
max-width: none;
88+
}
89+
}
90+
91+
@media (min-width: 800px) {
92+
h1 {
93+
font-size: 5.4rem;
94+
}
95+
p {
96+
font-size: 2rem;
97+
}
98+
}
99+
</style>

0 commit comments

Comments
 (0)