Skip to content

Commit e4ef00e

Browse files
authored
feat: homepage (#52)
* homepage WIP * tweaks * gitignore generated supporters, prettier-ignore json file * oops wrong prettierignore file * deduplicate vite versions * fix type errors * runes * rename folder
1 parent ab0982f commit e4ef00e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+2255
-713
lines changed

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ node_modules
44
dist
55
pnpm-lock.yaml
66
.vercel
7-
_generated.md
7+
_generated.md
8+
land-110m.json

apps/svelte.dev/.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
/.vercel
33
/package
44
/src/lib/generated
5-
/src/routes/_components/Supporters/contributors.js
6-
/src/routes/_components/Supporters/donors.js
7-
/static/svelte-app.json
5+
/src/routes/_home/Supporters/contributors.jpg
6+
/src/routes/_home/Supporters/contributors.js
7+
/src/routes/_home/Supporters/donors.jpg
8+
/src/routes/_home/Supporters/donors.js
9+
/static/svelte-app.json

apps/svelte.dev/.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
_generated.md
22
scripts/create-tutorial-zip/common/.svelte-kit
3+
land-110m.json

apps/svelte.dev/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,31 @@
3737
"@rich_harris/svelte-split-pane": "^1.1.3",
3838
"@supabase/supabase-js": "^2.43.4",
3939
"@sveltejs/repl": "workspace:*",
40+
"@types/d3-geo": "^3.1.0",
4041
"@vercel/speed-insights": "^1.0.0",
4142
"@webcontainer/api": "^1.1.5",
4243
"adm-zip": "^0.5.10",
4344
"ansi-to-html": "^0.7.2",
4445
"base64-js": "^1.5.1",
4546
"codemirror": "^6.0.1",
4647
"cookie": "^0.6.0",
48+
"d3-geo": "^3.1.0",
49+
"d3-geo-projection": "^4.0.0",
4750
"devalue": "^5.0.0",
4851
"do-not-zip": "^1.0.0",
4952
"flexsearch": "^0.7.43",
5053
"flru": "^1.0.2",
5154
"port-authority": "^2.0.1",
5255
"prism-svelte": "^0.5.0",
5356
"prismjs": "^1.29.0",
57+
"topojson-client": "^3.1.0",
5458
"ws": "^8.13.0",
5559
"yootils": "^0.3.1"
5660
},
5761
"devDependencies": {
5862
"@resvg/resvg-js": "^2.6.2",
5963
"@sveltejs/adapter-vercel": "^5.3.1",
64+
"@sveltejs/enhanced-img": "^0.3.0",
6065
"@sveltejs/kit": "^2.5.15",
6166
"@sveltejs/site-kit": "workspace:*",
6267
"@sveltejs/vite-plugin-svelte": "4.0.0-next.3",

apps/svelte.dev/scripts/get_contributors.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const force = process.env.FORCE_UPDATE === 'true';
1010
const __dirname = dirname(fileURLToPath(import.meta.url));
1111
process.chdir(__dirname);
1212

13-
// ../src/routes/_components/Supporters/contributors.js
14-
const outputFile = new URL(`../src/routes/_components/Supporters/contributors.js`, import.meta.url);
13+
// ../src/routes/_home/Supporters/contributors.js
14+
const outputFile = new URL(`../src/routes/_home/Supporters/contributors.js`, import.meta.url);
1515

1616
try {
1717
if (!force && (await stat(outputFile))) {
@@ -65,9 +65,7 @@ try {
6565
await sprite
6666
.quality(80)
6767
.writeAsync(
68-
fileURLToPath(
69-
new URL(`../src/routes/_components/Supporters/contributors.jpg`, import.meta.url)
70-
)
68+
fileURLToPath(new URL(`../src/routes/_home/Supporters/contributors.jpg`, import.meta.url))
7169
);
7270

7371
const str = `[\n\t${authors.map((a) => `'${a.login}'`).join(',\n\t')}\n]`;

apps/svelte.dev/scripts/get_donors.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const force = process.env.FORCE_UPDATE === 'true';
1010
const __dirname = dirname(fileURLToPath(import.meta.url));
1111
process.chdir(__dirname);
1212

13-
const outputFile = new URL(`../src/routes/_components/Supporters/donors.js`, import.meta.url);
13+
const outputFile = new URL(`../src/routes/_home/Supporters/donors.js`, import.meta.url);
1414

1515
try {
1616
if (!force && (await stat(outputFile))) {
@@ -59,7 +59,7 @@ try {
5959
await sprite
6060
.quality(80)
6161
.writeAsync(
62-
fileURLToPath(new URL(`../src/routes/_components/Supporters/donors.jpg`, import.meta.url))
62+
fileURLToPath(new URL(`../src/routes/_home/Supporters/donors.jpg`, import.meta.url))
6363
);
6464

6565
const str = `[\n\t${included.map((a) => `${JSON.stringify(a.backer.name)}`).join(',\n\t')}\n]`;

apps/svelte.dev/src/ambient.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
11
declare module 'do-not-zip';
2+
declare module 'd3-geo-projection';
3+
declare module 'topojson-client';
4+
5+
// remove this once enhanced-img fixed its ambient types
6+
declare module '*?enhanced' {
7+
import type { Picture } from 'vite-imagetools';
8+
const value: Picture;
9+
export default value;
10+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<title>{name} • REPL • Svelte</title>
6868

6969
<meta name="twitter:title" content="{data.gist.name} • REPL • Svelte" />
70-
<meta name="twitter:description" content="Cybernetically enhanced web apps" />
70+
<meta name="twitter:description" content="Web development, but fun" />
7171
<meta name="Description" content="Interactive Svelte playground" />
7272
</svelte:head>
7373

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<title>{data.gist.name} • REPL • Svelte</title>
5858

5959
<meta name="twitter:title" content="{data.gist.name} • REPL • Svelte" />
60-
<meta name="twitter:description" content="Cybernetically enhanced web apps" />
60+
<meta name="twitter:description" content="Web development, but fun" />
6161
<meta name="Description" content="Interactive Svelte playground" />
6262
</svelte:head>
6363

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

Lines changed: 113 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,125 @@
11
<script>
22
import { Blurb, Footer, TrySection } from '@sveltejs/site-kit/home';
3-
import Demo from './_components/Demo.svelte';
4-
import Hero from './_components/Hero.svelte';
5-
import Supporters from './_components/Supporters/index.svelte';
6-
import WhosUsingSvelte from './_components/WhosUsingSvelte/index.svelte';
3+
import Hero from './_home/Hero.svelte';
4+
import Supporters from './_home/Supporters/index.svelte';
5+
import WhosUsingSvelte from './_home/WhosUsingSvelte/index.svelte';
6+
import Svelte from './_home/Svelte.svelte';
7+
import Features from './_home/Features.svelte';
8+
import Deployment from './_home/Deployment.svelte';
9+
import Showcase from './_home/Showcase.svelte';
10+
import './_home/common.css';
11+
import HeroSvelteKit from './_home/HeroSvelteKit.svelte';
712
</script>
813

914
<svelte:head>
10-
<title>Svelte • Cybernetically enhanced web apps</title>
15+
<title>Svelte • Web development, but fun</title>
1116

1217
<meta name="twitter:title" content="Svelte" />
13-
<meta name="twitter:description" content="Cybernetically enhanced web apps" />
14-
<meta name="Description" content="Cybernetically enhanced web apps" />
18+
<meta name="twitter:description" content="Web development, but fun" />
19+
<meta name="Description" content="Web development, but fun" />
1520
</svelte:head>
1621

17-
<h1 class="visually-hidden">Svelte</h1>
18-
19-
<Hero />
20-
21-
<Blurb --background="var(--sk-back-1)">
22-
{#snippet one()}
23-
<div>
24-
<h2>compiled</h2>
25-
<p>
26-
Svelte shifts as much work as possible out of the browser and into your build step. No more
27-
manual optimisations — just faster, more efficient apps.
28-
</p>
29-
</div>
30-
{/snippet}
31-
32-
{#snippet two()}
33-
<div>
34-
<h2>compact</h2>
35-
<p>
36-
Write breathtakingly concise components using languages you already know — HTML, CSS and
37-
JavaScript. Oh, and your application bundles will be tiny as well.
38-
</p>
39-
</div>
40-
{/snippet}
41-
42-
{#snippet three()}
43-
<div>
44-
<h2>complete</h2>
45-
<p>
46-
Built-in scoped styling, state management, motion primitives, form bindings and more — don't
47-
waste time trawling npm for the bare essentials. It's all here.
48-
</p>
49-
</div>
50-
{/snippet}
51-
</Blurb>
52-
53-
<TrySection />
54-
55-
<Demo />
56-
57-
<WhosUsingSvelte />
58-
59-
<Supporters />
60-
61-
<Footer
62-
links={{
63-
resources: [
64-
{
65-
title: 'documentation',
66-
href: '/docs'
67-
},
68-
{
69-
title: 'tutorial',
70-
href: '/tutorial'
71-
},
72-
{
73-
title: 'repl',
74-
href: '/repl'
75-
},
76-
{
77-
title: 'blog',
78-
href: '/blog'
79-
}
80-
],
81-
connect: [
82-
{
83-
title: 'github',
84-
href: 'https://github.com/sveltejs/svelte'
85-
},
86-
{
87-
title: 'opencollective',
88-
href: 'https://opencollective.com/svelte'
89-
},
90-
{
91-
title: 'discord',
92-
href: '/chat'
93-
},
94-
{
95-
title: 'twitter',
96-
href: 'https://twitter.com/sveltejs'
97-
}
98-
]
99-
}}
100-
>
101-
{#snippet license()}
102-
<span>
103-
Svelte is <a href="https://github.com/sveltejs/svelte">free and open source software</a> released
104-
under the MIT license
105-
</span>
106-
{/snippet}
107-
</Footer>
22+
<div class="home">
23+
<h1 class="visually-hidden">Svelte</h1>
24+
25+
<Hero />
26+
27+
<Blurb --background="var(--sk-back-1)">
28+
{#snippet one()}
29+
<div>
30+
<h2>fast</h2>
31+
<p>
32+
Svelte shifts as much work as possible out of the browser and into your build step. No
33+
more manual optimisations — just faster, smaller and more efficient apps.
34+
</p>
35+
</div>
36+
{/snippet}
37+
38+
{#snippet two()}
39+
<div>
40+
<h2>fun</h2>
41+
<p>
42+
Write concise components using languages you already know — HTML, CSS and JavaScript. Get
43+
things done without fighting the framework. Code with joy.
44+
</p>
45+
</div>
46+
{/snippet}
47+
48+
{#snippet three()}
49+
<div>
50+
<h2>flexible</h2>
51+
<p>
52+
Svelte scales from tiny widgets all the way to big full-stack applications. State
53+
management, motion primitives, form bindings and more — all built-in.
54+
</p>
55+
</div>
56+
{/snippet}
57+
</Blurb>
58+
59+
<TrySection />
60+
61+
<Svelte />
62+
63+
<HeroSvelteKit />
64+
65+
<Features />
66+
67+
<Deployment />
68+
69+
<Showcase />
70+
71+
<WhosUsingSvelte />
72+
73+
<Supporters />
74+
75+
<Footer
76+
links={{
77+
resources: [
78+
{
79+
title: 'documentation',
80+
href: '/docs'
81+
},
82+
{
83+
title: 'tutorial',
84+
href: '/tutorial'
85+
},
86+
{
87+
title: 'repl',
88+
href: '/repl'
89+
},
90+
{
91+
title: 'blog',
92+
href: '/blog'
93+
}
94+
],
95+
connect: [
96+
{
97+
title: 'github',
98+
href: 'https://github.com/sveltejs/svelte'
99+
},
100+
{
101+
title: 'opencollective',
102+
href: 'https://opencollective.com/svelte'
103+
},
104+
{
105+
title: 'discord',
106+
href: '/chat'
107+
},
108+
{
109+
title: 'twitter',
110+
href: 'https://twitter.com/sveltejs'
111+
}
112+
]
113+
}}
114+
>
115+
{#snippet license()}
116+
<span>
117+
Svelte is <a href="https://github.com/sveltejs/svelte">free and open source software</a> released
118+
under the MIT license
119+
</span>
120+
{/snippet}
121+
</Footer>
122+
</div>
108123

109124
<style>
110125
h2 {

0 commit comments

Comments
 (0)