-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
207 lines (176 loc) · 3.94 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
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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
list-style: none;
text-decoration: none;
border: 0;
}
:root {
--text-color: white;
--bg-url: url(assets/mobileDark.jpg);
--stroke-color: rgba(255, 255, 255, 0.5);
--surface-color: rgba(255, 255, 255, 0.05);
--surface-color-hover: rgba(255, 255, 255, 0.02);
--highlight-color: rgba(255, 255, 255, 0.2);
--background-svg: url(assets/icon-moon-stars.svg);
}
.light {
--text-color: black;
--bg-url: url(assets/mobileLight.jpg);
--stroke-color: rgba(0, 0, 0, 0.5);
--surface-color: rgba(0, 0, 0, 0.05);
--surface-color-hover: rgba(0, 0, 0, 0.1);
--highlight-color: rgba(0, 0, 0, 0.1);
--background-svg: url(assets/icon-sun.svg);
}
body * {
font-family: "Inter", sans-serif;
}
body {
background: var(--bg-url) no-repeat top center/cover;
height: 100vh;
}
#container {
width: 90%;
max-width: 588px;
margin: auto;
padding: 0 24px;
color: var(--text-color);
}
#profile {
/* text align é para alinha elementos do tipo inline */
/* enquanto o margin auto alinha os elementos apenas elementos block */
text-align: center;
padding: 24px;
}
#profile img {
width: 112px;
}
#profile p {
font-weight: 500;
line-height: 24px;
padding-top: 5px;
}
#switch {
position: relative;
display: flex;
align-items: center;
width: 64px;
margin: auto;
}
#switch button {
position: absolute; /* para que o botão na largura da div switch*/
cursor: pointer;
width: 32px;
height: 32px;
border-radius: 50%;
background: rgb(255, 255, 255) var(--background-svg) no-repeat center;
z-index: 1;
animation: slide-left 0.3s;
}
#switch button:hover {
transition: 0.2s ease-in-out;
outline: 8px solid var(--highlight-color);
}
.light #switch button {
/* forwards faz com que o botao não volte */
animation: slide-right 0.3s forwards;
box-shadow: 5px 5px 4px 2px var(--highlight-color);
}
#switch span {
display: block;
width: 64px;
height: 24px;
border-radius: 32px;
background-color: var(--surface-color);
border: var(--stroke-color) 1px solid;
}
ul {
display: flex;
flex-direction: column;
gap: 16px;
padding: 24px 0;
}
ul li a {
display: flex;
align-items: center;
justify-content: center;
padding: 16px 24px;
border: 1px solid var(--stroke-color);
background: var(--surface-color);
border-radius: 8px;
font-weight: 500;
transition: background 0.3s;
color: var(--text-color);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
}
ul li a:hover {
background-color: 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;
border-radius: 50%;
transition: background 0.3s;
color: var(--text-color);
}
.social-links a:hover {
background: var(--highlight-color);
}
footer {
text-align: center;
padding-block: 24px;
}
@media (min-width: 700px) {
/* de 700px pra cima ira aplicar as seguintes regras css: */
/* estamos trocando a imagem de fundo caso seja maior que 700px */
:root {
--bg-url: url(./assets/BG-desktopDark.jpg);
}
.light {
--bg-url: url(./assets/BG-desktopLight.jpg);
}
}
@media (max-width: 375px) {
/* de 375px pra baixo ira aplicar as seguintes regras css: */
#profile img {
width: 90px;
}
#container {
width: 88%;
}
body {
font-size: 13px;
}
ul li a {
padding: 12px 4px;
}
}
/* animação do toggle switch */
@keyframes slide-right {
from {
left: 0;
}
to {
left: 50%;
}
}
@keyframes slide-left {
from {
left: 50%;
}
to {
left: 0;
}
}