diff --git a/readme.md b/readme.md index 874ca70d97..7855c32cb6 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://RHerheman.github.io/layout_catalog/) +- [TEST REPORT LINK](https://RHerheman.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..a515c67531 100644 --- a/src/index.html +++ b/src/index.html @@ -22,6 +22,355 @@ -

Catalog

+
+ + + + + +
+ +
+
+
+
+ +

+ 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/card.scss b/src/styles/card.scss new file mode 100644 index 0000000000..412efc4c14 --- /dev/null +++ b/src/styles/card.scss @@ -0,0 +1,87 @@ +.card { + display: flex; + flex-direction: column; + width: 200px; + box-sizing: border-box; + border: 1px solid rgba(243, 243, 243, 1); + border-radius: 5px; + transition: transform 0.3s ease; + color: $black; + + &:hover { + transform: scale(120%); + color: #34568b; + } + + &__image { + background-image: url(../images/imac.jpeg); + background-repeat: no-repeat; + background-size: 160px 134px; + height: 166px; + background-position: 19px 32px; + } + + &__apple { + margin: 0; + padding: 40px 16px 0; + font-weight: 500; + font-size: 12px; + line-height: 18px; + } + + &__product { + margin: 0; + padding: 4px 16px 0; + font-size: 10px; + line-height: 14px; + color: $grey; + } + + &__price { + width: 166px; + height: 18px; + display: flex; + padding: 24px 16px 16px; + justify-content: space-between; + + &_text { + font-size: 12px; + margin: 0; + line-height: 18px; + color: $grey; + } + + &_amount { + font-size: 16px; + font-weight: 700; + margin: 0; + line-height: 18px; + color: $black; + } + } + + &__box { + padding: 0 16px 16px; + } + + &__button { + width: 166px; + height: 40px; + border-radius: 5px; + background-color: $blue; + border: 0; + + &:hover { + border: 1px solid $blue; + background: $white; + color: $blue; + } + + &--text { + font-weight: 700; + font-size: 14px; + line-height: 16px; + color: $white; + } + } +} diff --git a/src/styles/container.scss b/src/styles/container.scss new file mode 100644 index 0000000000..1dd5cc01b8 --- /dev/null +++ b/src/styles/container.scss @@ -0,0 +1,24 @@ +.container { + padding: 50px 40px; + margin: auto; + display: grid; + width: 944px; + height: 862px; + + grid-template-columns: repeat(1, 1fr); + justify-items: center; + + gap: 46px 48px; + + @media (min-width: 488px) { + grid-template-columns: repeat(2, 1fr); + } + + @media (min-width: 768px) { + grid-template-columns: repeat(3, 1fr); + } + + @media (min-width: 1024px) { + grid-template-columns: repeat(4, 1fr); + } +} diff --git a/src/styles/header.scss b/src/styles/header.scss new file mode 100644 index 0000000000..fb1ae135c3 --- /dev/null +++ b/src/styles/header.scss @@ -0,0 +1,65 @@ +.header { + $blue: #00acdc; + + width: 100%; + display: flex; + justify-content: space-between; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05); + font-size: 12px; + font-weight: 500; +} + +.logo { + position: absolute; + margin: 0 auto; + top: 10px; + left: 50px; +} + +.nav { + margin-right: 50px; + + &__list { + display: flex; + list-style: none; + margin: 0; + padding: 0; + } + + &__link { + display: block; + line-height: 60px; + color: #060b35; + text-decoration: none; + text-transform: uppercase; + + &:hover { + color: $blue; + } + } +} + +.nav li { + margin-right: 20px; + + &:last-child { + margin-right: 0; + } +} + +.is-active { + position: relative; + color: $blue; + + &::after { + position: absolute; + content: ''; + left: 0; + right: 0; + bottom: 0; + + height: 4px; + background-color: $blue; + border-radius: 8px; + } +} diff --git a/src/styles/index.scss b/src/styles/index.scss index 293d3b1f13..7d711f5b9f 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,3 +1,6 @@ -body { - margin: 0; -} +@import './variables'; +@import './header'; +@import './page'; +@import './card'; +@import './stars'; +@import './container'; diff --git a/src/styles/page.scss b/src/styles/page.scss new file mode 100644 index 0000000000..23ebe1d0ad --- /dev/null +++ b/src/styles/page.scss @@ -0,0 +1,8 @@ +html { + font-family: Roboto, Arial, sans-serif; +} + +body { + margin: 0; + padding: 0; +} diff --git a/src/styles/stars.scss b/src/styles/stars.scss new file mode 100644 index 0000000000..9736325973 --- /dev/null +++ b/src/styles/stars.scss @@ -0,0 +1,27 @@ +.stars { + display: flex; + justify-content: space-between; + width: 166px; + height: 16px; + line-height: 16px; + padding: 16px 16px 0; + + &--4 :nth-child(-n + 4) { + background-image: url(../images/star-active.svg); + } + + &__image { + background-image: url(../images/star.svg); + background-repeat: no-repeat; + background-position: center; + height: 16px; + width: 16px; + } + + &__text { + font-size: 10px; + line-height: 16px; + padding-left: 17px; + color: $black; + } +} diff --git a/src/styles/variables.scss b/src/styles/variables.scss new file mode 100644 index 0000000000..a0c911f6cd --- /dev/null +++ b/src/styles/variables.scss @@ -0,0 +1,4 @@ +$blue: #00acdc; +$black: rgba(6, 11, 53, 1); +$white: #fff; +$grey: rgba(97, 96, 112, 1);