From c3dadda43289bb05214920dc9596a699ea4b8b1a Mon Sep 17 00:00:00 2001 From: Vadim Bazaliy Date: Thu, 21 May 2026 17:52:07 +0300 Subject: [PATCH] complit luyot catalog --- src/index.html | 343 ++++++++++++++++++++++++++++++++++++- src/styles/_card.scss | 115 +++++++++++++ src/styles/_catalog.scss | 21 +++ src/styles/_header.scss | 55 ++++++ src/styles/_stars.scss | 26 +++ src/styles/_variables.scss | 7 + src/styles/index.scss | 118 +++++++++++++ 7 files changed, 684 insertions(+), 1 deletion(-) create mode 100644 src/styles/_card.scss create mode 100644 src/styles/_catalog.scss create mode 100644 src/styles/_header.scss create mode 100644 src/styles/_stars.scss create mode 100644 src/styles/_variables.scss diff --git a/src/index.html b/src/index.html index 9cff78eeb7..61c167caab 100644 --- a/src/index.html +++ b/src/index.html @@ -22,6 +22,347 @@ -

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/_card.scss b/src/styles/_card.scss new file mode 100644 index 0000000000..736253f844 --- /dev/null +++ b/src/styles/_card.scss @@ -0,0 +1,115 @@ +.card { + box-sizing: border-box; + width: 200px; + padding: 32px 16px 16px; + border: 1px solid $gray-color; + border-radius: 5px; + display: flex; + flex-direction: column; + + &:hover { + transform: scale(1.2); + } + + &__image { + display: block; + width: 160px; + height: 134px; + margin: 0 auto 40px; + } + + // .card__title + + &__title { + font-size: 12px; + font-weight: 500; + line-height: 18px; + margin-bottom: 4px; + color: $black-color; + } + + &:hover &__title { + color: $card-hover-title-color; + } + + // .card__code + + &__code { + font-size: 10px; + line-height: 14px; + margin-bottom: 16px; + color: $secondary-color; + } + + // .card__reiting + + &__reiting { + display: flex; + margin-bottom: 24px; + justify-content: space-between; + align-items: center; + } + + // .card__reviews + + &__reviews { + font-size: 10px; + line-height: 14px; + font-weight: 400; + letter-spacing: 0%; + } + + // .card__price + + &__price { + display: flex; + justify-content: space-between; + margin-bottom: 16px; + margin-top: auto; + } + + // .card__price--label + + &__price-label { + font-size: 12px; + line-height: 18px; + letter-spacing: 0%; + font-weight: 400; + } + + // .card__price--value + + &__price-value { + font-size: 16px; + line-height: 18px; + font-weight: bold; + color: $black-color; + } + + // .card__button + + &__button { + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 40px; + box-sizing: border-box; + font-size: 14px; + font-weight: 700; + line-height: 16px; + + color: $white-color; + background-color: $primary-color; + border-radius: 5px; + text-transform: uppercase; + transition: all 0.3s ease; + border: 1px solid transparent; + + &:hover { + background-color: $white-color; + color: $primary-color; + border: 1px solid $primary-color; + } + } +} diff --git a/src/styles/_catalog.scss b/src/styles/_catalog.scss new file mode 100644 index 0000000000..a0c0617aa8 --- /dev/null +++ b/src/styles/_catalog.scss @@ -0,0 +1,21 @@ +.catalog { + display: grid; + grid-template-columns: repeat(1, 200px); + justify-content: center; + gap: 46px 48px; + box-sizing: border-box; + padding: 50px 40px; + + @media (min-width: 488px) { + grid-template-columns: repeat(2, 200px); + } + + @media (min-width: 768px) { + grid-template-columns: repeat(3, 200px); + } + + @media (min-width: 1024px) { + grid-template-columns: repeat(4, 200px); + padding: 50px; + } +} diff --git a/src/styles/_header.scss b/src/styles/_header.scss new file mode 100644 index 0000000000..8338ae4e3f --- /dev/null +++ b/src/styles/_header.scss @@ -0,0 +1,55 @@ +.header { + display: flex; + height: 60px; + margin: 0 auto; + justify-content: space-between; + align-items: center; + padding: 0 50px; + + &__logo { + display: block; + } +} + +.nav { + &__list { + display: flex; + list-style: none; + gap: 20px; + margin: 0; + padding: 0; + } + + &__item { + font-size: 12px; + } + + &__link { + display: block; + line-height: 60px; + font-weight: 500; + text-transform: uppercase; + text-decoration: none; + color: $black-color; + } + + &__link:hover { + color: $primary-color; + } +} + +.is-active { + color: $primary-color; + position: relative; +} + +.is-active::after { + content: ''; + position: absolute; + bottom: 0; + left: 0; + right: 0; + height: 4px; + background-color: $primary-color; + border-radius: 2px; +} diff --git a/src/styles/_stars.scss b/src/styles/_stars.scss new file mode 100644 index 0000000000..e2365aa5bd --- /dev/null +++ b/src/styles/_stars.scss @@ -0,0 +1,26 @@ +.stars { + display: flex; + + // .stars__star + + &__star { + width: 16px; + height: 16px; + background-image: url('../images/star.svg'); + background-repeat: no-repeat; + background-position: center; + margin-right: 4px; + } + + &__star:last-child { + margin-right: 0; + } + + &--1 &__star:nth-child(-n + 1), + &--2 &__star:nth-child(-n + 2), + &--3 &__star:nth-child(-n + 3), + &--4 &__star:nth-child(-n + 4), + &--5 &__star:nth-child(-n + 5) { + background-image: url('../images/star-active.svg'); + } +} diff --git a/src/styles/_variables.scss b/src/styles/_variables.scss new file mode 100644 index 0000000000..46556f9d5a --- /dev/null +++ b/src/styles/_variables.scss @@ -0,0 +1,7 @@ +$primary-color: #00acdc; +$secondary-color: #616070; +$white-color: #fff; +$black-color: #060b35; +$gray-color: #f3f3f3; +$body-color: #333; +$card-hover-title-color: #34568b; diff --git a/src/styles/index.scss b/src/styles/index.scss index 293d3b1f13..30a3baa423 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,3 +1,121 @@ +@import './variables'; +@import './header'; +@import './catalog'; +@import './stars'; +@import './card'; + body { margin: 0; + font-family: Roboto, sans-serif; + color: #333; +} + +* { + padding: 0; + margin: 0; + box-sizing: border-box; +} + +*, +*::before, +*::after { + box-sizing: border-box; +} + +/* Links */ + +a, +a:link, +a:visited { + text-decoration: none; +} + +a:hover { + text-decoration: none; +} + +/* Common */ + +aside, +nav, +footer, +header, +section, +main { + display: block; +} + +h1, +h2, +h3, +h4, +h5, +h6, +p { + font-size: inherit; + font-weight: inherit; +} + +ul, +ul li { + list-style: none; +} + +img { + vertical-align: top; +} + +img, +svg { + max-width: 100%; + height: auto; +} + +address { + font-style: normal; +} + +/* Form */ + +input, +textarea, +button, +select { + font-family: inherit; + font-size: inherit; + color: inherit; + background-color: transparent; +} + +input::-ms-clear { + display: none; +} + +textarea { + resize: vertical; +} + +button, +input[type='submit'] { + display: inline-block; + box-shadow: none; + background-color: transparent; + cursor: pointer; +} + +button::-moz-focus-inner { + padding: 0; + border: 0; +} + +label { + cursor: pointer; +} + +legend { + display: block; +} + +input[type='file'] { + max-width: 100%; }