feat: cria grid do card na versao desktop e mobile

This commit is contained in:
Emmanuel Vitor Pereira de Jesus 2022-10-13 02:22:23 -03:00
parent efdc48527b
commit a9866b611f
2 changed files with 179 additions and 52 deletions

View File

@ -4,7 +4,8 @@
<head> <head>
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap"
rel="stylesheet">
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
@ -23,25 +24,57 @@
<!-- AREA DO BANNER PRINCIPAL --> <!-- AREA DO BANNER PRINCIPAL -->
<div class="container-banner-main"> <div class="container-banner-main">
<figure class="container-banner-desktop"> <figure class="container-banner-desktop">
<img class="banner-img banner-img-desktop" src="assets/banner/banner-header.png" alt="Notebook aberto com codigos HTML e CSS. Ao lado contem um celular, uma xicara branca, um fone e uma planta dentro de uma vaso. "> <img class="banner-img banner-img-desktop" src="assets/banner/banner-header.png"
alt="Notebook aberto com codigos HTML e CSS. Ao lado contem um celular, uma xicara branca, um fone e uma planta dentro de uma vaso. ">
</figure> </figure>
<figure class="container-banner-mobile"> <figure class="container-banner-mobile">
<img class="banner-img banner-img-mobile" src="assets/banner/banner-header-mobile.png" alt="Notebook aberto com codigos HTML e CSS."> <img class="banner-img banner-img-mobile" src="assets/banner/banner-header-mobile.png"
alt="Notebook aberto com codigos HTML e CSS.">
</figure> </figure>
</div> </div>
<!-- CONTAINER ABAIX DO BANNER --> <!-- CONTAINER ABAIXO DO BANNER -->
<div class="container-midle"> <div class="container-midle">
<section class="container-midle-flex"> <section class="container-midle-flex">
<h2 class="container-midle-subtitle">Lorem ipsum</h2> <h2 class="container-midle-subtitle">Lorem ipsum</h2>
<h1 class="container-midle-title">Dolor sit amet</h1> <h1 class="container-midle-title">Dolor sit amet</h1>
<p class="container-midle-paragraph">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod enim non dui fringilla interdum. Curabitur ut tortor sed lacus egestas vulputate vel sit amet velit. Nulla suscipit magna dui. </p> <p class="container-midle-paragraph">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras
euismod enim non dui fringilla interdum. Curabitur ut tortor sed lacus egestas vulputate vel sit
amet velit. Nulla suscipit magna dui. </p>
<img src="assets/img/midle-computer.png" alt="Computadores alinhados. Um em cuma e dois embaixo, ligados por setas." class="container-midle-img" /> <img src="assets/img/midle-computer.png"
<!-- <div class="container-midle-card"> alt="Computadores alinhados. Um em cuma e dois embaixo, ligados por setas."
class="container-midle-img" />
</div> --> <!-- CONTAINER CARD -->
<div class="container-cards">
<div class="card-1">
<figure>
<img class="icon-card" src="assets/svg/shop-icon.svg" alt="icone de shopping">
<figcaption class="subtitle-card">Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Cras euismod enim non dui fringilla interdum. </figcaption>
</figure>
</div>
<div class="card-2">
<figure>
<img class="icon-card" src="assets/svg/shopping-bag-icon.svg"
alt="icone de shopping bag (sacola de shoppin) com um escudo azul na frente. Simboliza compra segura">
<figcaption class="subtitle-card">Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Cras euismod enim non dui fringilla interdum. </figcaption>
</figure>
</div>
<div class="card-3">
<figure>
<img class="icon-card" src="assets/svg/coin-icon.svg"
alt="icone de mão segurando uma moeda">
<figcaption class="subtitle-card">Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Cras euismod enim non dui fringilla interdum. </figcaption>
</div>
</figure>
</div>
</section> </section>
</div> </div>
</main> </main>
</body> </body>

View File

@ -51,10 +51,6 @@ main {
/* AREA ABAIXO DO BANNER */ /* AREA ABAIXO DO BANNER */
.container-midle {
width: 100%;
}
.container-midle-flex { .container-midle-flex {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -80,7 +76,8 @@ main {
} }
.container-midle-paragraph { .container-midle-paragraph {
width: 766px; width: 100%;
max-width: 766px;
font-weight: 400; font-weight: 400;
font-size: 16px; font-size: 16px;
line-height: 24px; line-height: 24px;
@ -88,31 +85,103 @@ main {
} }
.container-midle-img { .container-midle-img {
width: 16.40625%; width: 16.40625%;
height: 16.40625%; height: 16.40625%;
max-width: 315px;
display: block; display: block;
} }
/* */ /* GRID INFO CARD TRIPLE */
.container-cards {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 1fr;
gap: 0px 22px;
grid-auto-flow: row;
grid-template-areas:
"card-1 card-2 card-3";
justify-content: center;
width: 100%;
padding: 10% 22% 4%;
}
.card-1 {
grid-area: card-1;
}
.card-2 {
grid-area: card-2;
}
.card-3 {
grid-area: card-3;
}
.card-1,
.card-2,
.card-3 {
background: var(--white);
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.23);
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
padding: 36px 26px 24px;
}
.icon-card {
width: 6.409rem;
height: 6.409rem;
display: block;
margin: 0 auto;
margin-bottom: 28px;
}
.subtitle-card {
width: 100%;
min-width: 72%;
font-weight: 400;
font-size: 16px;
line-height: 24px;
text-align: center;
}
/* Medias Queries*/
@media (min-width:2500px) {
.container-cards{
padding: 6% 30% 4%;
}
}
@media (max-width:1024px) { @media (max-width:1024px) {
/* BANNER MOBILE */ /* BANNER MOBILE */
.banner-img-desktop { .banner-img-desktop {
display: none; display: none;
} }
.banner-img-mobile { .banner-img-mobile {
display: block; display: block;
} }
main{ background-color: var(--grey-footer);} main {
background-color: var(--grey-footer);
}
/* AREA ABAIXO DO BANNER */ /* AREA ABAIXO DO BANNER */
.container-midle { .container-midle {
width: 100%; width: 100%;
} }
/* AREA ABAIXO DO BANNER */ /* AREA ABAIXO DO BANNER */
.container-midle-flex { .container-midle-flex {
display: flex; display: flex;
@ -125,22 +194,47 @@ main{ background-color: var(--grey-footer);}
font-size: 28px; font-size: 28px;
line-height: 34px; line-height: 34px;
} }
.container-midle-subtitle { .container-midle-subtitle {
font-size: 20px; font-size: 20px;
line-height: 24px; line-height: 24px;
} }
.container-midle-paragraph { .container-midle-paragraph {
width: 100%;
max-width: 360px; max-width: 86%;
font-size: 16px; font-size: 16px;
line-height: 24px; line-height: 24px;
text-align: center; text-align: center;
} }
.container-midle-img { .container-midle-img {
width: 58%; width: 58%;
height: 58%; height: 58%;
max-width: 240px;
display: block; display: block;
} }
/* Area dos tres cards */
.container-cards {
display: grid;
grid-template-columns: 1fr;
grid-template-rows: repeat(3, 1fr);
gap: 24px;
grid-auto-flow: row;
grid-template-areas:
"card-1"
"card-2"
"card-3";
justify-content: center;
padding:90px 32px 80px;
}
.subtitle-card {
max-width: 72%;
margin: 0 auto;
text-align: center;
}
} }