This repository has been archived by the owner on Apr 30, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.svelte
226 lines (210 loc) · 6.26 KB
/
index.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
<script>
// index.svelte has to be as self-contained as possible
// so users can easily remove it
import Typewriter from 'svelte-typewriter';
import Config from '$lib/SveltePress/sveltePress.config';
import ArrowRight32 from 'carbon-icons-svelte/lib/ArrowRight32';
import ArrowDown32 from 'carbon-icons-svelte/lib/ArrowDown32';
import { session } from '$app/stores';
$: nav = Config.nav.overwrite
? Config.nav.items || []
: $session.get('navbar').concat(Config.nav.items || []);
let currentYear = new Date().getFullYear();
// Typewriter
let people = ['humans', 'you', 'your relatives', 'everyone'];
// Logo animation
import { draw } from 'svelte/transition';
let duration = 4000;
let delay = 200;
let condition = false;
let finished = false;
setTimeout(() => (condition = true));
setTimeout(() => {
finished = true;
}, duration - 200); // Fill colors a bit earlier
</script>
<svelte:head>
<meta name="og:title" content={Config.title} />
<title>{Config.title}</title>
</svelte:head>
<div class="-mt-18">
<div class="hero min-h-screen bg-base-100">
<div class="text-center hero-content">
<div class="max-w-md flex flex-col justify-center items-center">
<svg
shape-rendering="auto"
width="250"
height="250"
viewBox="0 0 1000 1000"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<filter id="null">
<feBlend mode="normal" in="SourceGraphic" />
</filter>
</defs>
<g filter="url(#null)">
{#if condition}
<path
class:filled-1={finished}
in:draw={{ duration, delay }}
d="M250 250v250h500v250H0v150a100 100 0 00100 100h800a100 100 0 00100-100V250H250z"
fill="#ffd0bf"
/><path
class:filled-2={finished}
in:draw={{ duration, delay }}
d="M100 0A100 100 0 000 100v650h750V500H250V250h750V100A100 100 0 00900 0H100z"
fill="#ff3e00"
/>
{/if}
</g>
</svg>
<h1 class="my-5 text-4xl font-bold">Welcome to SveltePress</h1>
<p class="mb-5 flex flex-row justify-center">
Documentation for
<Typewriter loop={3000} cursor="#ff3e00">
{#each people as person}
<span>{person}.</span>
{/each}
{' '}
</Typewriter>
</p>
<a
class="btn btn-primary flex flex-row justify-between"
href={nav.length > 0 ? nav[0].link : $session.get('navbar')[0]?.link}
><span>Let's get started</span><ArrowRight32 /></a
>
</div>
</div>
<ArrowDown32 class="animate-bounce w-12 h-12 self-end" />
</div>
<div class="flex flex-col justify-between bg-neutral-focus py-4 md:flex-row">
<div class="card shadow m-4">
<div class="card-body">
<h2 class="card-title">Powered by SvelteKit</h2>
<p>
SveltePress is built on top of SvelteKit, a powerful web framework, while taking advantage
of Svelte's incredible performance and simplicity.
</p>
</div>
</div>
<div class="card shadow m-4">
<div class="card-body">
<h2 class="card-title">Made for humans</h2>
<p>
Markdown files are structured according to the filesystem, shrinking the gap between File
Manager and content creator.
</p>
</div>
</div>
<div class="card shadow m-4">
<div class="card-body">
<h2 class="card-title">Customizability</h2>
<p>
Replacable themes, markdown converters, components, pages, functions... SveltePress was
made for you.
</p>
</div>
</div>
</div>
<div class="flex h-full w-full flex-col justify-between p-8">
<div class="flex flex-col md:flex-row justify-around my-4">
<div class="max-w-full flex justify-center flex-0">
<img
class="max-w-full"
alt="a terminal showing the output of the tree command, output includes a file structure of markdown files and SveltePress sidebar generated using the previous structure"
src="https://i.imgur.com/KidDqUy.png"
/>
</div>
<div class="self-center card shadow-2xl bg-primary flex justify-center m-4 max-w-150">
<div class="card-body">
<h2 class="card-title">Filesystem based Structure</h2>
<p>Folders become categories, files become posts. Simple as that.</p>
</div>
</div>
</div>
<div class="flex flex-col-reverse md:flex-row justify-around my-4">
<div class="self-center card shadow-2xl m-4 mb-8 bg-secondary text-black m-4 max-w-150">
<div class="card-body">
<h2 class="card-title">Themable</h2>
<p>
With a theming API with almost zero restrictions, you can modify everything to fit your
needs.
</p>
</div>
</div>
<div class="max-w-3xl flex justify-center flex-0">
<img
class="max-w-full"
alt="the cakepop official theme in front of the carbon one"
src="https://i.imgur.com/SG5iPrc.png"
/>
</div>
</div>
<div class="flex flex-col md:flex-row justify-around my-4">
<div class="max-w-3xl flex justify-center m-4">
<img
alt="screenshots of multiple guis of sveltepress (gtk, qt, flutter (desktop & mobile)"
src="https://i.imgur.com/YCuLvMP.png"
/>
</div>
<div class="self-center card shadow-2xl m-4 mb-8 bg-primary m-4 max-w-150">
<div class="card-body">
<h2 class="card-title">Compile to native</h2>
<p>
Desktop, Mobile, e-books & more. With the power of Flutter, GTK, QT & Pandoc you can
target Web, Linux, MacOS, Windows, Andoird, iOS, .epub, .pdf, .docx & a whole lot more
from one codebase.
</p>
</div>
</div>
</div>
</div>
<footer class="p-4 footer bg-base-300 text-base-content footer-center">
<div class="flex flex-row">
<span class="pd" /> 2021{currentYear === 2021 ? '' : ' - ' + currentYear} -
<a class="sp--link" href="https://geopjr.dev/">GeopJr</a>
</div>
</footer>
</div>
<style>
.pd {
display: inline-flex;
width: 18px;
height: 18px;
vertical-align: middle;
text-align: center;
justify-content: center;
}
.pd::after {
content: '🚫';
display: block;
position: absolute;
font-size: 100%;
}
.pd::before {
content: '\00a9';
display: block;
position: absolute;
font-size: 100%;
}
footer {
font-weight: bold;
text-align: center;
padding: 0 2rem 2rem;
}
path {
stroke: black;
fill: white;
transition: 1.5s;
stroke-width: 15;
}
path.filled-1 {
stroke: unset;
fill: #ffd0bf;
}
path.filled-2 {
stroke: unset;
fill: #ff3e00;
}
</style>