diff --git a/readme.md b/readme.md index b1f43ed970..6952bd24ce 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://vsolodkyi-mate.github.io/layout_product-cards/) +- [TEST REPORT LINK](https://vsolodkyi-mate.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..01c6226003 100644 --- a/src/index.html +++ b/src/index.html @@ -11,8 +11,57 @@ rel="stylesheet" href="./styles/index.scss" /> + + + -

Product cards

+
+ product iMAC +

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

+

Product code: 195434

+
+
+
+
+
+
+
+
+

Reviews: 5

+
+
+
Price:
+
$2,199
+
+ +
diff --git a/src/styles/card.scss b/src/styles/card.scss new file mode 100644 index 0000000000..0e30cfc4ab --- /dev/null +++ b/src/styles/card.scss @@ -0,0 +1,30 @@ +.card { + background-color: #fff; + border: 1px solid #fff; + border-radius: 5px; + width: 200px; + padding: 0 16px 16px; + + &__image { + width: 160px; + height: 134px; + margin: 32px auto 0; + display: flex; + } + + &__title { + color: #060b35; + margin: 40px 0 0; + font-size: 12px; + font-weight: 500; + line-height: 18px; + } + + &__text { + color: #616070; + margin: 4px 0 0; + font-size: 10px; + font-weight: 400; + line-height: 14px; + } +} diff --git a/src/styles/index.scss b/src/styles/index.scss index 293d3b1f13..ec8663e60d 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,3 +1,56 @@ -body { +@import './variables'; +@import './card'; +@import './stars'; + +* { margin: 0; + font-family: $font; + box-sizing: border-box; +} + +.price { + justify-content: space-between; + align-items: center; + height: 18px; + margin: 24px 0 0; + display: flex; + + &__text { + color: #616070; + font-size: 12px; + font-weight: 400; + line-height: 18px; + } + + &__amount { + color: #060b35; + font-size: 16px; + font-weight: 700; + line-height: 18px; + } +} + +.buy__button { + font-family: $font; + margin-top: 16px; + cursor: pointer; + text-align: center; + color: #fff; + text-transform: uppercase; + background-color: #00acdc; + border: none; + border-radius: 5px; + width: 100%; + height: 40px; + font-size: 14px; + font-weight: 700; + line-height: 40px; + text-decoration: none; + display: inline-block; +} + +.buy__button:hover { + color: #00acdc; + background-color: #fff; + border: 1px solid #00acdc; } diff --git a/src/styles/stars.scss b/src/styles/stars.scss new file mode 100644 index 0000000000..bb13172b9e --- /dev/null +++ b/src/styles/stars.scss @@ -0,0 +1,40 @@ +.allstars { + justify-content: space-between; + align-items: center; + height: 16px; + margin: 16px 0 0; + display: flex; + + .stars { + margin: 0; + padding: 0; + display: flex; + + &__star { + background-repeat: no-repeat; + background-position: 50%; + width: 16px; + height: 16px; + margin-right: 4px; + + &--active { + background-image: url(../images/star.svg); + } + + &--active:nth-child(-n + 4) { + background-image: url(../images/star-active.svg); + } + + &:last-child { + margin-right: 0; + } + } + } + + &__text { + color: #060b35; + font-size: 10px; + font-weight: 400; + line-height: 14px; + } +} diff --git a/src/styles/variables.scss b/src/styles/variables.scss new file mode 100644 index 0000000000..dd4d70d0ca --- /dev/null +++ b/src/styles/variables.scss @@ -0,0 +1 @@ +$font: Roboto, serif;