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 #4837

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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://leraMeleshchenko.github.io/layout_catalog/)
- [TEST REPORT LINK](https://leraMeleshchenko.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
360 changes: 359 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,367 @@
rel="stylesheet"
href="styles/index.scss"
/>
<link
rel="stylesheet"
href="styles/reset.scss"

Choose a reason for hiding this comment

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

The link tag is referencing a SCSS file (styles/reset.scss). Ensure that this SCSS file is compiled to CSS before being linked in the HTML, as browsers do not understand SCSS directly.

/>
</head>

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

<nav class="nav">
<ul class="nav__list">
<li class="nav__link">
<a
href="/apple"
class="nav__item is-active"
>
Apple
</a>
</li>

<li class="nav__link">
<a
href="/samsung"
class="nav__item"
>
Samsung
</a>
</li>

<li class="nav__link">
<a
href="/smartphones"
class="nav__item"
>
Smartphones
</a>
</li>

<li class="nav__link">
<a
href="/laptop-Computers"
class="nav__item"
data-qa="nav-hover"
>
Laptops & Computers
</a>
</li>

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

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

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

<li class="nav__link">
<a
href="/video"
class="nav__item"
>
Video
</a>
</li>
</ul>
</nav>
</header>
<main>
<div
class="card"
data-qa="card"
>
<img
class="card__img"
src="./images/imac.jpeg"
alt="imac image"
/>

<p class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</p>
<p class="card__product-code">Product code: 195434</p>
<div class="card__stars">
<div class="stars stars--4">
<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">
<p class="card__name-price">Price:</p>
<p class="card__num-price">$2,199</p>
</div>
<button
class="card__button"
data-qa="card-hover"
type="button"
>
Buy
</button>
</div>

<div class="card">
<img
class="card__img"
src="./images/imac.jpeg"
alt="imac image"
/>

<p class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</p>
<p class="card__product-code">Product code: 195434</p>
<div class="card__stars">
<div class="stars stars--4">
<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">
<p class="card__name-price">Price:</p>
<p class="card__num-price">$2,199</p>
</div>
<button
class="card__button"
type="button"
>
Buy
</button>
</div>

<div class="card">
<img
class="card__img"
src="./images/imac.jpeg"
alt="imac image"
/>

<p class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</p>
<p class="card__product-code">Product code: 195434</p>
<div class="card__stars">
<div class="stars stars--4">
<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">
<p class="card__name-price">Price:</p>
<p class="card__num-price">$2,199</p>
</div>
<button
class="card__button"
type="button"
>
Buy
</button>
</div>

<div class="card">
<img
class="card__img"
src="./images/imac.jpeg"
alt="imac image"
/>

<p class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</p>
<p class="card__product-code">Product code: 195434</p>
<div class="card__stars">
<div class="stars stars--4">
<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">
<p class="card__name-price">Price:</p>
<p class="card__num-price">$2,199</p>
</div>
<button
class="card__button"
type="button"
>
Buy
</button>
</div>

<div class="card">
<img
class="card__img"
src="./images/imac.jpeg"
alt="imac image"
/>

<p class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</p>
<p class="card__product-code">Product code: 195434</p>
<div class="card__stars">
<div class="stars stars--4">
<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">
<p class="card__name-price">Price:</p>
<p class="card__num-price">$2,199</p>
</div>
<button
class="card__button"
type="button"
>
Buy
</button>
</div>

<div class="card">
<img
class="card__img"
src="./images/imac.jpeg"
alt="imac image"
/>

<p class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</p>
<p class="card__product-code">Product code: 195434</p>
<div class="card__stars">
<div class="stars stars--4">
<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">
<p class="card__name-price">Price:</p>
<p class="card__num-price">$2,199</p>
</div>
<button
class="card__button"
type="button"
>
Buy
</button>
</div>

<div class="card">
<img
class="card__img"
src="./images/imac.jpeg"
alt="imac image"
/>

<p class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</p>
<p class="card__product-code">Product code: 195434</p>
<div class="card__stars">
<div class="stars stars--4">
<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">
<p class="card__name-price">Price:</p>
<p class="card__num-price">$2,199</p>
</div>
<button
class="card__button"
type="button"
>
Buy
</button>
</div>

<div class="card">
<img
class="card__img"
src="./images/imac.jpeg"
alt="imac image"
/>

<p class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</p>
<p class="card__product-code">Product code: 195434</p>
<div class="card__stars">
<div class="stars stars--4">
<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">
<p class="card__name-price">Price:</p>
<p class="card__num-price">$2,199</p>
</div>
<button
class="card__button"
type="button"
>
Buy
</button>
Comment on lines +116 to +381

Choose a reason for hiding this comment

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

The product card content is repeated multiple times with the same data. Consider using a template engine or JavaScript to dynamically generate these cards to avoid redundancy and improve maintainability.

Comment on lines +116 to +381

Choose a reason for hiding this comment

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

The product card content is repeated multiple times with the same data. Consider using a template engine or JavaScript to dynamically generate these cards to reduce redundancy and improve maintainability.

</div>
</main>
</body>
</html>
Loading
Loading