From 4aee23da243ad97969337020a2a566e84492c49f Mon Sep 17 00:00:00 2001 From: Misha Date: Mon, 25 Nov 2024 00:27:54 +0100 Subject: [PATCH 1/9] add solution --- src/index.html | 287 +++++++++++++++++++++++++++++++++++++++++- src/styles/index.scss | 240 +++++++++++++++++++++++++++++++++++ 2 files changed, 526 insertions(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index 9cff78eeb7..0823e2a69a 100644 --- a/src/index.html +++ b/src/index.html @@ -22,6 +22,291 @@ -

Catalog

+
+ + +
+ +
+
+ iMac +

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

+

Product code: 195434

+
+
+
+
+
+
+
+
+

Reviews: 5

+
+
+

Price:

+

$2,199

+
+ + BUY + +
+ +
+ iMac +

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

+

Product code: 195434

+
+
+
+
+
+
+
+
+

Reviews: 5

+
+
+

Price:

+

$2,199

+
+ + BUY + +
+ +
+ iMac +

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

+

Product code: 195434

+
+
+
+
+
+
+
+
+

Reviews: 5

+
+
+

Price:

+

$2,199

+
+ + BUY + +
+ +
+ iMac +

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

+

Product code: 195434

+
+
+
+
+
+
+
+
+

Reviews: 5

+
+
+

Price:

+

$2,199

+
+ + BUY + +
+ +
+ iMac +

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

+

Product code: 195434

+
+
+
+
+
+
+
+
+

Reviews: 5

+
+
+

Price:

+

$2,199

+
+ + BUY + +
+ +
+ iMac +

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

+

Product code: 195434

+
+
+
+
+
+
+
+
+

Reviews: 5

+
+
+

Price:

+

$2,199

+
+ + BUY + +
+ +
+ iMac +

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

+

Product code: 195434

+
+
+
+
+
+
+
+
+

Reviews: 5

+
+
+

Price:

+

$2,199

+
+ + BUY + +
+ +
+ iMac +

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

+

Product code: 195434

+
+
+
+
+
+
+
+
+

Reviews: 5

+
+
+

Price:

+

$2,199

+
+ + BUY + +
+
diff --git a/src/styles/index.scss b/src/styles/index.scss index 293d3b1f13..e7910d1f56 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,3 +1,243 @@ +$primary-color: #00acdc; +$font-color: #060b35; +$light-grey: #616070; +$font-family: 'Roboto', sans-serif; + +:root { + --blue-color: #00acdc; + --black-color: #060b35; +} + +html { + margin: 0; + max-width: 1024px; + font-family: $font-family; + font-size: 12px; + line-height: 14.06px; +} + body { margin: 0; } + +.header { + display: flex; + justify-content: end; + gap: 243px; + height: 60px; + background-color: #fff; + font-family: $font-family; + font-weight: 500; + font-size: 12px; + line-height: 14px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + padding-right: 50px; +} + +.logo { + display: flex; + position: absolute; + top: 10px; + left: 50px; + margin: 0; +} + +.nav__link-list { + display: flex; + gap: 20px; + list-style-type: none; + margin: 0; + padding: 0; +} + +.nav__link { + color: $font-color; + cursor: pointer; + text-transform: uppercase; + position: relative; + transition: color 0.3s ease; +} + +.nav { + display: flex; + align-items: center; +} + +.nav__link:hover { + color: #00bfff; +} + +.is-active { + color: #00bfff; +} + +.is-active::after { + content: ''; + position: absolute; + bottom: -19; + left: 0; + width: 100%; + height: 4px; + background-color: #00bfff; + border-radius: 8px; +} + +.container { + display: grid; + grid-template-columns: repeat(1, 200px); + gap: 46px 48px; + justify-content: center; + padding: 50px 40px; +} + +@media (min-width: 488px) { + .container { + grid-template-columns: repeat(2, 200px); + } +} + +@media (min-width: 768px) { + .container { + grid-template-columns: repeat(3, 200px); + } +} + +@media (min-width: 1024px) { + .container { + grid-template-columns: repeat(4, 200px); + } +} + +* { + box-sizing: border-box; +} + +h2, +p { + margin: 0; +} + +.card { + border-radius: 5px; + width: 200px; + margin: 0; + padding: 32px 16px 16px; + font-family: $font-family; + border: 1px solid #f3f3f3; + transition: + transform 0.3s ease, + color 0.3s ease; +} + +.card__image { + width: 160px; + height: 134px; + margin: 0 auto 40px; + display: block; +} + +.card__title { + font-size: 12px; + font-weight: 500; + line-height: 18px; + color: $font-color; + margin-bottom: 4px; + transition: color 0.3s ease; +} + +.card__code { + font-size: 10px; + font-weight: 400; + line-height: 14px; + color: $light-grey; + margin-bottom: 16px; +} + +.card__review { + align-items: center; + justify-content: space-between; + display: flex; + margin-bottom: 24px; +} + +.card__review_count { + font-size: 10px; + font-weight: 400; + line-height: 14px; + color: $font-color; +} + +.stars { + display: flex; + gap: 4px; + padding-left: 1px; + align-items: center; +} + +.stars__star { + background-image: url(../images/star.svg); + width: 16px; + height: 16px; + background-repeat: no-repeat; + background-position: center; +} + +.stars__star-active { + background-image: url(../images/star-active.svg); + width: 16px; + height: 16px; + background-repeat: no-repeat; + background-position: center; +} + +.card__price { + margin-bottom: 16px; + display: flex; + justify-content: space-between; + align-items: center; +} + +.card__price_text { + font-size: 12px; + font-weight: 400; + line-height: 18px; + color: $light-grey; +} + +.card__price_count { + font-size: 16px; + font-weight: 700; + line-height: 18px; + color: $font-color; +} + +.card__button { + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 40px; + background-color: $primary-color; + color: white; + font-size: 14px; + line-height: 16px; + font-weight: 700; + text-decoration: none; + border-radius: 5px; + transition: background-color 0.3s ease; + cursor: pointer; + border: 1px solid $primary-color; +} + +.card__button:hover { + background-color: #fff; + color: $primary-color; +} + +.card:hover .card__title { + color: #34568b; +} + +.card:hover { + transform: scale(1.2); +} From cd2e610af457bb615e5c812de399da33c3d4c2e1 Mon Sep 17 00:00:00 2001 From: Mykhailo Knysh Date: Wed, 4 Dec 2024 20:04:31 +0100 Subject: [PATCH 2/9] add solution --- src/styles/index.scss | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/styles/index.scss b/src/styles/index.scss index e7910d1f56..90980c0be1 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -51,11 +51,12 @@ body { } .nav__link { - color: $font-color; + color: #060b35; cursor: pointer; text-transform: uppercase; + transition: color 0.3s; position: relative; - transition: color 0.3s ease; + line-height: 60px; } .nav { @@ -73,13 +74,13 @@ body { .is-active::after { content: ''; - position: absolute; - bottom: -19; - left: 0; - width: 100%; - height: 4px; background-color: #00bfff; border-radius: 8px; + width: 100%; + height: 4px; + position: absolute; + bottom: 0; + left: 0; } .container { From 4df5ee7b4fcff5df1b0c1dee603b8f817fc0835e Mon Sep 17 00:00:00 2001 From: Mykhailo Knysh Date: Wed, 4 Dec 2024 20:10:12 +0100 Subject: [PATCH 3/9] add solution --- src/styles/index.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/index.scss b/src/styles/index.scss index 90980c0be1..b0b0888954 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -10,7 +10,7 @@ $font-family: 'Roboto', sans-serif; html { margin: 0; - max-width: 1024px; + width: 1024px; font-family: $font-family; font-size: 12px; line-height: 14.06px; From aa749cc27f0818a8ac9aa9ae3a2eaa7304539c56 Mon Sep 17 00:00:00 2001 From: Mykhailo Knysh Date: Wed, 4 Dec 2024 22:16:10 +0100 Subject: [PATCH 4/9] add solution --- src/index.html | 9 ++++++++- src/styles/index.scss | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/index.html b/src/index.html index 0823e2a69a..1da9429162 100644 --- a/src/index.html +++ b/src/index.html @@ -30,7 +30,14 @@ />