From 20cc5e41222001709fb12bd467ee359d2f23730e Mon Sep 17 00:00:00 2001 From: Kostya Oliinyk Date: Mon, 16 Dec 2024 12:49:53 +0200 Subject: [PATCH] add solution --- readme.md | 4 +- src/index.html | 56 ++++++++++++++++- src/styles/index.scss | 136 +++++++++++++++++++++++++++++++++++++++++- 3 files changed, 190 insertions(+), 6 deletions(-) diff --git a/readme.md b/readme.md index b1f43ed970..d338e6d0f6 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://KOliinyk.github.io/layout_product-cards/) +- [TEST REPORT LINK](https://KOliinyk.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..0d88747f71 100644 --- a/src/index.html +++ b/src/index.html @@ -7,12 +7,64 @@ content="width=device-width, initial-scale=1.0" /> Product cards + + + - -

Product cards

+ +
+
+ +
+

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

+
+
+

Product code:195434

+
+ +
+
+
+
+
+
+ +
Reviews:5
+
+ +
+
Price:
+
$2,199
+
+ + +
diff --git a/src/styles/index.scss b/src/styles/index.scss index 293d3b1f13..b90daaee49 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,3 +1,135 @@ -body { - margin: 0; +html { + font-family: Roboto, sans-serif; +} + +.body { + margin: 0 10px; + padding: 0; + text-align: center; +} + +.header { + width: 200px; + height: 406px; + border-radius: 5px; + border: 1px solid #f3f3f3; + + &__cards { + margin-top: 32px; + margin-left: 19px; + background-image: url(../images/imac.jpeg); + background-size: 160px; + width: 160px; + height: 134px; + } + + &__content { + width: 166px; + height: 36px; + margin-top: 40px; + font-weight: 500; + font-size: 12px; + line-height: 18px; + margin-left: 16px; + } + + &__product { + width: 98px; + height: 14px; + margin-top: 4px; + font-weight: 400; + font-size: 10px; + line-height: 14px; + margin-left: 16px; + } +} + +.stars { + margin-top: 16px; + width: 50%; + height: 16px; + display: flex; + justify-content: space-between; + margin-left: 16px; + + &__reviews { + position: absolute; + height: 16px; + font-size: 10px; + font-weight: 400; + line-height: 14px; + display: flex; + justify-content: space-between; + margin-left: 120px; + } + + &__star { + width: 96px; + height: 16px; + display: block; + background-size: 16px; + background-image: url(../images/star.svg); + background-repeat: no-repeat; + position: relative; + } + + &--0 &__star:nth-child(-n + 4) { + background-image: url(../images/star-active.svg); + background-repeat: no-repeat; + background-size: 16px; + position: relative; + } +} + +.price { + width: 166px; + height: 18px; + display: flex; + justify-content: space-between; + margin-top: 24px; + margin-left: 16px; + + &__title { + font-size: 12px; + font-weight: 400; + line-height: 18px; + justify-content: space-between; + } + + &__number { + font-size: 16px; + font-weight: 700; + line-height: 18px; + } +} + +.footer { + margin: 16px; + width: 166px; + height: 40px; + background: #00acdc; + border-radius: 5px; + + &__button { + margin: 12px 70px; + width: 27px; + height: 16px; + font-size: 14px; + font-weight: 700; + line-height: 16px; + display: inline-block; + color: #fff; + text-decoration: none; + } + + &:hover { + background: #fff; + border-radius: 5px; + border: 1px solid #00acdc; + } + + &__button:hover { + color: #00acdc; + text-decoration: none; + } }