Skip to content

Commit 4625c1f

Browse files
committed
Personalizando
1 parent 6eea82b commit 4625c1f

7 files changed

+614
-18
lines changed

Explore/assets/bg-yellow.svg

+484
Loading

Explore/assets/icon-colombia.svg

+12
Loading

Explore/assets/icon-hungary.svg

+12
Loading

Explore/assets/icon-japao.svg

+11
Loading

Explore/index.html

+9-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,16 @@
77
<title>Calendario De Jogos Copa</title>
88
<link rel="stylesheet" href="./style.css">
99
</head>
10-
<body>
10+
<body class="">
1111

12-
<div id="app"></div>
12+
<div id="app">
13+
<header>
14+
<img src="./assets/logo.svg" alt="">
15+
</header>
16+
<main id="cards">
17+
18+
</main>
19+
</div>
1320
<script src="./main.js"></script>
1421
</body>
1522
</html>

Explore/main.js

+8-10
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ function createGame(play1,play2,hours){
88
`
99
}
1010

11+
let delay =0;
1112
function createCard(date, day, games){
13+
delay = delay + 0.1;
1214
return `
13-
<div class="card">
15+
<div class="card" style="animation-delay: ${delay}s">
1416
<h2> ${date} <span>${day}</span></h2>
1517
<ul>
1618
${games}
@@ -22,12 +24,8 @@ function createCard(date, day, games){
2224

2325

2426

25-
document.querySelector("#app").innerHTML = `
26-
<header>
27-
<img src="./assets/logo.svg" alt="">
28-
</header>
29-
<main id="cards">
30-
${createCard("24/11", "QUINTA", createGame("camaroes","suica","9:00"))}
31-
${createCard("28/11", "SEGUNDA", createGame("suica","brasil","11:00"))}
32-
${createCard("02/12", "SEXTA", createGame("camaroes","argentina","12:00"))}
33-
</main>`
27+
document.querySelector("#cards").innerHTML = `
28+
${createCard("24/11", "QUINTA", createGame("camaroes","suica","9:00")+ createGame("japao","colombia","15:00"))}
29+
${createCard("28/11", "SEGUNDA", createGame("suica","brasil","11:00") + createGame("brasil","argentina","22:00"))}
30+
${createCard("02/12", "SEXTA", createGame("camaroes","argentina","12:00") + createGame("japao","hungary","17:00"))}
31+
`

Explore/style.css

+78-6
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,42 @@
44
box-sizing: border-box;
55
}
66

7+
:root{
8+
--card-color-primary: #f7dd43;
9+
--card-title-border-color: #746615;
10+
}
11+
12+
body.blue{
13+
--card-color-primary: #338Af3;
14+
--card-title-border-color: #338Af3;
15+
}
16+
17+
body.green{
18+
--card-color-primary: #047c3f;
19+
--card-title-border-color: #047c3f;
20+
}
21+
722
ul{
823
list-style: none;
924
}
1025

1126
body{
1227
background-color: #121214;
13-
background-image: url(./assets/bg.svg);
28+
background-image: url(./assets/bg-yellow.svg);
1429
background-position-x: center;
1530
background-position-y: 50%;
1631
}
1732

1833
#app{
1934
border: 1px;
2035
width: fit-content;
21-
margin: 52px auto;
36+
margin: auto;
37+
padding: 52px;
2238
}
2339

2440
header{
2541
margin-bottom: 53px;
42+
text-align: center;
2643
}
2744

2845
#cards{
@@ -35,25 +52,27 @@ header{
3552
border: 1px;
3653
padding: 32px 23px;
3754
text-align: center;
55+
3856
background: #1d1c19;
39-
border-bottom: 2px solid #f7dd43;
57+
border-bottom: 2px solid var(--card-color-primary);
4058
border-radius: 6px;
4159
}
4260

4361
.card h2{
4462
display: flex;
4563
gap: 16px;
4664
justify-content: center;
65+
align-items:center; //
4766

4867
padding: 8px 16px;
49-
border: 1px solid #746615;
68+
border: 1px solid var(--card-title-border-color);
5069
border-radius: 6px;
5170

5271
width: fit-content;
5372
margin-inline:auto;
5473
margin-bottom: 53px;
5574

56-
color: #F7DD43;
75+
color: #f7dd43;
5776
}
5877

5978
.card h2 span{
@@ -66,15 +85,68 @@ header{
6685
display: flex;
6786
flex-direction: column;
6887
gap: 24px;
88+
89+
width:270px;
6990
}
7091

7192
.card ul li{
7293
display: flex;
7394
align-items: center;
7495
justify-content: space-between;
96+
color: #FFFFFF;
7597
}
7698

7799
.card ul li + li{
78100
padding-top:24px;
79-
border-top: 1px solid green;
101+
border-top: 1px solid #323238;
102+
}
103+
104+
.card ul li strong{
105+
font-weight: 900;
106+
font-size:36px;
107+
line-heignt: 125%;
108+
109+
color:#E1E1E6;
110+
}
111+
112+
.card h2:hover,
113+
.card ul li strong:hover,
114+
.card ul li img:hover {
115+
transform: scale(1.1); // alterar tamanho dos componentes
116+
117+
}
118+
119+
.card h2,
120+
.card ul li strong,
121+
.card ul li img{
122+
transition: transform 0.3s;
123+
}
124+
125+
.card{
126+
animation: appear 0.7s
127+
}
128+
129+
//.card:nth-child(2){
130+
// animation-delay:0.1s;
131+
//}
132+
133+
//.card:nth-child(3){
134+
// animation-delay:0.2s;
135+
//}
136+
137+
@keyframes appear{
138+
0% {
139+
transform: translateY(-50px);
140+
opacity: 0;
141+
}
142+
143+
100%{
144+
opacity: 1;
145+
}
146+
}
147+
@media(min-width: 700px){
148+
#cards{
149+
flex-direction: row;
150+
flex-wrap: wrap;
151+
}
80152
}

0 commit comments

Comments
 (0)