-
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
Oleksii Petrychenko
authored and
Oleksii Petrychenko
committed
Jan 2, 2025
1 parent
606dc21
commit 666e9f4
Showing
6 changed files
with
215 additions
and
3 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
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,120 @@ | ||
.card { | ||
box-sizing: border-box; | ||
width: $card-width; | ||
border: 1px solid #f3f3f3; | ||
border-radius: 5px; | ||
padding: 32px 16px 16px; | ||
background: #fff; | ||
|
||
&__image { | ||
display: block; | ||
margin: 0 auto 40px; | ||
width: 160px; | ||
height: 134px; | ||
} | ||
|
||
&__name { | ||
font-family: Roboto, serif; | ||
font-size: 12px; | ||
font-weight: 500; | ||
line-height: 18px; | ||
text-align: left; | ||
text-underline-position: from-font; | ||
text-decoration-skip-ink: none; | ||
color: $card-main-color; | ||
margin: 0 0 4px; | ||
display: block; | ||
} | ||
|
||
&__code { | ||
font-family: Roboto, serif; | ||
font-size: 10px; | ||
font-weight: 400; | ||
line-height: 14px; | ||
text-align: left; | ||
text-underline-position: from-font; | ||
text-decoration-skip-ink: none; | ||
color: $card-secondary-color; | ||
margin-bottom: 16px; | ||
} | ||
|
||
&__stars { | ||
display: flex; | ||
justify-content: center; | ||
margin-top: 5px; | ||
line-height: 16px; | ||
} | ||
|
||
&__rating { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: flex-end; | ||
margin-bottom: 24px; | ||
} | ||
|
||
&__reviews { | ||
font-family: Roboto, serif; | ||
font-size: 10px; | ||
font-weight: 400; | ||
line-height: 14px; | ||
text-align: right; | ||
text-underline-position: from-font; | ||
text-decoration-skip-ink: none; | ||
color: $card-main-color; | ||
} | ||
|
||
&__price { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
margin-bottom: 16px; | ||
} | ||
|
||
&__price-text { | ||
font-family: Roboto, serif; | ||
font-size: 12px; | ||
font-weight: 400; | ||
line-height: 18px; | ||
text-align: left; | ||
text-underline-position: from-font; | ||
text-decoration-skip-ink: none; | ||
color: $card-secondary-color; | ||
} | ||
|
||
&__price-value { | ||
font-family: Roboto, serif; | ||
font-size: 16px; | ||
font-weight: 700; | ||
line-height: 18px; | ||
text-align: right; | ||
text-underline-position: from-font; | ||
text-decoration-skip-ink: none; | ||
color: $card-main-color; | ||
} | ||
|
||
&__buy { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 40px; | ||
background-color: $card-buy-color; | ||
box-sizing: border-box; | ||
text-decoration: none; | ||
border-radius: 5px; | ||
font-family: Roboto, serif; | ||
font-size: 14px; | ||
font-weight: 700; | ||
line-height: 16px; | ||
text-align: center; | ||
text-underline-position: from-font; | ||
text-decoration-skip-ink: none; | ||
color: white; | ||
text-transform: uppercase; | ||
|
||
&:hover { | ||
border: 1px solid $card-buy-color; | ||
background-color: rgba(243, 243, 243, 1); | ||
color: $card-buy-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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
@import './variables'; | ||
@import './card'; | ||
@import './stars'; | ||
|
||
body { | ||
margin: 0; | ||
font-family: $font-family; | ||
} |
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,25 @@ | ||
.stars { | ||
display: flex; | ||
} | ||
|
||
.stars__star { | ||
width: 16px; | ||
height: 16px; | ||
margin-right: 4px; | ||
|
||
background-image: url(/src/images/star.svg); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
} | ||
|
||
.stars__star:last-child { | ||
margin-right: 0; | ||
} | ||
|
||
.stars--1 .stars__star:nth-child(-n + 1), | ||
.stars--2 .stars__star:nth-child(-n + 2), | ||
.stars--3 .stars__star:nth-child(-n + 3), | ||
.stars--4 .stars__star:nth-child(-n + 4), | ||
.stars--5 .stars__star:nth-child(-n + 5) { | ||
background-image: url(/src/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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
$font-family: 'Roboto', sans-serif; | ||
$card-width: 200px; | ||
$card-height: 408px; | ||
$card-border-color: rgba(243, 243, 243, 1); | ||
$star-color: rgba(255, 222, 106, 1); | ||
$star-empty-color: rgba(243, 243, 243, 1); | ||
$card-secondary-color: rgba(97, 96, 112, 1); | ||
$card-main-color: rgba(6, 11, 53, 1); | ||
$card-buy-color: rgba(0, 172, 220, 1); |