Skip to content

Commit 99cd313

Browse files
committed
bring back the animated splash screen
1 parent 353e4ef commit 99cd313

File tree

3 files changed

+30
-10
lines changed

3 files changed

+30
-10
lines changed

frontend/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!doctype html>
2-
<html lang="en">
2+
<html lang="en" BGCOLOR="black">
33
<head>
44
<meta charset="UTF-8" />
55
<link rel="icon" href="/app.webp" />

frontend/src/splash.tsx

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,8 @@ export const Splash: Component<
805805
width: 100%;
806806
height: 100%;
807807
808+
--animation: cubic-bezier(0.25, 0, 0.25, 1);
809+
808810
.splash, .blur, .main {
809811
position: absolute;
810812
width: 100%;
@@ -819,9 +821,15 @@ export const Splash: Component<
819821
}
820822
821823
.blur {
822-
backdrop-filter: blur(0.5vw);
823-
background-color: color-mix(in srgb, var(--bg) 40%, transparent);
824+
backdrop-filter: blur(1rem);
825+
background-color: color-mix(in srgb, var(--bg) 35%, transparent);
824826
z-index: 102;
827+
transition: backdrop-filter .65s var(--animation) 0.35s, background-color .65s var(--animation) 0.35s;
828+
829+
@starting-style {
830+
backdrop-filter: blur(2.5rem);
831+
background-color: color-mix(in srgb, var(--bg) 80%, transparent);
832+
}
825833
}
826834
827835
.main {
@@ -834,6 +842,7 @@ export const Splash: Component<
834842
.container {
835843
backdrop-filter: blur(0.5vw);
836844
background-color: color-mix(in srgb, var(--bg) 80%, transparent);
845+
box-shadow: 0px 0px 20px color-mix(in srgb, var(--surface0) 40%, transparent);
837846
width: min(40rem, 100%);
838847
margin: 0 1rem;
839848
padding: 1.3em;
@@ -844,6 +853,17 @@ export const Splash: Component<
844853
display: flex;
845854
flex-direction: column;
846855
gap: 0.5rem;
856+
857+
opacity: 1;
858+
transform: translateY(0vh) rotate3d(1, 0, 0, 0);
859+
transition: opacity .65s var(--animation) 0.35s, transform .65s var(--animation) 0.35s;
860+
transform-origin: 50% 0%;
861+
perspective: 1250px;
862+
863+
@starting-style {
864+
opacity: 0;
865+
transform: translateY(5vh) rotate3d(1, 0, 0, 15deg);
866+
}
847867
}
848868
849869
.logo {

frontend/src/styles.css

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ body.error {
191191
url("/fonts/display/Renogare.woff2") format("woff2");
192192
font-weight: normal bold;
193193
font-style: normal italic;
194-
font-display: block;
194+
font-display: swap;
195195
}
196196

197197
@font-face {
@@ -203,7 +203,7 @@ body.error {
203203
url("/fonts/body/AdwaitaSans-Regular.ttf") format("truetype");
204204
font-weight: 100 900;
205205
font-style: normal;
206-
font-display: block;
206+
font-display: swap;
207207
}
208208

209209
@font-face {
@@ -215,7 +215,7 @@ body.error {
215215
url("/fonts/body/AdwaitaSans-Italic.ttf") format("truetype");
216216
font-weight: 100 900;
217217
font-style: italic;
218-
font-display: block;
218+
font-display: swap;
219219
}
220220

221221
@font-face {
@@ -227,7 +227,7 @@ body.error {
227227
url("/fonts/mono/AdwaitaMono-Regular.ttf") format("truetype");
228228
font-weight: normal;
229229
font-style: normal;
230-
font-display: block;
230+
font-display: swap;
231231
}
232232

233233
@font-face {
@@ -239,7 +239,7 @@ body.error {
239239
url("/fonts/mono/AdwaitaMono-Italic.ttf") format("truetype");
240240
font-weight: normal;
241241
font-style: italic;
242-
font-display: block;
242+
font-display: swap;
243243
}
244244

245245
@font-face {
@@ -251,7 +251,7 @@ body.error {
251251
url("/fonts/mono/AdwaitaMono-Bold.ttf") format("truetype");
252252
font-weight: bold;
253253
font-style: normal;
254-
font-display: block;
254+
font-display: swap;
255255
}
256256

257257
@font-face {
@@ -263,7 +263,7 @@ body.error {
263263
url("/fonts/mono/AdwaitaMono-BoldItalic.ttf") format("truetype");
264264
font-weight: bold;
265265
font-style: italic;
266-
font-display: block;
266+
font-display: swap;
267267
}
268268

269269
h1,

0 commit comments

Comments
 (0)