Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create products catalog #4931

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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://OlehYavoriv.github.io/layout_catalog/)
- [TEST REPORT LINK](https://OlehYavoriv.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
317 changes: 316 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,321 @@
</head>

<body>
<h1>Catalog</h1>
<header class="header">
<a
href="/"
class="header__logo"
>
<img
src="images/logo.png"
alt="Logo"
/>
</a>
<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
<a
href="#apple"
class="nav__link is-active"
>
Apple
</a>
</li>
<li class="nav__item">
<a
href="#samsung"
class="nav__link"
>
Samsung
</a>
</li>
<li class="nav__item">
<a
href="#Smartphones"
class="nav__link"

Choose a reason for hiding this comment

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

The data-qa attribute is missing for this navigation link. Ensure consistency by adding data-qa attributes to all similar elements if needed for testing or automation.

>
Smartphones
</a>
</li>
<li class="nav__item">
<a
href="#laptops&computers"
class="nav__link"
data-qa="nav-hover"
>
Laptops & Computers
</a>
</li>
<li class="nav__item">
<a
href="#gadgets"
class="nav__link"

Choose a reason for hiding this comment

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

The data-qa attribute is missing for this navigation link. Ensure consistency by adding data-qa attributes to all similar elements if needed for testing or automation.

>
Gadgets
</a>
</li>
<li class="nav__item">
<a
href="#tablets"
class="nav__link"

Choose a reason for hiding this comment

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

The data-qa attribute is missing for this navigation link. Ensure consistency by adding data-qa attributes to all similar elements if needed for testing or automation.

>
Tablets
</a>
</li>
<li class="nav__item">
<a
href="#photo"
class="nav__link"

Choose a reason for hiding this comment

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

The data-qa attribute is missing for this navigation link. Ensure consistency by adding data-qa attributes to all similar elements if needed for testing or automation.

>
Photo
</a>
</li>
<li class="nav__item">
<a
href="#video"
class="nav__link"

Choose a reason for hiding this comment

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

The data-qa attribute is missing for this navigation link. Ensure consistency by adding data-qa attributes to all similar elements if needed for testing or automation.

>
Video
</a>
</li>
</ul>
</nav>
</header>
<main class="main">
<div class="main__container">
<div
class="card"
data-qa="card"
>
<img
class="card__image"
src="./images/imac.jpeg"
alt="Product"
/>
<div class="card__content">
<h1 class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h1>
<p class="card__product-code">Product code: 195434</p>
<div class="card__product-rating">
<div class="stars">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>
<p class="card__reviews">Reviews: 5</p>
</div>
<div class="card__price-box">
<p class="card__price-label">Price:</p>
<span class="card__price-value">$2,199</span>
</div>
</div>
<button
class="card__button"
data-qa="card-hover"

Choose a reason for hiding this comment

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

The data-qa attribute here is card-hover, while in other similar buttons it is just hover. For consistency, consider using the same data-qa attribute across all similar elements unless there is a specific reason for the difference.

>
Buy
</button>
</div>
<div class="card">
<img
class="card__image"
src="./images/imac.jpeg"
alt="Product"
/>
<div class="card__content">
<h1 class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h1>
<p class="card__product-code">Product code: 195434</p>
<div class="card__product-rating">
<div class="stars">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>
<p class="card__reviews">Reviews: 5</p>
</div>
<div class="card__price-box">
<p class="card__price-label">Price:</p>
<span class="card__price-value">$2,199</span>
</div>
</div>
<button class="card__button">Buy</button>

Choose a reason for hiding this comment

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

The data-qa attribute is missing for this button. Ensure consistency by adding data-qa attributes to all similar elements if needed for testing or automation.

</div>
<div class="card">
<img
class="card__image"
src="./images/imac.jpeg"
alt="Product"
/>
<div class="card__content">
<h1 class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h1>
<p class="card__product-code">Product code: 195434</p>
<div class="card__product-rating">
<div class="stars">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>
<p class="card__reviews">Reviews: 5</p>
</div>
<div class="card__price-box">
<p class="card__price-label">Price:</p>
<span class="card__price-value">$2,199</span>
</div>
</div>
<button class="card__button">Buy</button>

Choose a reason for hiding this comment

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

The data-qa attribute is missing for this button. Ensure consistency by adding data-qa attributes to all similar elements if needed for testing or automation.

</div>
<div class="card">
<img
class="card__image"
src="./images/imac.jpeg"
alt="Product"
/>
<div class="card__content">
<h1 class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h1>
<p class="card__product-code">Product code: 195434</p>
<div class="card__product-rating">
<div class="stars">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>
<p class="card__reviews">Reviews: 5</p>
</div>
<div class="card__price-box">
<p class="card__price-label">Price:</p>
<span class="card__price-value">$2,199</span>
</div>
</div>
<button class="card__button">Buy</button>

Choose a reason for hiding this comment

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

The data-qa attribute is missing for this button. Ensure consistency by adding data-qa attributes to all similar elements if needed for testing or automation.

</div>
<div class="card">
<img
class="card__image"
src="./images/imac.jpeg"
alt="Product"
/>
<div class="card__content">
<h1 class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h1>
<p class="card__product-code">Product code: 195434</p>
<div class="card__product-rating">
<div class="stars">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>
<p class="card__reviews">Reviews: 5</p>
</div>
<div class="card__price-box">
<p class="card__price-label">Price:</p>
<span class="card__price-value">$2,199</span>
</div>
</div>
<button class="card__button">Buy</button>

Choose a reason for hiding this comment

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

The data-qa attribute is missing for this button. Ensure consistency by adding data-qa attributes to all similar elements if needed for testing or automation.

</div>
<div class="card">
<img
class="card__image"
src="./images/imac.jpeg"
alt="Product"
/>
<div class="card__content">
<h1 class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h1>
<p class="card__product-code">Product code: 195434</p>
<div class="card__product-rating">
<div class="stars">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>
<p class="card__reviews">Reviews: 5</p>
</div>
<div class="card__price-box">
<p class="card__price-label">Price:</p>
<span class="card__price-value">$2,199</span>
</div>
</div>
<button class="card__button">Buy</button>

Choose a reason for hiding this comment

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

The data-qa attribute is missing for this button. Ensure consistency by adding data-qa attributes to all similar elements if needed for testing or automation.

</div>
<div class="card">
<img
class="card__image"
src="./images/imac.jpeg"
alt="Product"
/>
<div class="card__content">
<h1 class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h1>
<p class="card__product-code">Product code: 195434</p>
<div class="card__product-rating">
<div class="stars">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>
<p class="card__reviews">Reviews: 5</p>
</div>
<div class="card__price-box">
<p class="card__price-label">Price:</p>
<span class="card__price-value">$2,199</span>
</div>
</div>
<button class="card__button">Buy</button>

Choose a reason for hiding this comment

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

The data-qa attribute is missing for this button. Ensure consistency by adding data-qa attributes to all similar elements if needed for testing or automation.

</div>
<div class="card">
<img
class="card__image"
src="./images/imac.jpeg"
alt="Product"
/>
<div class="card__content">
<h1 class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h1>
<p class="card__product-code">Product code: 195434</p>
<div class="card__product-rating">
<div class="stars">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>
<p class="card__reviews">Reviews: 5</p>
</div>
<div class="card__price-box">
<p class="card__price-label">Price:</p>
<span class="card__price-value">$2,199</span>
</div>
</div>
<button class="card__button">Buy</button>
</div>
</div>
</main>
</body>
</html>
Loading
Loading