diff --git a/readme.md b/readme.md index 874ca70d97..e71ec62057 100644 --- a/readme.md +++ b/readme.md @@ -6,10 +6,10 @@ Create an HTML page with a catalog. Develop semantic page structure as shown on - remove old `data-qa` attributes - add `data-qa="nav-hover"` (not just `hover`) to the 4th nav link for testing (`Laptops & computers`) - add `data-qa="card"` to the first card -- add `data-qa="card-hover"` (not just `hover`) to the link `Buy` inside the first card +- add `data-qa="card-hover"` (not just `hover`) to the link `Buy` inside azhadko98 - 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://azhadko98.github.io/layout_catalog/) +- [TEST REPORT LINK](https://azhadko98.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..18b51456fa 100644 --- a/src/index.html +++ b/src/index.html @@ -21,7 +21,345 @@ /> - -

Catalog

+ +
+ Логотип + +
+
+
+
+ computer +

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

+

Product code: 195434

+
+
+
+
+
+
+
+
+

Reviews: 5

+
+
+

Price:

+

$2,199

+
+ +
+
+ computer +

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

+

Product code: 195434

+
+
+
+
+
+
+
+
+

Reviews: 5

+
+
+

Price:

+

$2,199

+
+ +
+
+ computer +

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

+

Product code: 195434

+
+
+
+
+
+
+
+
+

Reviews: 5

+
+
+

Price:

+

$2,199

+
+ +
+
+ computer +

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

+

Product code: 195434

+
+
+
+
+
+
+
+
+

Reviews: 5

+
+
+

Price:

+

$2,199

+
+ +
+
+ computer +

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

+

Product code: 195434

+
+
+
+
+
+
+
+
+

Reviews: 5

+
+
+

Price:

+

$2,199

+
+ +
+
+ computer +

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

+

Product code: 195434

+
+
+
+
+
+
+
+
+

Reviews: 5

+
+
+

Price:

+

$2,199

+
+ +
+
+ computer +

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

+

Product code: 195434

+
+
+
+
+
+
+
+
+

Reviews: 5

+
+
+

Price:

+

$2,199

+
+ +
+
+ computer +

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

+

Product code: 195434

+
+
+
+
+
+
+
+
+

Reviews: 5

+
+
+

Price:

+

$2,199

+
+ +
+
+
diff --git a/src/styles/body.scss b/src/styles/body.scss new file mode 100644 index 0000000000..29a945fdcb --- /dev/null +++ b/src/styles/body.scss @@ -0,0 +1,9 @@ +.body { + margin: 0; + font-family: Roboto, sans-serif; + font-weight: 400; + font-size: 10px; + line-height: 14px; + color: #060b35; + box-sizing: border-box; +} diff --git a/src/styles/card.scss b/src/styles/card.scss new file mode 100644 index 0000000000..d31e341ff3 --- /dev/null +++ b/src/styles/card.scss @@ -0,0 +1,108 @@ +.card { + display: flex; + flex-direction: column; + justify-content: center; + width: 200px; + padding: 32px 16px 16px; + background-color: #fff; + border: 1px solid #f3f3f3; + border-radius: 5px; + box-sizing: border-box; + transition: all 0.3s; + + &:hover { + transform: scale(1.2); + } + + &__foto { + margin-bottom: 40px; + min-height: 134px; + padding-inline: 3px; + } + + &__title { + margin-top: 0; + margin-bottom: 4px; + font-size: 12px; + font-weight: 500; + line-height: 18px; + color: #060b35; + } + + &:hover .card__title { + color: #34568b; + } + + &__product-code { + font-size: 10px; + line-height: 14px; + color: #616070; + margin-top: 0; + margin-bottom: 16px; + width: 98px; + } + + &__stars { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 0; + margin-bottom: 24px; + height: 16px; + } + + &__reviews { + font-size: 10px; + color: #060b35; + } + + &__price { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 0; + margin-bottom: 16px; + height: 18px; + } + + &__name-price { + font-size: 12px; + line-height: 18px; + color: #616070; + } + + &__num-price { + font-weight: 700; + font-size: 16px; + line-height: 18px; + color: #060b35; + } + + &__button { + box-sizing: border-box; + padding: 0; + font-family: Roboto, sans-serif; + color: #fff; + width: 100%; + height: 40px; + font-weight: 700; + font-size: 14px; + line-height: 16px; + background-color: #00acdc; + border-radius: 5px; + border: 1px solid #00acdc; + outline: none; + display: flex; + justify-content: center; + align-items: center; + text-transform: uppercase; + text-align: center; + + &:hover { + background-color: white; + border: 1px solid #00acdc; + color: #00acdc; + transition: 0.3s; + } + } +} diff --git a/src/styles/header.scss b/src/styles/header.scss new file mode 100644 index 0000000000..dabac2579b --- /dev/null +++ b/src/styles/header.scss @@ -0,0 +1,62 @@ +.header { + display: flex; + justify-content: space-between; + align-items: center; + padding-inline: 50px; + height: 60px; + box-shadow: 0 2px 4px 0 #0000000d; + + font-family: Roboto, sans-serif; + font-size: 12px; + font-weight: 500; +} + +.nav { + display: flex; +} + +.nav__list { + display: flex; + list-style: none; + padding: 0; + align-items: center; +} + +.nav__item { + margin-left: 20px; + position: relative; +} + +.nav__item:first-child { + margin-left: 0; +} + +.nav__link { + display: block; + position: relative; + color: #060b35; + text-decoration: none; + text-align: center; + line-height: 60px; + text-transform: uppercase; +} + +.nav__link:hover { + color: #00acdc; +} + +.is-active { + color: #00acdc; + position: relative; +} + +.is-active::after { + content: ''; + display: block; + width: 100%; + height: 4px; + position: absolute; + background-color: #00acdc; + bottom: 0; + border-radius: 8px; +} diff --git a/src/styles/index.scss b/src/styles/index.scss index 293d3b1f13..7a84ada4af 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,3 +1,5 @@ -body { - margin: 0; -} +@import './body'; +@import './header'; +@import './card'; +@import './stars'; +@import './main'; diff --git a/src/styles/main.scss b/src/styles/main.scss new file mode 100644 index 0000000000..deb02072d0 --- /dev/null +++ b/src/styles/main.scss @@ -0,0 +1,30 @@ +.main { + display: flex; + justify-content: center; + align-items: center; +} + +.main__container { + display: grid; + padding: 50px 40px; + grid-template-columns: repeat(var(--count-size-monitor), 200px); + gap: 46px 48px; +} + +@media (min-width: 488px) { + .main__container { + --count-size-monitor: 2; + } +} + +@media (min-width: 768px) { + .main__container { + --count-size-monitor: 3; + } +} + +@media (min-width: 1024px) { + .main__container { + --count-size-monitor: 4; + } +} diff --git a/src/styles/stars.scss b/src/styles/stars.scss new file mode 100644 index 0000000000..4fb310c40d --- /dev/null +++ b/src/styles/stars.scss @@ -0,0 +1,20 @@ +.stars { + display: flex; + + &__star { + width: 16px; + height: 16px; + background-image: url('../images/star.svg'); + background-position: center; + background-repeat: no-repeat; + margin-right: 4px; + } +} + +.stars--1 .stars__star:nth-child(-n + 1), +.stars--2 .stars__star:nth-child(-n + 2), +.stars--3 .stars__star:nth-child(-n + 3), +.stars--4 .stars__star:nth-child(-n + 4), +.stars--5 .stars__star:nth-child(-n + 5) { + background-image: url('../images/star-active.svg'); +}