diff --git a/readme.md b/readme.md index b1f43ed970..7e0599de4c 100644 --- a/readme.md +++ b/readme.md @@ -23,8 +23,8 @@ This is possible because [we use the Parcel library](https://en.parceljs.org/scs ❗️ Replace `` with your GitHub username and copy the links to the `Pull Request` description: -- [DEMO LINK](https://.github.io/layout_product-cards/) -- [TEST REPORT LINK](https://.github.io/layout_product-cards/report/html_report/) +- [DEMO LINK](https://NataliiaVdovyna.github.io/layout_product-cards/) +- [TEST REPORT LINK](https://NataliiaVdovyna.github.io/layout_product-cards/report/html_report/) ❗️ Copy this `Checklist` to the `Pull Request` description after links, and put `- [x]` before each point after you checked it. diff --git a/src/index.html b/src/index.html index 43745cc17f..914281bce5 100644 --- a/src/index.html +++ b/src/index.html @@ -1,3 +1,4 @@ + @@ -7,12 +8,74 @@ content="width=device-width, initial-scale=1.0" /> Product cards + + + - -

Product cards

+ + +
+
+ computer + +
+

+ APPLE A1419 iMac 27" Retina +
+ 5K Monoblock (MNED2UA/A) +

+

Product code: 195434

+
+
+ +
+
+
+
+
+
+
+
+ +

Reviews: 5

+
+ +
+
+

Price:

+ +

$2,199

+
+ + + Buy + +
+
diff --git a/src/styles/blocks/card.scss b/src/styles/blocks/card.scss new file mode 100644 index 0000000000..e95c61a9b8 --- /dev/null +++ b/src/styles/blocks/card.scss @@ -0,0 +1,54 @@ +.card { + box-sizing: border-box; + width: 200px; + background-color: $background-color-special-white; + border-radius: 5px; + border: 1px solid #f3f3f3; + + text-align: center; + padding-block: 32px 16px; + + &__top-image { + display: block; + width: 160px; + height: 134px; + margin-inline: 19px; + } + + &__top-text { + margin: 40px 16px 16px; + text-align: left; + } + + &__top-title { + margin: 0; + font-weight: 500; + line-height: 18px; + font-size: 12px; + } + + &__top-subtitle { + margin: 0; + margin-top: 4px; + font-size: 10px; + line-height: 14px; + color: $other-text-color; + } + + &__review { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + margin: 0; + height: 16px; + margin-inline: $margin-inline; + } + + &__review-text { + font-size: 10px; + font-weight: 400; + line-height: 14px; + margin: 0; + } +} diff --git a/src/styles/blocks/page.scss b/src/styles/blocks/page.scss new file mode 100644 index 0000000000..18ca9ae1bc --- /dev/null +++ b/src/styles/blocks/page.scss @@ -0,0 +1,8 @@ +.page { + margin: 0; + margin-inline: 10px; + + font-family: Roboto, sans-serif; + font-weight: 400; + color: $main-text-color; +} diff --git a/src/styles/blocks/price.scss b/src/styles/blocks/price.scss new file mode 100644 index 0000000000..186692a3ff --- /dev/null +++ b/src/styles/blocks/price.scss @@ -0,0 +1,50 @@ +.price { + &__wrapper { + display: flex; + flex-direction: row; + justify-content: space-between; + + align-items: center; + margin-block: 24px 16px; + margin-inline: $margin-inline; + } + + &__text { + margin: 0; + font-size: 12px; + font-weight: 400; + line-height: 18px; + color: $other-text-color; + } + + &__money { + margin: 0; + font-size: 16px; + font-weight: 700; + line-height: 18px; + } + + &__link { + display: block; + margin-inline: $margin-inline; + + background-color: $button-color; + height: 40px; + border-radius: 5px; + + font-family: Roboto, sans-serif; + font-size: 14px; + font-weight: 700; + line-height: 16px; + align-content: center; + color: $background-color-special-white; + text-transform: uppercase; + text-decoration: none; + + &:hover { + color: $button-color; + background-color: $background-color-special-white; + border: 1px solid $button-color; + } + } +} diff --git a/src/styles/blocks/stars.scss b/src/styles/blocks/stars.scss new file mode 100644 index 0000000000..0f0ec4607d --- /dev/null +++ b/src/styles/blocks/stars.scss @@ -0,0 +1,17 @@ +.stars { + display: flex; + justify-content: space-between; + width: 96px; + + &__star { + background-image: url(../images/star-active.svg); + background-repeat: no-repeat; + background-position: 50%; + width: 16px; + height: 16px; + } + + &__star:last-child { + background-image: url(../images/star.svg); + } +} diff --git a/src/styles/index.scss b/src/styles/index.scss index 293d3b1f13..40f5bc0c5c 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,3 +1,5 @@ -body { - margin: 0; -} +@import './utils/variables'; +@import './blocks/page'; +@import './blocks/card'; +@import './blocks/stars'; +@import './blocks/price'; diff --git a/src/styles/utils/variables.scss b/src/styles/utils/variables.scss new file mode 100644 index 0000000000..05941b8ec6 --- /dev/null +++ b/src/styles/utils/variables.scss @@ -0,0 +1,5 @@ +$margin-inline: 16px; +$main-text-color: #060b35; +$other-text-color: #616070; +$button-color: #00acdc; +$background-color-special-white: #fff;