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

Catalog

+
+ + + +
+ +
+
+ APPLE A1419 iMac 27 Retina 5K Monoblock + +

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

+

Product code: 195434

+ +
+
+
+
+
+
+
+
+ +

Reviews: 5

+
+ +
+

Price:

+

$2,199

+
+ + + BUY + +
+ +
+ APPLE A1419 iMac 27 Retina 5K Monoblock + +

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

+

Product code: 195434

+ +
+
+
+
+
+
+
+
+ +

Reviews: 5

+
+ +
+

Price:

+

$2,199

+
+ + + BUY + +
+ +
+ APPLE A1419 iMac 27 Retina 5K Monoblock + +

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

+

Product code: 195434

+ +
+
+
+
+
+
+
+
+ +

Reviews: 5

+
+ +
+

Price:

+

$2,199

+
+ + + BUY + +
+ +
+ APPLE A1419 iMac 27 Retina 5K Monoblock + +

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

+

Product code: 195434

+ +
+
+
+
+
+
+
+
+ +

Reviews: 5

+
+ +
+

Price:

+

$2,199

+
+ + + BUY + +
+ +
+ APPLE A1419 iMac 27 Retina 5K Monoblock + +

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

+

Product code: 195434

+ +
+
+
+
+
+
+
+
+ +

Reviews: 5

+
+ +
+

Price:

+

$2,199

+
+ + + BUY + +
+ +
+ APPLE A1419 iMac 27 Retina 5K Monoblock + +

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

+

Product code: 195434

+ +
+
+
+
+
+
+
+
+ +

Reviews: 5

+
+ +
+

Price:

+

$2,199

+
+ + + BUY + +
+ +
+ APPLE A1419 iMac 27 Retina 5K Monoblock + +

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

+

Product code: 195434

+ +
+
+
+
+
+
+
+
+ +

Reviews: 5

+
+ +
+

Price:

+

$2,199

+
+ + + BUY + +
+ +
+ APPLE A1419 iMac 27 Retina 5K Monoblock + +

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

+

Product code: 195434

+ +
+
+
+
+
+
+
+
+ +

Reviews: 5

+
+ +
+

Price:

+

$2,199

+
+ + + BUY + +
+
diff --git a/src/styles/_variables.scss b/src/styles/_variables.scss new file mode 100644 index 0000000000..dd16ca03e3 --- /dev/null +++ b/src/styles/_variables.scss @@ -0,0 +1,6 @@ +$color-primary: #00acdc; +$color-border: #e0e0e0; +$color-white: #fff; +$color-text: #060b35; +$color-title-hover: #34568b; +$transition-duration: 300ms; diff --git a/src/styles/card.scss b/src/styles/card.scss new file mode 100644 index 0000000000..67c52d436f --- /dev/null +++ b/src/styles/card.scss @@ -0,0 +1,106 @@ +.card { + box-sizing: border-box; + border: 1px solid #f3f3f3; + border-radius: 5px; + width: 200px; + padding: 32px 16px 16px; + transition: transform $transition-duration; + + &:hover { + transform: scale(1.2); + } + + &__image { + width: 160px; + height: 134px; + display: block; + margin: 0 auto 40px; + } + + &__title { + font-size: 12px; + font-weight: 500; + line-height: 18px; + margin-bottom: 4px; + color: $color-text; + transition: color $transition-duration; + } + + // змінюємо колір заголовка при наведенні на всю картку + &:hover &__title { + color: $color-title-hover; + } + + &__description { + font-size: 10px; + font-weight: 400; + line-height: 14px; + color: #616070; + margin-bottom: 16px; + } + + &__reviews { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 24px; + } + + &__reviews-count { + font-size: 10px; + font-weight: 400; + line-height: 16px; + letter-spacing: 0; + color: $color-text; + } + + &__price { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 16px; + } + + &__price-label { + font-size: 12px; + font-weight: 400; + line-height: 18px; + color: #616070; + } + + &__price-amount { + font-size: 16px; + font-weight: 700; + line-height: 18px; + color: $color-text; + } + + &__button { + display: inline-block; + width: 166px; + padding: 12px 0; + background-color: $color-primary; + + color: $color-white; + text-align: center; + text-decoration: none; + text-transform: uppercase; + font-weight: 700; + font-size: 14px; + line-height: 16px; + letter-spacing: 0; + border-radius: 5px; + cursor: pointer; + box-sizing: border-box; + transition: + background-color $transition-duration, + color $transition-duration; + + &:hover { + background-color: $color-white; + color: $color-primary; + outline: 1px solid $color-primary; + outline-offset: -1px; + } + } +} diff --git a/src/styles/index.scss b/src/styles/index.scss index 293d3b1f13..e7a478fbfa 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,3 +1,110 @@ +@import 'variables'; + +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +html { + font-family: Roboto, sans-serif; +} + body { margin: 0; } + +img { + display: block; +} + +// Шапка сайту +.header { + display: flex; + align-items: center; + background-color: $color-white; + padding: 0 50px; + + &__nav { + margin-left: auto; // притискаємо навігацію до правого краю + } +} + +// Навігація +.nav { + &__list { + list-style: none; + padding: 0; + margin: 0; + display: flex; + } + + &__item { + margin: 0 10px; + + &:first-child { + margin-left: 0; + } + + &:last-child { + margin-right: 0; + } + } + + &__link { + display: flex; + align-items: center; + height: 60px; + text-decoration: none; + color: $color-text; // #060b35 — більше не чорний + text-transform: uppercase; + font-weight: 500; + font-size: 12px; + position: relative; + transition: color $transition-duration; + + &:hover { + color: $color-primary; // #00acdc при наведенні + } + + &.is-active { + color: $color-primary; + + &::after { + content: ''; + display: block; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 4px; + border-radius: 2px; + background-color: $color-primary; + } + } + } +} + +// Контейнер каталогу карток +.catalog { + display: grid; + justify-content: center; + grid-template-columns: repeat(1, 200px); + gap: 46px 48px; + 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); + } +} + +@import 'card'; +@import 'stars'; diff --git a/src/styles/stars.scss b/src/styles/stars.scss new file mode 100644 index 0000000000..64c1b13aed --- /dev/null +++ b/src/styles/stars.scss @@ -0,0 +1,24 @@ +.stars { + display: flex; + + &__star { + width: 16px; + height: 16px; + margin-right: 4px; + background-image: url(../images/star.svg); + background-repeat: no-repeat; + background-position: center; + + &: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); + } +}