diff --git a/readme.md b/readme.md index b1f43ed970..af717f1d6d 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://MissDragi.github.io/layout_product-cards/) +- [TEST REPORT LINK](https://MissDragi.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..9b51d6ca72 100644 --- a/src/index.html +++ b/src/index.html @@ -11,8 +11,51 @@ rel="stylesheet" href="./styles/index.scss" /> + + + + - -

Product cards

+ + +
+

+ 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..f06fbf6162 --- /dev/null +++ b/src/styles/blocks/card.scss @@ -0,0 +1,98 @@ +* { + margin: 0; +} + +.page { + font-family: Roboto, sans-serif; + font-weight: 400; + font-size: 14px; +} + +.card { + display: flex; + flex-direction: column; + box-sizing: border-box; + width: 200px; + height: 408px; + background-color: #fff; + background-image: url(../images/imac.jpeg); + background-size: 160px 134px; + background-repeat: no-repeat; + background-position: center 32px; + border: 1px solid #f3f3f3; + border-radius: 5px; + padding: 32px 16px 16px; + + &__name { + display: flex; + margin-top: 174px; + margin-bottom: 4px; + font-weight: 500; + font-size: 12px; + line-height: 18px; + color: #060b35; + } + + &__name-code { + color: #616070; + font-size: 10px; + line-height: 14px; + margin-bottom: 16px; + } + + &__rate { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 24px; + } + + &__review { + font-size: 10px; + color: #060b35; + line-height: 14px; + } + + &__price { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 16px; + } + + &__price-name { + font-size: 12px; + line-height: 18px; + color: #616070; + } + + &__price-value { + font-weight: 700; + color: #060b35; + font-size: 16px; + line-height: 18px; + } + + &__button-action { + display: flex; + box-sizing: border-box; + justify-content: center; + align-items: center; + background-color: #00acdc; + color: #fff; + width: 166px; + height: 40px; + border: 0 solid transparent; + border-radius: 5px; + text-transform: uppercase; + font-weight: 700; + font-size: 14px; + line-height: 16px; + } + + &__button-action:hover { + background-color: transparent; + color: #00acdc; + border: 1px solid #00acdc; + } +} diff --git a/src/styles/blocks/stars.scss b/src/styles/blocks/stars.scss new file mode 100644 index 0000000000..bca49a2716 --- /dev/null +++ b/src/styles/blocks/stars.scss @@ -0,0 +1,21 @@ +.stars { + display: flex; + + &__star { + display: flex; + background-image: url(../images/star.svg); + background-repeat: no-repeat; + background-position: center; + width: 16px; + height: 16px; + margin-right: 4px; + } + + &__star:last-child { + margin-right: 0; + } +} + +.stars--4 .stars__star:nth-child(-n + 4) { + background-image: url(../images/star-active.svg); +} diff --git a/src/styles/index.css b/src/styles/index.css new file mode 100644 index 0000000000..24553e9f21 --- /dev/null +++ b/src/styles/index.css @@ -0,0 +1,122 @@ +* { + margin: 0; +} + +.page { + font-family: Roboto, sans-serif; + font-weight: 400; + font-size: 14px; +} + +.card { + display: flex; + flex-direction: column; + box-sizing: border-box; + width: 200px; + height: 408px; + background-color: #fff; + background-image: url(../images/imac.jpeg); + background-size: 160px 134px; + background-repeat: no-repeat; + background-position: center 32px; + border: 1px solid #f3f3f3; + border-radius: 5px; + padding: 32px 16px 16px; +} + +.card__name { + display: flex; + margin-top: 174px; + margin-bottom: 4px; + font-weight: 500; + font-size: 12px; + line-height: 18px; + color: #060b35; +} + +.card__name-code { + color: #616070; + font-size: 10px; + line-height: 14px; + margin-bottom: 16px; +} + +.card__rate { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 24px; +} + +.card__review { + font-size: 10px; + color: #060b35; + line-height: 14px; +} + +.card__price { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 16px; +} + +.card__price-name { + font-size: 12px; + line-height: 18px; + color: #616070; +} + +.card__price-value { + font-weight: 700; + color: #060b35; + font-size: 16px; + line-height: 18px; +} + +.card__button-action { + display: flex; + box-sizing: border-box; + justify-content: center; + align-items: center; + background-color: #00acdc; + color: #fff; + width: 166px; + height: 40px; + border: 0 solid transparent; + border-radius: 5px; + text-transform: uppercase; + font-weight: 700; + font-size: 14px; + line-height: 16px; +} + +.card__button-action:hover { + background-color: transparent; + color: #00acdc; + border: 1px solid #00acdc; +} + +.stars { + display: flex; +} + +.stars__star { + display: flex; + background-image: url(../images/star.svg); + background-repeat: no-repeat; + background-position: center; + width: 16px; + height: 16px; + margin-right: 4px; +} + +.stars__star:last-child { + margin-right: 0; +} + +.stars--4 .stars__star:nth-child(-n + 4) { + background-image: url(../images/star-active.svg); +} + +/*# sourceMappingURL=index.css.map */ diff --git a/src/styles/index.css.map b/src/styles/index.css.map new file mode 100644 index 0000000000..ceb6a77224 --- /dev/null +++ b/src/styles/index.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["blocks/card.scss","blocks/stars.scss"],"names":[],"mappings":"AAAA;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;;AC/FJ;EACE;;AAEA;EACE;EAEA;EACA;EACA;EACA;EACA;;AAGF;EACE;;;AAIJ;EACE","file":"index.css"} \ No newline at end of file diff --git a/src/styles/index.scss b/src/styles/index.scss index 293d3b1f13..dea61d511c 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,3 +1,2 @@ -body { - margin: 0; -} +@import './blocks/card'; +@import './blocks/stars';