-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
606dc21
commit f53ddaf
Showing
7 changed files
with
187 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,74 @@ | ||
<!-- #region HEAD --> | ||
<!doctype html> | ||
<html lang="en"> | ||
<html | ||
lang="en" | ||
class="page" | ||
> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0" | ||
/> | ||
<title>Product cards</title> | ||
<title>card cards</title> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.googleapis.com" | ||
/> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.gstatic.com" | ||
crossorigin="anonymous" | ||
/> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="./styles/index.scss" | ||
/> | ||
</head> | ||
<body> | ||
<h1>Product cards</h1> | ||
<!-- #endregion --> | ||
<body class="page__body"> | ||
<div | ||
class="card" | ||
data-qa="card" | ||
> | ||
<div class="card__banner"> | ||
<img | ||
src="./images/imac.jpeg" | ||
class="card__photo" | ||
alt="Apple iMac card photo" | ||
/> | ||
</div> | ||
<div class="card__title"> | ||
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | ||
</div> | ||
<div class="card__code">Product code: 195434</div> | ||
<div class="card__rating"> | ||
<div class="stars stars--4"> | ||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
</div> | ||
<div class="card__number-reviews">Reviews: 5</div> | ||
</div> | ||
<div class="card__price"> | ||
<div class="card__price-label">Price:</div> | ||
<div class="card__price-number">$2,199</div> | ||
</div> | ||
<div class="card__buy-button"> | ||
<a | ||
href="#" | ||
class="card__button-element" | ||
data-qa="hover" | ||
> | ||
Buy | ||
</a> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
.card { | ||
padding: 32px 16px 16px; | ||
width: 200px; | ||
|
||
box-sizing: border-box; | ||
border: 1px solid #f3f3f3; | ||
border-radius: 5px; | ||
|
||
&__banner { | ||
margin-bottom: 40px; | ||
} | ||
|
||
&__photo { | ||
height: 134px; | ||
width: 160px; | ||
display: block; | ||
margin: 0 auto; | ||
} | ||
|
||
&__title { | ||
font-weight: 500; | ||
font-size: 12px; | ||
line-height: 18px; | ||
margin-bottom: 4px; | ||
} | ||
|
||
&__code { | ||
font-weight: 400; | ||
font-size: 10px; | ||
line-height: 14px; | ||
color: $secondary-color; | ||
margin-bottom: 16px; | ||
} | ||
|
||
&__rating { | ||
display: flex; | ||
justify-content: space-between; | ||
margin-bottom: 24px; | ||
} | ||
|
||
&__number-reviews { | ||
line-height: 14px; | ||
font-size: 10px; | ||
font-weight: 400; | ||
} | ||
|
||
&__price { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
margin-bottom: 16px; | ||
line-height: $primary-lineheight; | ||
|
||
&-label { | ||
font-size: 12px; | ||
color: $secondary-color; | ||
} | ||
|
||
&-number { | ||
font-weight: bold; | ||
font-size: 16px; | ||
} | ||
} | ||
|
||
&__button-element { | ||
display: block; | ||
height: 40px; | ||
border-radius: 5px; | ||
box-sizing: border-box; | ||
|
||
color: white; | ||
font-weight: bold; | ||
text-align: center; | ||
align-content: center; | ||
text-transform: uppercase; | ||
text-decoration: none; | ||
background-color: $blue-accent-color; | ||
border: 1px solid $blue-accent-color; | ||
|
||
&:hover { | ||
color: $blue-accent-color; | ||
background-color: white; | ||
cursor: pointer; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.page__body { | ||
margin: 0; | ||
font-family: Roboto, serif; | ||
color: $main-color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.stars { | ||
display: flex; | ||
|
||
&__star { | ||
height: $stars-size; | ||
width: $stars-size; | ||
margin-right: 4px; | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
background-image: url('../images/star.svg'); | ||
} | ||
|
||
&--4 &__star:nth-child(-n + 4) { | ||
background-image: url('../images/star-active.svg'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
body { | ||
margin: 0; | ||
} | ||
@import './utils/variables'; | ||
@import './blocks/page'; | ||
@import './blocks/card'; | ||
@import './blocks/stars'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$blue-accent-color: #00acdc; | ||
$main-color: #060b35; | ||
$secondary-color: #616070; | ||
$card-width: 200px; | ||
$primary-lineheight: 18px; | ||
$secondary-lineheight: 14px; | ||
$stars-size: 16px; |