-
Notifications
You must be signed in to change notification settings - Fork 1
/
style.css
167 lines (146 loc) · 3.1 KB
/
style.css
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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--text-color: white;
--bg-url: url(./assets/bg-dark.webp);
--bg-color: rgb(22, 22, 24);
--stroke-color: rgba(255, 255, 255, 0.5);
--surface-color: rgba(255, 255, 255, 0.05);
--surface-color-hover: rgba(0, 0, 0, 0.02);
--highlight-color: rgba(255, 255, 255, 0.2);
--switch-bg-url: url(./assets/moon.svg);
}
.light {
--text-color: black;
--bg-url: url(./assets/bg-light.webp);
--bg-color: rgb(239, 235, 239);
--stroke-color: rgba(0, 0, 0, 0.5);
--surface-color: rgba(0, 0, 0, 0.05);
--surface-color-hover: rgba(0, 0, 0, 0.02);
--highlight-color: rgba(0, 0, 0, 0.1);
--switch-bg-url: url(./assets/sun.svg);
}
body {
background: var(--bg-url) no-repeat top center/cover;
background-color: var(--bg-color);
min-height: 100vh;
}
body * {
font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
color: var(--text-color);
}
#container {
width: 100%;
max-width: 588px;
margin: 56px auto 0px;
padding: 0 24px;
}
#user {
text-align: center;
padding: 24px;
}
#user img {
width: 112px;
}
#user p {
font-weight: 500;
line-height: 24px;
margin-top: 8px;
}
#switch {
position: relative;
width: 64px;
margin: 4px auto;
}
#switch button {
width: 32px;
height: 32px;
background: #ffffff var(--switch-bg-url) no-repeat center;
border: 0;
border-radius: 50%;
position: absolute;
top: 50%;
left: 0;
z-index: 1;
transform: translateY(-50%);
animation: slide-out 0.28s;
}
.light #switch button {
animation: slide-in 0.2s forwards;
}
#switch button,
#switch span {
cursor: pointer;
}
#switch span {
display: block;
width: 64px;
height: 24px;
background: var(--surface-color);
border: 1px solid var(--stroke-color);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
border-radius: 9999px;
}
ul {
list-style: none;
display: flex;
flex-direction: column;
gap: 16px;
padding: 24px 0;
}
ul li a {
display: flex;
align-items: center;
justify-content: center;
padding: 16px 24px;
background: var(--surface-color);
border: 1px solid var(--stroke-color);
border-radius: 8px;
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
text-decoration: none;
font-weight: 500;
transition: background 0.2s;
}
ul li a:hover {
background: var(--surface-color-hover);
border: 1.5px solid var(--text-color);
}
#social-links {
display: flex;
justify-content: center;
padding: 24px 0;
font-size: 24px;
}
#social-links a {
display: flex;
align-items: center;
justify-content: center;
padding: 16px;
transition: background 0.2s;
border-radius: 50%;
}
#social-links a:hover {
background: var(--highlight-color);
}
@keyframes slide-in {
from {
left: 0;
}
to {
left: 50%;
}
}
@keyframes slide-out {
from {
left: 50%;
}
to {
left: 0;
}
}