Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Frontend practice with catalog page

Create an HTML page with a catalog. Develop semantic page structure as shown on [the mockup](https://www.figma.com/file/ojkArVazq7vsX0nbpn9CxZ/Moyo-%2F-Catalog-(ENG)?node-id=32249%3A354).
Create an HTML page with a catalog. Develop semantic page structure as shown on [the mockup](<https://www.figma.com/file/ojkArVazq7vsX0nbpn9CxZ/Moyo-%2F-Catalog-(ENG)?node-id=32249%3A354>).

- use `Header`, `Stars` and `Card` blocks from previous tasks but rewrite them using BEM and SCSS
- remove old `data-qa` attributes
Expand All @@ -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 `<main>` tag for cards container
- use `<main>` tag for cards container
- use the grid for cards with different numbers of columns:
- 1 for the smaller screens
- 2 starting at `488px`
Expand All @@ -20,21 +20,23 @@ Create an HTML page with a catalog. Develop semantic page structure as shown on
- cards container(catalog) have fixed paddings (`50px` vertically and `40px` horizontally)

Make all the changes smooth on hover (during 300ms):

- increase the card by 20 percent (neighboring cards **should not be** affected)
- change the card title text color to `#34568b` when the card is hovered (`.card:hover .card__title`)
- change navigation link text color to `#00acdc`
- change the button background to `#fff` and text color to `#00acdc` on hover

> Here are the [Layout Tasks Instructions](https://mate-academy.github.io/layout_task-guideline)

*Important note*: In this task, you are allowed to link `*.scss` files directly in HTML `<link>` tags using `href` attribute.
_Important note_: In this task, you are allowed to link `*.scss` files directly in HTML `<link>` tags using `href` attribute.
This is possible because [we use the Parcel library](https://en.parceljs.org/scss.html) to bundle your solution's source code.

## Checklist

❗️ Replace `<your_account>` with your GitHub username and copy the links to the `Pull Request` description:
- [DEMO LINK](https://<your_account>.github.io/layout_catalog/)
- [TEST REPORT LINK](https://<your_account>.github.io/layout_catalog/report/html_report/)

- [DEMO LINK](https://dmitromurashov-lgtm.github.io/layout_catalog/)
- [TEST REPORT LINK](https://dmitromurashov-lgtm.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.

Expand Down
9 changes: 9 additions & 0 deletions src/images/Rectangle 4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/images/imac.jpeg
Binary file not shown.
Binary file added src/images/imac.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
335 changes: 334 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,339 @@
</head>

<body>
<h1>Catalog</h1>
<header class="header">
<a href="#">
<img
src="images/logo.png"
alt="Moyo logo"
class="logo"
/>
</a>
<nav class="nav">
Comment on lines +27 to +33

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This violates the description requirement: "nav links color is not black anymore (nav links should have #060b35 color" and [CHECKLIST ITEM #2] "Repeated sizes and special colors are put to variables". The color #060b35 is hardcoded both here and in cards.scss. Since it’s a special color used in multiple places, consider extracting it into a SCSS variable (e.g. $color-nav) and reusing that variable.

<ul class="nav-list">
<li class="nav-items">
<a
Comment on lines +25 to +36

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This violates [CHECKLIST ITEM #1]: "All components follow BEM and use SCSS". The header/navigation uses generic classes like logo, nav-list, nav-items, nav-link instead of BEM block/element names (e.g. header__logo, header__nav, header__nav-list, header__nav-item, etc.). Consider refactoring the header markup and corresponding SCSS to follow BEM naming for the Header block.

href="#"
class="nav-link nav-link--active"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This violates the description requirement: "add the class is-active to the first link (Apple) in the navigation". Here the first link uses nav-link nav-link--active, which is a different modifier name. Rename the modifier in HTML to match the required is-active class (and adjust the SCSS selector accordingly) so tests can find it.

>
Apple
</a>
</li>
<li class="nav-items">
<a
href="#"
class="nav-link"
>
Samsung
</a>
</li>
<li class="nav-items">
<a
href="#"
class="nav-link"
>
Smartphones
</a>
</li>
<li class="nav-items">
<a
href="#"
class="nav-link"
data-qa="nav-hover"
>
Laptops & Computers
</a>
</li>
<li class="nav-items">
<a
href="#"
class="nav-link"
>
Gadgets
</a>
</li>
<li class="nav-items">
<a
href="#"
class="nav-link"
>
Tablets
</a>
</li>
<li class="nav-items">
<a
href="#"
class="nav-link"
>
Photo
</a>
</li>
<li class="nav-items">
<a
href="#"
class="nav-link"
>
Video
</a>
</li>
</ul>
</nav>
</header>
<main>
<div class="container">
<div
class="product-card"
data-qa="card"
>
<div class="product-card__image"></div>
<div class="product-card__title">
APPLE A1419 iMac 27" Retina
<br />
5K Monoblock (MNED2UA/A)
</div>
<div class="product-card__code">Product code: 195434</div>
<div class="product-card__reviews">
<div class="stars stars--4">
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
</div>
<div class="product-card__feedback">Reviews: 5</div>
</div>

<div class="product-card__price">
<div class="product-card__price-label">Price:</div>
<div class="product-card__price-value">$2,199</div>
</div>

<a
href="#"
class="product-card__button"
data-qa="card-hover"
>
BUY
</a>
</div>
<div class="product-card">
<div class="product-card__image"></div>
<div class="product-card__title">
APPLE A1419 iMac 27" Retina
<br />
5K Monoblock (MNED2UA/A)
</div>
<div class="product-card__code">Product code: 195434</div>
<div class="product-card__reviews">
<div class="stars stars--4">
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
</div>
<div class="product-card__feedback">Reviews: 5</div>
</div>

<div class="product-card__price">
<div class="product-card__price-label">Price:</div>
<div class="product-card__price-value">$2,199</div>
</div>

<a
href="#"
class="product-card__button"
>
BUY
</a>
</div>
<div class="product-card">
<div class="product-card__image"></div>
<div class="product-card__title">
APPLE A1419 iMac 27" Retina
<br />
5K Monoblock (MNED2UA/A)
</div>
<div class="product-card__code">Product code: 195434</div>
<div class="product-card__reviews">
<div class="stars stars--4">
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
</div>
<div class="product-card__feedback">Reviews: 5</div>
</div>

<div class="product-card__price">
<div class="product-card__price-label">Price:</div>
<div class="product-card__price-value">$2,199</div>
</div>

<a
href="#"
class="product-card__button"
>
BUY
</a>
</div>
<div class="product-card">
<div class="product-card__image"></div>
<div class="product-card__title">
APPLE A1419 iMac 27" Retina
<br />
5K Monoblock (MNED2UA/A)
</div>
<div class="product-card__code">Product code: 195434</div>
<div class="product-card__reviews">
<div class="stars stars--4">
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
</div>
<div class="product-card__feedback">Reviews: 5</div>
</div>

<div class="product-card__price">
<div class="product-card__price-label">Price:</div>
<div class="product-card__price-value">$2,199</div>
</div>

<a
href="#"
class="product-card__button"
>
BUY
</a>
</div>
<div class="product-card">
<div class="product-card__image"></div>
<div class="product-card__title">
APPLE A1419 iMac 27" Retina
<br />
5K Monoblock (MNED2UA/A)
</div>
<div class="product-card__code">Product code: 195434</div>
<div class="product-card__reviews">
<div class="stars stars--4">
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
</div>
<div class="product-card__feedback">Reviews: 5</div>
</div>

<div class="product-card__price">
<div class="product-card__price-label">Price:</div>
<div class="product-card__price-value">$2,199</div>
</div>

<a
href="#"
class="product-card__button"
>
BUY
</a>
</div>
<div class="product-card">
<div class="product-card__image"></div>
<div class="product-card__title">
APPLE A1419 iMac 27" Retina
<br />
5K Monoblock (MNED2UA/A)
</div>
<div class="product-card__code">Product code: 195434</div>
<div class="product-card__reviews">
<div class="stars stars--4">
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
</div>
<div class="product-card__feedback">Reviews: 5</div>
</div>

<div class="product-card__price">
<div class="product-card__price-label">Price:</div>
<div class="product-card__price-value">$2,199</div>
</div>

<a
href="#"
class="product-card__button"
>
BUY
</a>
</div>
<div class="product-card">
<div class="product-card__image"></div>
<div class="product-card__title">
APPLE A1419 iMac 27" Retina
<br />
5K Monoblock (MNED2UA/A)
</div>
<div class="product-card__code">Product code: 195434</div>
<div class="product-card__reviews">
<div class="stars stars--4">
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
</div>
<div class="product-card__feedback">Reviews: 5</div>
</div>

<div class="product-card__price">
<div class="product-card__price-label">Price:</div>
<div class="product-card__price-value">$2,199</div>
</div>

<a
href="#"
class="product-card__button"
>
BUY
</a>
</div>
<div class="product-card">
<div class="product-card__image"></div>
<div class="product-card__title">
APPLE A1419 iMac 27" Retina
<br />
5K Monoblock (MNED2UA/A)
</div>
<div class="product-card__code">Product code: 195434</div>
<div class="product-card__reviews">
<div class="stars stars--4">
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
</div>
<div class="product-card__feedback">Reviews: 5</div>
</div>

<div class="product-card__price">
<div class="product-card__price-label">Price:</div>
<div class="product-card__price-value">$2,199</div>
</div>

<a
href="#"
class="product-card__button"
>
BUY
</a>
</div>
</div>
</main>
</body>
</html>
Loading
Loading