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

add task solution again #4980

Open
wants to merge 1 commit 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
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 @@ -33,8 +33,8 @@ This is possible because [we use the Parcel library](https://en.parceljs.org/scs
## 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://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.

Expand Down
351 changes: 350 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,355 @@
</head>

<body>
<h1>Catalog</h1>
<header class="header">
<a href="#">
<img
class="logo"
src="images/logo.png"
alt="Company logo"
/>
</a>

<nav class="nav">
<ul class="nav__list">
<li>
<a
class="nav__link is-active"
href="#"
>
apple
</a>
</li>
<li>
<a
class="nav__link"
href="#"
>
samsung
</a>
</li>
<li>
<a
class="nav__link"
href="#"
>
smartphones
</a>
</li>
<li>
<a
class="nav__link"
data-qa="nav-hover"
href="#"
>
laptops & computers
</a>
</li>
<li>
<a
class="nav__link"
href="#"
>
gadgets
</a>
</li>
<li>
<a
class="nav__link"
href="#"
>
tablets
</a>
</li>
<li>
<a
class="nav__link"
href="#"
>
photo
</a>
</li>
<li>
<a
class="nav__link"
href="#"
>
video
</a>
</li>
</ul>
</nav>
</header>

<main>
<div class="container">
<div
class="card"
data-qa="card"
>
<div class="card__image"></div>

<h2 class="card__apple">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
Comment on lines +113 to +114

Choose a reason for hiding this comment

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

The product name is hardcoded in multiple places. Consider using a templating engine or JavaScript to dynamically generate these elements to avoid repetition and make updates easier.

</h2>

<p class="card__product">Product code: 195434</p>

Choose a reason for hiding this comment

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

The product code is repeated across multiple cards. If these are meant to be different products, ensure each card has unique content.


<div class="stars stars--4">
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__text">Reviews: 5</div>
Comment on lines +119 to +125

Choose a reason for hiding this comment

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

The star rating is hardcoded as 'stars--4' and 'Reviews: 5' across all cards. If these are meant to represent different products, consider making these values dynamic.

</div>

<div class="card__price">
<p class="card__price_text">Price:</p>
<p class="card__price_amount">$2,199</p>
Comment on lines +128 to +130

Choose a reason for hiding this comment

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

The price is hardcoded as '$2,199' across all cards. If these are meant to represent different products, ensure each card has a unique price.

</div>

<div class="card__box">
<button
class="card__button card__button--text"
data-qa="card-hover"
>
BUY
Comment on lines +134 to +138

Choose a reason for hiding this comment

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

The 'BUY' button is repeated across all cards. Consider using a loop or a component-based approach to generate these cards dynamically if the content is similar.

</button>
</div>
</div>

<div class="card">
<div class="card__image"></div>

<h2 class="card__apple">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h2>

<p class="card__product">Product code: 195434</p>

<div class="stars stars--4">
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__text">Reviews: 5</div>
</div>

<div class="card__price">
<div class="card__price_text">Price:</div>
<div class="card__price_amount">$2,199</div>
</div>

<div class="card__box">
<button
class="card__button card__button--text"
data-qa="hover"
>
BUY
</button>
</div>
</div>

<div class="card">
<div class="card__image"></div>

<h2 class="card__apple">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h2>

<p class="card__product">Product code: 195434</p>

<div class="stars stars--4">
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__text">Reviews: 5</div>
</div>

<div class="card__price">
<div class="card__price_text">Price:</div>
<div class="card__price_amount">$2,199</div>
</div>

<div class="card__box">
<button
class="card__button card__button--text"
data-qa="hover"
>
BUY
</button>
</div>
</div>

<div class="card">
<div class="card__image"></div>

<h2 class="card__apple">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h2>

<p class="card__product">Product code: 195434</p>

<div class="stars stars--4">
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__text">Reviews: 5</div>
</div>

<div class="card__price">
<div class="card__price_text">Price:</div>
<div class="card__price_amount">$2,199</div>
</div>

<div class="card__box">
<button
class="card__button card__button--text"
data-qa="hover"
>
BUY
</button>
</div>
</div>

<div class="card">
<div class="card__image"></div>

<h2 class="card__apple">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h2>

<p class="card__product">Product code: 195434</p>

<div class="stars stars--4">
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__text">Reviews: 5</div>
</div>

<div class="card__price">
<div class="card__price_text">Price:</div>
<div class="card__price_amount">$2,199</div>
</div>

<div class="card__box">
<button
class="card__button card__button--text"
data-qa="hover"
>
BUY
</button>
</div>
</div>

<div class="card">
<div class="card__image"></div>

<h2 class="card__apple">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h2>

<p class="card__product">Product code: 195434</p>

<div class="stars stars--4">
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__text">Reviews: 5</div>
</div>

<div class="card__price">
<div class="card__price_text">Price:</div>
<div class="card__price_amount">$2,199</div>
</div>

<div class="card__box">
<button
class="card__button card__button--text"
data-qa="hover"
>
BUY
</button>
</div>
</div>

<div class="card">
<div class="card__image"></div>

<h2 class="card__apple">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h2>

<p class="card__product">Product code: 195434</p>

<div class="stars stars--4">
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__text">Reviews: 5</div>
</div>

<div class="card__price">
<div class="card__price_text">Price:</div>
<div class="card__price_amount">$2,199</div>
</div>

<div class="card__box">
<button
class="card__button card__button--text"
data-qa="hover"
>
BUY
</button>
</div>
</div>

<div class="card">
<div class="card__image"></div>

<h2 class="card__apple">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h2>

<p class="card__product">Product code: 195434</p>

<div class="stars stars--4">
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__text">Reviews: 5</div>
</div>

<div class="card__price">
<div class="card__price_text">Price:</div>
<div class="card__price_amount">$2,199</div>
</div>

<div class="card__box">
<button
class="card__button card__button--text"
data-qa="hover"
>
BUY
</button>
</div>
</div>
</div>
</main>
</body>
</html>
Loading
Loading