-
Notifications
You must be signed in to change notification settings - Fork 220
/
+page.svelte
242 lines (235 loc) · 8.21 KB
/
+page.svelte
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<script lang="ts">
import { MainFooter } from '$lib/components';
import { DEFAULT_HOST } from '$lib/utils/metadata';
import { DOCS_TITLE_SUFFIX } from '$routes/titles';
type QuickStart = {
title: string;
icon: string;
image: string;
href: string;
};
type QuickStarts = Array<{
title: string;
quickStarts: QuickStart[];
}>;
const quickStarts: QuickStarts = [
{
title: 'Web app',
quickStarts: [
{
title: 'Web',
icon: 'icon-js',
image: '/images/blog/placeholder.png',
href: 'web'
},
{
title: 'Next.js',
icon: 'icon-nextjs',
image: '/images/blog/placeholder.png',
href: 'nextjs'
},
{
title: 'React',
icon: 'icon-react',
image: '/images/blog/placeholder.png',
href: 'react'
},
{
title: 'Vue.js',
icon: 'web-icon-vue',
image: '/images/blog/placeholder.png',
href: 'vue'
},
{
title: 'Nuxt',
icon: 'web-icon-nuxt',
image: '/images/blog/placeholder.png',
href: 'nuxt'
},
{
title: 'SvelteKit',
icon: 'icon-svelte',
image: '/images/blog/placeholder.png',
href: 'sveltekit'
},
{
title: 'Refine',
icon: 'web-icon-refine',
image: '/images/blog/placeholder.png',
href: 'refine'
},
{
title: 'Angular',
icon: 'icon-angular',
image: '/images/blog/placeholder.png',
href: 'angular'
},
{
title: 'Solid',
icon: 'icon-solidjs',
image: '/images/blog/placeholder.png',
href: 'solid'
}
]
},
{
title: 'Mobile and native',
quickStarts: [
{
title: 'React Native',
icon: 'icon-react-native',
image: '/images/blog/placeholder.png',
href: 'react-native'
},
{
title: 'Flutter',
icon: 'icon-flutter',
image: '/images/blog/placeholder.png',
href: 'flutter'
},
{
title: 'Apple',
icon: 'icon-apple',
image: '/images/blog/placeholder.png',
href: 'apple'
},
{
title: 'Android',
icon: 'icon-android',
image: '/images/blog/placeholder.png',
href: 'android'
}
]
},
{
title: 'Server',
quickStarts: [
{
title: 'Node.js',
icon: 'icon-node_js',
image: '/images/blog/placeholder.png',
href: 'node'
},
{
title: 'Python',
icon: 'icon-python',
image: '/images/blog/placeholder.png',
href: 'python'
},
{
title: 'Dart',
icon: 'icon-dart',
image: '/images/blog/placeholder.png',
href: 'dart'
},
{
title: 'PHP',
icon: 'icon-php',
image: '/images/blog/placeholder.png',
href: 'php'
},
{
title: 'Ruby',
icon: 'icon-ruby',
image: '/images/blog/placeholder.png',
href: 'ruby'
},
{
title: '.NET',
icon: 'icon-dotnet',
image: '/images/blog/placeholder.png',
href: 'dotnet'
},
{
title: 'Deno',
icon: 'icon-deno',
image: '/images/blog/placeholder.png',
href: 'deno'
},
{
title: 'Go',
icon: 'icon-go',
image: '/images/blog/placeholder.png',
href: 'go'
},
{
title: 'Swift',
icon: 'icon-swift',
image: '/images/blog/placeholder.png',
href: 'swift'
},
{
title: 'Kotlin',
icon: 'icon-kotlin',
image: '/images/blog/placeholder.png',
href: 'kotlin'
}
]
}
];
const title = 'Quick starts' + DOCS_TITLE_SUFFIX;
const description =
'Get started with your favorite framework and language in just a few clicks.';
const ogImage = DEFAULT_HOST + '/images/open-graph/docs.png';
</script>
<svelte:head>
<!-- Titles -->
<title>{title}</title>
<meta property="og:title" content={title} />
<meta name="twitter:title" content={title} />
<!-- Description -->
<meta name="description" content={description} />
<meta property="og:description" content={description} />
<meta name="twitter:description" content={description} />
<!-- Image -->
<meta property="og:image" content={ogImage} />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta name="twitter:image" content={ogImage} />
<meta name="twitter:card" content="summary_large_image" />
</svelte:head>
<main class="web-main-section" id="main">
<article class="web-article">
<header class="web-article-header">
<div class="web-article-header-start web-u-cross-start flex flex-col">
<div class="relative flex items-center">
<h1 class="text-title font-aeonik-pro">Quick start</h1>
</div>
</div>
<div class="web-article-header-end" />
</header>
<div class="web-article-content web-u-gap-80">
{#each quickStarts as category}
<section class="flex flex-col gap-6">
<h2 class="text-micro uppercase">{category.title}</h2>
<ul class="web-grid-row-4 web-grid-row-4-mobile-2">
{#each category.quickStarts as quickStart}
<li class="is-mobile-col-span-2">
<a
href={`/docs/quick-starts/${quickStart.href}`}
class="web-card is-normal"
>
<header class="flex items-baseline gap-1">
<span
class="{quickStart.icon} web-u-font-size-24"
aria-hidden="true"
/>
<h4 class="text-sub-body text-primary font-medium">
{quickStart.title}
</h4>
</header>
</a>
</li>
{/each}
</ul>
</section>
{/each}
</div>
</article>
<MainFooter variant="docs" />
</main>
<style lang="scss">
.web-media {
aspect-ratio: 16/9;
}
</style>