Skip to content

Commit 60f5493

Browse files
🐞 fix: styles
1 parent a0e0c28 commit 60f5493

File tree

4 files changed

+45
-24
lines changed

4 files changed

+45
-24
lines changed

index.html

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<link rel="stylesheet" href="./style.css">
1414
<!-- META NAME & DESCRIPTION -->
1515
<meta name="author" content="Cleilson Andrade">
16-
<meta name="description" content="Seu app de controle de finanças pessoal.">
16+
<meta name="description" content="Seu app de controle de finanças pessoais.">
1717
<!-- META SOCIAL MEDIAS -->
1818
<meta name="twitter:title" content="dev.finance$">
1919
<meta property="og:title" content="dev.finance$" />
@@ -69,18 +69,20 @@ <h3>
6969
<section id="transaction">
7070
<h2 class="sr-only">Transações</h2>
7171
<a href="#" onclick="Modal.open()" class="button new">+ Nova transação</a>
72-
<table id="data-table">
73-
<thead>
74-
<tr>
75-
<th>Descrição</th>
76-
<th>Valor</th>
77-
<th>Data</th>
78-
<th></th>
79-
</tr>
80-
</thead>
81-
<tbody>
82-
</tbody>
83-
</table>
72+
<div class="table-container">
73+
<table id="data-table">
74+
<thead>
75+
<tr>
76+
<th>Descrição</th>
77+
<th>Valor</th>
78+
<th>Data</th>
79+
<th></th>
80+
</tr>
81+
</thead>
82+
<tbody>
83+
</tbody>
84+
</table>
85+
</div>
8486
</section>
8587
</main>
8688

@@ -119,8 +121,7 @@ <h2>Nova Transação</h2>
119121

120122
<footer>dev.finance$</footer>
121123

122-
<script src="./scripts.js">
123-
</script>
124+
<script src="./scripts.js" defer></script>
124125
</body>
125126

126127
</html>

scripts.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
const Modal = {
22
open() {
3-
// ABRIR MODAL
4-
// Adicionar a class active ao modal
3+
// OPEN MODE
4+
// Add the active class to the modal
55
document.querySelector('.modal-overlay').classList.add('active-overlay')
66
document.querySelector('.modal').classList.toggle('active-modal')
77
document.querySelector('.attention').classList.add('sr-only')
88

99
},
1010
close() {
11-
// FECHAR MODAL
11+
// CLOSE MODAL
1212
// Remover a class active do modal
1313
document.querySelector('.modal-overlay').classList.remove('active-overlay')
1414
document.querySelector('.modal').classList.toggle('active-modal')

site.webmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "dev.finance$",
33
"short_name": "dev.finance$",
44
"lang": "pt-BR",
5-
"description": "Seu app de controle de finanças pessoal.",
5+
"description": "Seu app de controle de finanças pessoais.",
66
"icons": [
77
{
88
"src": "./assets/favicon/android-chrome-192x192.png",

style.css

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ body {
3838
.container {
3939
width: min(90vw, 800px);
4040
margin: 0 auto;
41+
min-height: 80vh;
4142
}
4243

4344
.attention {
@@ -105,6 +106,8 @@ header {
105106
background: #2D4A22;
106107
padding: 2rem 0 10rem;
107108
text-align: center;
109+
display: flex;
110+
justify-content: center;
108111
}
109112

110113
#logo {
@@ -132,8 +135,9 @@ header {
132135
}
133136

134137
.card:hover {
135-
transition: 0.4s;
138+
transition: 0.8s;
136139
background: #e8f0ff;
140+
box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
137141
}
138142

139143
.card h3 {
@@ -160,6 +164,12 @@ header {
160164
display: block;
161165
width: 100%;
162166
overflow-x: auto;
167+
position: relative;
168+
}
169+
170+
.table-container {
171+
max-height: 20vh;
172+
overflow-y: auto;
163173
}
164174

165175
#data-table {
@@ -183,6 +193,9 @@ table thead th {
183193
font-weight: normal;
184194
padding: 1rem 2rem;
185195
text-align: left;
196+
position: sticky;
197+
top: 0;
198+
z-index: 2;
186199
}
187200

188201
table tbody tr {
@@ -224,13 +237,13 @@ td.expense {
224237
opacity: 0;
225238
visibility: hidden;
226239
z-index: 999;
227-
transition: 0.4s;
240+
transition: 0.6s;
228241
}
229242

230243
.modal-overlay.active-overlay {
231244
opacity: 1;
232245
visibility: visible;
233-
backdrop-filter: blur(5px);
246+
backdrop-filter: blur(2px);
234247
}
235248

236249
.modal {
@@ -239,7 +252,7 @@ td.expense {
239252
padding: 2.4rem;
240253
position: relative;
241254
z-index: 1;
242-
transition: 0.2s;
255+
transition: 0.6s;
243256
}
244257

245258
.modal.active-modal {
@@ -285,9 +298,12 @@ input {
285298
/* FOOTER============================================= */
286299
footer {
287300
text-align: center;
288-
padding: 4rem 0 2rem;
301+
padding: 2rem 0 2rem;
289302
color: var(--dark-blue);
290303
opacity: 0.6;
304+
width: 100%;
305+
position: relative;
306+
bottom: 0;
291307
}
292308

293309
/* RESPONSIVE============================================= */
@@ -302,4 +318,8 @@ footer {
302318
grid-template-columns: repeat(3, 1fr);
303319
gap: 2rem;
304320
}
321+
322+
.table-container {
323+
max-height: 54vh;
324+
}
305325
}

0 commit comments

Comments
 (0)