diff --git a/src/index.html b/src/index.html index 9cff78eeb7..fcebb19002 100644 --- a/src/index.html +++ b/src/index.html @@ -20,8 +20,321 @@ href="styles/index.scss" /> - -

Catalog

+
+ + + + +
+
+
+
+ imac +
+
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+
Product code: 195434
+
+
+
+
+
+
+
+
+
Reviews: 5
+
+
+
Price:
+
$2,199
+
+ +
+
+
+ imac +
+
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+
Product code: 195434
+
+
+
+
+
+
+
+
+
Reviews: 5
+
+
+
Price:
+
$2,199
+
+ +
+
+
+ imac +
+
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+
Product code: 195434
+
+
+
+
+
+
+
+
+
Reviews: 5
+
+
+
Price:
+
$2,199
+
+ +
+
+
+ imac +
+
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+
Product code: 195434
+
+
+
+
+
+
+
+
+
Reviews: 5
+
+
+
Price:
+
$2,199
+
+ +
+
+
+ imac +
+
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+
Product code: 195434
+
+
+
+
+
+
+
+
+
Reviews: 5
+
+
+
Price:
+
$2,199
+
+ +
+
+
+ imac +
+
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+
Product code: 195434
+
+
+
+
+
+
+
+
+
Reviews: 5
+
+
+
Price:
+
$2,199
+
+ +
+
+
+ imac +
+
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+
Product code: 195434
+
+
+
+
+
+
+
+
+
Reviews: 5
+
+
+
Price:
+
$2,199
+
+ +
+
+
+ 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..ae8a1fcf01 --- /dev/null +++ b/src/styles/card.scss @@ -0,0 +1,108 @@ +.card { + width: 200px; + height: 408px; + border: 1px solid #f3f3f3; + border-radius: 5px; + box-sizing: border-box; + transition: all 300ms; + + &:hover { + transform: scale(1.2); + } + + &__image-wrappen { + display: flex; + justify-content: center; + align-items: center; + margin: 32px 19px 40px; + width: 160px; + height: 134px; + } + + &__image { + object-fit: contain; + max-width: 100%; + } + + &__title { + margin: 0 16px 4px; + font-weight: 500; + font-size: 12px; + line-height: 18px; + color: $main-color; + } + + &:hover &__title { + color: #34568b; + } + + &__code { + margin: 0 0 16px 16px; + font-weight: 400; + font-size: 10px; + line-height: 14px; + color: #616070; + } + + &__rating { + display: flex; + justify-content: space-between; + margin: 0 16px 24px; + width: 166px; + height: 16px; + } + + &__reviews { + font-weight: 400; + font-size: 10px; + line-height: 16px; + color: $main-color; + } + + &__price { + display: flex; + justify-content: space-between; + margin: 0 16px 16px; + width: 166px; + height: 18px; + } + + &__price-text { + font-weight: 400; + font-size: 12px; + line-height: 18px; + color: #616070; + align-items: bottom; + } + + &__price-number { + font-weight: 700; + font-size: 16px; + line-height: 18px; + color: $main-color; + justify-content: right; + align-items: bottom; + } + + &__button { + margin-left: 16px; + width: 166px; + height: 40px; + box-sizing: border-box; + border: 1px solid #00acdc; + border-radius: 5px; + background-color: #00acdc; + color: #fff; + text-transform: uppercase; + font-family: Roboto, sans-serif; + font-weight: 700; + font-size: 14px; + line-height: 16px; + transition: all 300ms; + + &:hover { + background-color: #fff; + color: #00acdc; + } + } +} diff --git a/src/styles/catalog.scss b/src/styles/catalog.scss new file mode 100644 index 0000000000..946659126f --- /dev/null +++ b/src/styles/catalog.scss @@ -0,0 +1,19 @@ +.main { + display: grid; + grid-template-columns: 200px; + gap: 46px 48px; + padding: 50px 40px; + justify-content: center; + + @media (min-width: 488px) { + grid-template-columns: 200px 200px; + } + + @media (min-width: 768px) { + grid-template-columns: 200px 200px 200px; + } + + @media (min-width: 1024px) { + grid-template-columns: 200px 200px 200px 200px; + } +} diff --git a/src/styles/header.scss b/src/styles/header.scss new file mode 100644 index 0000000000..f077eec523 --- /dev/null +++ b/src/styles/header.scss @@ -0,0 +1,12 @@ +.header { + display: flex; + justify-content: space-between; + align-items: center; + height: $header-height; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05); + padding: 0 50px; + + &__logo-link { + display: flex; + } +} diff --git a/src/styles/index.scss b/src/styles/index.scss index 293d3b1f13..c4dd72bcad 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,3 +1,14 @@ +$header-height: 60px; +$main-color: #060b35; + body { + font-family: Roboto, sans-serif; margin: 0; + scroll-behavior: smooth; } + +@import './header'; +@import './nav'; +@import './catalog'; +@import './card'; +@import './stars'; diff --git a/src/styles/nav.scss b/src/styles/nav.scss new file mode 100644 index 0000000000..5fb5192ea2 --- /dev/null +++ b/src/styles/nav.scss @@ -0,0 +1,47 @@ +.nav { + &__list { + display: flex; + padding: 0; + margin: 0; + gap: 20px; + list-style: none; + } + &__item { + display: flex; + padding: 0; + } + + &__link { + display: flex; + align-items: center; + text-decoration: none; + color: $main-color; + text-transform: uppercase; + font-size: 12px; + font-weight: 500; + line-height: 100%; + height: $header-height; + padding: 0; + transition: color 300ms; + + &:hover { + color: #00acdc; + } + } +} + +.is-active { + position: relative; + color: #00acdc; + + &::after { + position: absolute; + display: block; + content: ''; + height: 4px; + width: 100%; + background-color: #00acdc; + border-radius: 8px; + bottom: 0; + } +} diff --git a/src/styles/stars.scss b/src/styles/stars.scss new file mode 100644 index 0000000000..c7c6a9610f --- /dev/null +++ b/src/styles/stars.scss @@ -0,0 +1,33 @@ +.stars { + display: flex; + flex-direction: row; + gap: 4px; + + &__star { + background-image: url(../images/star.svg); + background-repeat: no-repeat; + background-position: center; + height: 16px; + width: 16px; + } + + &--1 &__star:nth-child(-n + 1) { + background-image: url(../images/star-active.svg); + } + + &--2 &__star:nth-child(-n + 2) { + background-image: url(../images/star-active.svg); + } + + &--3 &__star:nth-child(-n + 3) { + background-image: url(../images/star-active.svg); + } + + &--4 &__star:nth-child(-n + 4) { + background-image: url(../images/star-active.svg); + } + + &--5 &__star:nth-child(-n + 5) { + background-image: url(../images/star-active.svg); + } +}