diff --git a/readme.md b/readme.md index 874ca70d97..c801c1a8ef 100644 --- a/readme.md +++ b/readme.md @@ -9,7 +9,7 @@ Create an HTML page with a catalog. Develop semantic page structure as shown on - add `data-qa="card-hover"` (not just `hover`) to the link `Buy` inside the first card - nav links color is not `black` anymore (nav links should have `#060b35` color) - add the class `is-active` to the first link (`Apple`) in the navigation -- use `
` tag for cards container +- use `
` tag for cards container - use the grid for cards with different numbers of columns: - 1 for the smaller screens - 2 starting at `488px` @@ -33,8 +33,8 @@ This is possible because [we use the Parcel library](https://en.parceljs.org/scs ## Checklist ❗️ Replace `` with your GitHub username and copy the links to the `Pull Request` description: -- [DEMO LINK](https://.github.io/layout_catalog/) -- [TEST REPORT LINK](https://.github.io/layout_catalog/report/html_report/) +- [DEMO LINK](https://mmromanova.github.io/layout_catalog/) +- [TEST REPORT LINK](https://mmromanova.github.io/layout_catalog/report/html_report/) ❗️ Copy this `Checklist` to the `Pull Request` description after links, and put `- [x]` before each point after you checked it. diff --git a/src/index.html b/src/index.html index 9cff78eeb7..55377e436a 100644 --- a/src/index.html +++ b/src/index.html @@ -22,6 +22,366 @@ -

Catalog

+
+ + + MOYO Logo + + + +
+ +
+
+
+
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+
+ Product code: 195434 +
+
+
+
+
+
+
+
+
+
+
+ Reviews: 5 +
+
+
+
+ Price: +
+
+ $2,199 +
+
+ +
+ + +
+
+
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+
+ Product code: 195434 +
+
+
+
+
+
+
+
+
+
+
+ Reviews: 5 +
+
+
+
+ Price: +
+
+ $2,199 +
+
+ +
+ +
+
+
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+
+ Product code: 195434 +
+
+
+
+
+
+
+
+
+
+
+ Reviews: 5 +
+
+
+
+ Price: +
+
+ $2,199 +
+
+ +
+ +
+
+
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+
+ Product code: 195434 +
+
+
+
+
+
+
+
+
+
+
+ Reviews: 5 +
+
+
+
+ Price: +
+
+ $2,199 +
+
+ +
+ +
+
+
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+
+ Product code: 195434 +
+
+
+
+
+
+
+
+
+
+
+ Reviews: 5 +
+
+
+
+ Price: +
+
+ $2,199 +
+
+ +
+ +
+
+
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+
+ Product code: 195434 +
+
+
+
+
+
+
+
+
+
+
+ Reviews: 5 +
+
+
+
+ Price: +
+
+ $2,199 +
+
+ +
+ + +
+
+
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+
+ Product code: 195434 +
+
+
+
+
+
+
+
+
+
+
+ Reviews: 5 +
+
+
+
+ Price: +
+
+ $2,199 +
+
+ +
+ +
+
+
+ APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) +
+
+ Product code: 195434 +
+
+
+
+
+
+
+
+
+
+
+ Reviews: 5 +
+
+
+
+ Price: +
+
+ $2,199 +
+
+ +
+
+ + + diff --git a/src/styles/base.scss b/src/styles/base.scss new file mode 100644 index 0000000000..bcac137c07 --- /dev/null +++ b/src/styles/base.scss @@ -0,0 +1,59 @@ +body { + margin: 0; + --column-count: 1; +} + + + +.main { + padding-top: $main-padding-top; + padding-inline: $main-padding-inline; + display: grid; + grid-template-columns: repeat(var(--column-count), $card-width); + row-gap: $row-gap; + column-gap: $column-gap; + justify-content: center; +} + +@media (min-width: 488px) { + .main { + --column-count: 2; + } +} + +@media (min-width: 768px) { + .main { + --column-count: 3; + } +} + +@media (min-width: 1024px) { + .main { + --column-count: 4; + } +} + +.product { + margin-top: 1px; + margin-left: 1px; + width: $card-width; + height: $card-height; + border: 1px solid $white_color; + border-radius: $border-radius; + font-family: $font-family; + + background-image: url(../images/imac.jpeg); + background-repeat: no-repeat; + background-size: 160px 134px; + background-position: center 33px; + transition: transform $anim-duration ease; + + &:hover { + transform: scale(1.2); + .card__name { + color: #34568b; + } + } +} + + diff --git a/src/styles/button.scss b/src/styles/button.scss new file mode 100644 index 0000000000..71b6c7de23 --- /dev/null +++ b/src/styles/button.scss @@ -0,0 +1,24 @@ +.to-buy { + display: block; + width: 166px; + margin-left: $padding-left; + border: 1px solid $blue_color; + margin-top: 16px; + background-color: $blue_color; + color: $white_color; + text-align: center; + line-height: 40px; + height: 40px; + border-radius: $border-radius; + font-weight: 700; + font-size: 14px; + font-family: $font-family; + + transition: color $anim-duration ease, background-color $anim-duration ease; + + &:hover { + border: 1px solid $blue_color; + color: $blue_color; + background-color: $white_color; + } +} diff --git a/src/styles/card.scss b/src/styles/card.scss new file mode 100644 index 0000000000..50710c4c2e --- /dev/null +++ b/src/styles/card.scss @@ -0,0 +1,21 @@ +.card { + display: flex; + flex-direction: column; + + &__name { + padding-top: 207px; + font-weight: 500; + font-size: 12px; + color: $text-color-strong; + padding-inline: 16px; + transition: color $anim-duration ease; + } + + &__product-code { + font-weight: 400; + font-size: 10px; + margin-top: 4px; + color: $text-color; + padding-left: $padding-left; + } +} diff --git a/src/styles/index.scss b/src/styles/index.scss index 293d3b1f13..1fcb2b5dac 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,3 +1,7 @@ -body { - margin: 0; -} +@import 'variables'; +@import 'base'; +@import 'card'; +@import 'stars'; +@import 'price'; +@import 'button'; +@import 'moyo-logo'; diff --git a/src/styles/moyo-logo.scss b/src/styles/moyo-logo.scss new file mode 100644 index 0000000000..4d3b96ed44 --- /dev/null +++ b/src/styles/moyo-logo.scss @@ -0,0 +1,91 @@ +:root { + --blue-color: #00acdc; +} + +body { + margin: 0; + padding: 0; + font-family: Roboto, sans-serif; +} + +.logoimage { + height: 40px; + flex-shrink: 0; +} + +.logo-container { + display: flex; + align-items: center; + justify-content: flex-start; +} + +.header { + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + height: 60px; + box-sizing: border-box; + padding: 0 50px; + box-shadow: 0px 2px 4px 0px #0000000D; +} + +.nav { + display: flex; + align-items: center; + justify-content: flex-end; + flex-wrap: nowrap; + text-transform: uppercase; +} + +.nav-list { + display: flex; + padding: 0; + margin: 0; + list-style: none; + height: 60px; + line-height: 60px; + font-weight: 500; +} + +.menu-item { + font-size: 12px; + margin: 0 10px; + position: relative; + text-align: center; + text-decoration: none; + color: #060B35; + display: flex; + justify-content: center; + align-items: center; + white-space: nowrap; + height: 100%; + transition: color $anim-duration ease; +} + +.menu-item:hover { + color: var(--blue-color); +} + +.menu-item.is-active { + color: var(--blue-color); +} + +.menu-item.is-active::after { + content: ''; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 4px; + background-color: var(--blue-color); + border-radius: 8px; +} + +.nav-list li:first-child .menu-item { + margin-left: 0; +} + +.nav-list li:last-child .menu-item { + margin-right: 0; +} diff --git a/src/styles/price.scss b/src/styles/price.scss new file mode 100644 index 0000000000..ca239fd5b9 --- /dev/null +++ b/src/styles/price.scss @@ -0,0 +1,19 @@ +.price { + display: flex; + justify-content: space-between; + margin-top: 24px; + padding-left: $padding-left; + + &--label { + color: $text-color; + font-weight: 400; + font-size: 12px; + } + + &--value { + color: $text-color-strong; + font-weight: 700; + font-size: 16px; + margin-right: 16px; + } +} diff --git a/src/styles/stars.scss b/src/styles/stars.scss new file mode 100644 index 0000000000..f1c304bc77 --- /dev/null +++ b/src/styles/stars.scss @@ -0,0 +1,30 @@ +.rate { + padding-left: $padding-left; + margin-top: 16px; + display: flex; + justify-content: space-between; + align-items: center; + + &--stars { + display: flex; + &__star { + width: 16px; + height: 16px; + background-image: url(../images/star.svg); + background-repeat: no-repeat; + background-position: center; + margin-right: 4px; + } + } + + &--stars-4 .rate--stars__star:nth-child(-n + 4) { + background-image: url(../images/star-active.svg); + } + + &--reviews { + color: $text-color-strong; + font-weight: 400; + font-size: 10px; + margin-right: 16px; + } +} diff --git a/src/styles/variables.scss b/src/styles/variables.scss new file mode 100644 index 0000000000..be1a6db3cf --- /dev/null +++ b/src/styles/variables.scss @@ -0,0 +1,15 @@ +$padding: 16px; +$font-family: Roboto, sans-serif; +$blue_color: #00ACDC; +$white_color: #f3f3f3; +$text-color: #616070; +$text-color-strong: #060B35; +$border-radius: 5px; +$padding-left: 16px; +$card-width: 198px; +$card-height: 406px; +$anim-duration: 300ms; +$row-gap: 48px; +$column-gap: 46px; +$main-padding-top: 50px; +$main-padding-inline: 40px;