Skip to content

Commit d654f8d

Browse files
committed
Moved styles to svelte files
1 parent 6a3aee0 commit d654f8d

File tree

5 files changed

+123
-112
lines changed

5 files changed

+123
-112
lines changed

src/lib/styles/anim.svelte

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<style>
2+
:global {
3+
@keyframes flash {
4+
0% {
5+
opacity: 1;
6+
}
7+
50% {
8+
opacity: 0.5;
9+
}
10+
100% {
11+
opacity: 1;
12+
}
13+
}
14+
15+
@keyframes fade-in {
16+
0% {
17+
opacity: 0;
18+
}
19+
100% {
20+
opacity: 1;
21+
}
22+
}
23+
24+
@keyframes slide-in-left {
25+
0% {
26+
opacity: 0;
27+
transform: translateX(-35%);
28+
}
29+
100% {
30+
opacity: 1;
31+
transform: translateX(0%);
32+
}
33+
}
34+
35+
@keyframes slide-in-bottom {
36+
0% {
37+
opacity: 0;
38+
transform: translateY(100%);
39+
}
40+
100% {
41+
opacity: 1;
42+
transform: translateY(0%);
43+
}
44+
}
45+
}
46+
</style>

src/lib/styles/global.svelte

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<style>
2+
:global {
3+
:root {
4+
--colorA: rgb(177, 60, 255);
5+
--colorB: rgb(98, 231, 81);
6+
--colorC: rgb(83, 153, 233);
7+
8+
--panel: rgba(31, 31, 31, 0.6);
9+
--panel-outline: rgb(51, 51, 51);
10+
--panel-dark: rgb(14, 14, 14);
11+
}
12+
13+
body, html {
14+
margin: 0;
15+
padding: 0;
16+
height: 100%;
17+
}
18+
19+
body {
20+
font-family: Verdana, sans-serif;
21+
background-color: black;
22+
color: white;
23+
}
24+
25+
main {
26+
max-width: 1200px;
27+
padding: 25px;
28+
margin: 0 auto;
29+
display: flex;
30+
flex-direction: column;
31+
justify-content: space-between;
32+
height: 92%;
33+
}
34+
35+
button {
36+
background: var(--panel);
37+
min-width: 100px;
38+
color: white;
39+
border: var(--panel-outline) 2px solid;
40+
border-radius: 5px;
41+
padding: 5px 15px;
42+
cursor: pointer;
43+
transition: 0.2s;
44+
}
45+
46+
button:hover {
47+
background: white;
48+
color: black;
49+
}
50+
51+
a {
52+
color: white;
53+
transition: 0.2s;
54+
}
55+
56+
a:hover {
57+
opacity: 0.8;
58+
}
59+
60+
#site-content {
61+
animation: fade-in 2s;
62+
flex: 1;
63+
}
64+
65+
.panel {
66+
background-color: var(--panel);
67+
border-radius: 10px;
68+
}
69+
}
70+
</style>

src/routes/+layout.svelte

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
<script lang="ts">
22
import favicon from '$lib/assets/favicon.svg';
33
import Background from '$lib/comp/Background.svelte';
4-
import Footer from '$lib/comp/Footer.svelte';
4+
5+
import GlobalStyle from "$lib/styles/global.svelte";
6+
import AnimStyle from "$lib/styles/anim.svelte";
57
68
let { children } = $props();
79
</script>
810

911
<svelte:head>
1012
<title>SongWrap</title>
1113
<meta name="description" content="Import and view your listening stats in a fancy way." />
12-
1314
<link rel="icon" href={favicon} />
14-
<link rel="stylesheet" href="/styles/global.css" />
15-
<link rel="stylesheet" href="/styles/anim.css" />
15+
16+
<GlobalStyle/>
17+
<AnimStyle />
18+
1619
</svelte:head>
1720

1821
<Background />

static/styles/anim.css

Lines changed: 0 additions & 42 deletions
This file was deleted.

static/styles/global.css

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)