diff --git a/src/index.html b/src/index.html index 9cff78eeb7..c463e1b241 100644 --- a/src/index.html +++ b/src/index.html @@ -22,6 +22,400 @@ -

Catalog

+
+ + + +
+ +
+
+ image + +
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+ +
Product code: 195434
+ +
+
+
+ + + + + +
+
+
Reviews: 5
+
+ +
+
Price:
+
$2,199
+
+ + + Buy + +
+ +
+ image + +
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+ +
Product code: 195434
+ +
+
+
+ + + + + +
+
+
Reviews: 5
+
+ +
+
Price:
+
$2,199
+
+ + + Buy + +
+ +
+ image + +
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+ +
Product code: 195434
+ +
+
+
+ + + + + +
+
+
Reviews: 5
+
+ +
+
Price:
+
$2,199
+
+ + + Buy + +
+ +
+ image + +
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+ +
Product code: 195434
+ +
+
+
+ + + + + +
+
+
Reviews: 5
+
+ +
+
Price:
+
$2,199
+
+ + + Buy + +
+
+ image + +
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+ +
Product code: 195434
+ +
+
+
+ + + + + +
+
+
Reviews: 5
+
+ +
+
Price:
+
$2,199
+
+ + + Buy + +
+
+ image + +
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+ +
Product code: 195434
+ +
+
+
+ + + + + +
+
+
Reviews: 5
+
+ +
+
Price:
+
$2,199
+
+ + + Buy + +
+
+ image + +
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+ +
Product code: 195434
+ +
+
+
+ + + + + +
+
+
Reviews: 5
+
+ +
+
Price:
+
$2,199
+
+ + + Buy + +
+
+ image + +
+ 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..16e706d7b2 --- /dev/null +++ b/src/styles/card.scss @@ -0,0 +1,101 @@ +.card { + box-sizing: border-box; + width: $card-width; + display: flex; + flex-direction: column; + align-items: center; + + border: 1px solid #f3f3f3; + border-radius: 5px; + + padding: 32px 16px 16px; + + @include smooth-hover; + + &__image { + height: 134px; + width: 160px; + + margin: 0 auto; + } + + &__title { + margin-top: 40px; + + font-weight: 500; + font-size: 12px; + line-height: 18px; + + color: $text-main-color; + } + + &__product-code { + margin-top: 4px; + + @include width-with-spacing; + + font-size: 10px; + color: $text-secondary-color; + } + + &__rate { + margin-top: 16px; + + @include width-with-spacing; + + align-items: flex-end; + font-size: 10px; + } + + &__price { + margin-top: 24px; + font-size: 16px; + line-height: 18px; + + @include width-with-spacing; + + &-title { + color: $text-secondary-color; + font-size: 12px; + } + + &-amount { + font-weight: 700; + font-size: 16px; + } + } + + &__button_buy { + margin-top: 16px; + + @include smooth-hover; + @include width-with-spacing; + + justify-content: center; + box-sizing: border-box; + background-color: $accent-color; + border: none; + border-radius: 5px; + height: 40px; + font-size: 14px; + text-transform: uppercase; + color: #fff; + font-weight: 700; + text-decoration: none; + + &:hover { + background-color: #fff; + border: 1px solid $accent-color; + color: $accent-color; + font-weight: 700; + } + } + + &:hover { + transform: scale(1.2); + + .card__title { + color: #34568b; + } + } +} diff --git a/src/styles/content.scss b/src/styles/content.scss new file mode 100644 index 0000000000..ce4381a7b2 --- /dev/null +++ b/src/styles/content.scss @@ -0,0 +1,20 @@ +.content { + box-sizing: border-box; + padding: $container-vertical-padding $container-horizontal-padding; + display: grid; + grid-template-columns: repeat(1, $card-width); + justify-content: center; + gap: $container-vertical-gap $container-horizontal-gap; + + @include on-small-screen { + grid-template-columns: repeat(2, $card-width); + } + + @include on-medium-screen { + grid-template-columns: repeat(3, $card-width); + } + + @include on-large-screen { + grid-template-columns: repeat(4, $card-width); + } +} diff --git a/src/styles/header.scss b/src/styles/header.scss new file mode 100644 index 0000000000..06f74ad44b --- /dev/null +++ b/src/styles/header.scss @@ -0,0 +1,14 @@ +.header { + display: flex; + align-items: center; + justify-content: space-between; + background-color: #fff; + padding: 0 50px; + box-shadow: 0 2px 4px 0 #0000000d; + + &__logo { + display: flex; + height: 40px; + width: 40px; + } +} diff --git a/src/styles/index.scss b/src/styles/index.scss index 293d3b1f13..1d6b5ff235 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,3 +1,20 @@ +@import '../styles/utilites/variables'; +@import '../styles/utilites/mixins'; +@import './content'; +@import './card'; +@import './stars'; +@import './header'; +@import './nav'; + +html { + font-family: Roboto, sans-serif; + font-style: normal; + font-weight: 400; + line-height: 14px; + + color: $text-main-color; +} + body { margin: 0; } diff --git a/src/styles/nav.scss b/src/styles/nav.scss new file mode 100644 index 0000000000..622e71ad78 --- /dev/null +++ b/src/styles/nav.scss @@ -0,0 +1,57 @@ +.nav { + &__list { + display: flex; + align-items: center; + margin: 0; + padding: 0; + list-style: none; + } + + &__item { + margin-left: 20px; + } + + &__list :first-child { + margin-left: 0; + } + + &__link { + @include smooth-hover; + + position: relative; + + display: flex; + align-items: center; + + padding: 0; + height: 60px; + color: $text-main-color; + + font-family: Roboto, sans-serif; + font-size: 12px; + font-weight: 500; + white-space: nowrap; + text-decoration: none; + text-transform: uppercase; + } + + &__link:hover { + color: $accent-color; + } + + &__link.is-active { + color: $accent-color; + } + + &__link.is-active::after { + content: ''; + position: absolute; + bottom: 0; + right: 0; + left: 0; + + height: 4px; + background-color: $accent-color; + border-radius: 8px; + } +} diff --git a/src/styles/stars.scss b/src/styles/stars.scss new file mode 100644 index 0000000000..876b627e71 --- /dev/null +++ b/src/styles/stars.scss @@ -0,0 +1,28 @@ +.stars { + display: flex; + + &__star { + box-sizing: border-box; + 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--1 .stars__star:nth-of-type(-n + 1), +.stars--2 .stars__star:nth-of-type(-n + 2), +.stars--3 .stars__star:nth-of-type(-n + 3), +.stars--4 .stars__star:nth-of-type(-n + 4), +.stars--5 .stars__star:nth-of-type(-n + 5) { + background-image: url('../images/star-active.svg'); +} diff --git a/src/styles/utilites/mixins.scss b/src/styles/utilites/mixins.scss new file mode 100644 index 0000000000..8c0c6c8347 --- /dev/null +++ b/src/styles/utilites/mixins.scss @@ -0,0 +1,29 @@ +@mixin width-with-spacing() { + width: 100%; + + display: flex; + align-items: center; + justify-content: space-between; +} + +@mixin on-small-screen() { + @media (min-width: $width-small) { + @content; + } +} + +@mixin on-medium-screen() { + @media (min-width: $width-medium) { + @content; + } +} + +@mixin on-large-screen() { + @media (min-width: $width-large) { + @content; + } +} + +@mixin smooth-hover { + transition: 300ms; +} diff --git a/src/styles/utilites/variables.scss b/src/styles/utilites/variables.scss new file mode 100644 index 0000000000..a25c488f77 --- /dev/null +++ b/src/styles/utilites/variables.scss @@ -0,0 +1,11 @@ +$text-main-color: #060b35; +$text-secondary-color: #616070; +$accent-color: #00acdc; +$card-width: 200px; +$container-vertical-padding: 50px; +$container-horizontal-padding: 40px; +$container-vertical-gap: 46px; +$container-horizontal-gap: 48px; +$width-small: 488px; +$width-medium: 768px; +$width-large: 1024px;