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

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
18 changes: 9 additions & 9 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,14 +33,14 @@ 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://GuilhermeSant.github.io/layout_catalog/)
- [TEST REPORT LINK](https://GuilhermeSant.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.

- [ ] All components follow BEM and use SCSS
- [ ] Repeated sizes and special colors are put to variables
- [ ] Grid is used for the columns
- [ ] Cards are shown in 1, 2, 3, or 4 columns based on screen resolution
- [ ] All changes on `:hover` are smooth
- [ ] Code follows all the [Code Style Rules ❗️](https://mate-academy.github.io/layout_task-guideline/html-css-code-style-rules)
- [x ] All components follow BEM and use SCSS
- [ x] Repeated sizes and special colors are put to variables
- [ x] Grid is used for the columns
- [ x] Cards are shown in 1, 2, 3, or 4 columns based on screen resolution
- [ x] All changes on `:hover` are smooth
- [ x] Code follows all the [Code Style Rules ❗️](https://mate-academy.github.io/layout_task-guideline/html-css-code-style-rules)
6 changes: 3 additions & 3 deletions src/images/star-active.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/images/star.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
251 changes: 248 additions & 3 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,256 @@
/>
<link
rel="stylesheet"
href="styles/index.scss"
href="styles/main.css"
/>
</head>

<body>
<h1>Catalog</h1>
<header class="header">
<a
href="#"
Comment on lines +25 to +26

Choose a reason for hiding this comment

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

The 'href' attribute is set to '#', which is a placeholder. Consider replacing it with a valid URL or removing it if the link is not needed.

target="_blank"
>
<img
class="header__logo"
src="./images/logo.png"
alt="logo-moyo"
/>
</a>

<nav class="header__nav">
<a class="header__nav-link is-active">Apple</a>
<a class="header__nav-link">Samsung</a>
<a class="header__nav-link">smartphones</a>
<a
class="header__nav-link"
data-qa="nav-hover"
>
laptops & computers
</a>
<a class="header__nav-link">gadgets</a>
<a class="header__nav-link">Tablets</a>
<a class="header__nav-link">Photo</a>
<a class="header__nav-link">Video</a>
</nav>
</header>

<main class="catalog">
<div
class="card"
data-qa="card"
>
<!--Product name and code-->
<div class="card__text">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</div>
<div class="card__prod-code">Product code: 195434</div>

<!--product reviews and stars avaliation-->
<section class="card__reviews">
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-text">Reviews: 5</div>
</section>

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

<!--button buy-->
<button
class="card__button-buy"
data-qa="card-hover"
>
BUY
</button>
</div>
<div class="card">
<!--Product name and code-->
<div class="card__text">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</div>
<div class="card__prod-code">Product code: 195434</div>

<!--product reviews and stars avaliation-->
<section class="card__reviews">
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-text">Reviews: 5</div>
</section>

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

<!--button buy-->
<button class="card__button-buy">BUY</button>
</div>
<div class="card">
<!--Product name and code-->
<div class="card__text">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</div>
<div class="card__prod-code">Product code: 195434</div>

<!--product reviews and stars avaliation-->
<section class="card__reviews">
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-text">Reviews: 5</div>
</section>

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

<!--button buy-->
<button class="card__button-buy">BUY</button>
</div>
<div class="card">
<!--Product name and code-->
<div class="card__text">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</div>
<div class="card__prod-code">Product code: 195434</div>

<!--product reviews and stars avaliation-->
<section class="card__reviews">
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-text">Reviews: 5</div>
</section>

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

<!--button buy-->
<button class="card__button-buy">BUY</button>
</div>
<div class="card">
<!--Product name and code-->
<div class="card__text">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</div>
<div class="card__prod-code">Product code: 195434</div>

<!--product reviews and stars avaliation-->
<section class="card__reviews">
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-text">Reviews: 5</div>
</section>

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

<!--button buy-->
<button class="card__button-buy">BUY</button>
</div>
<div class="card">
<!--Product name and code-->
<div class="card__text">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</div>
<div class="card__prod-code">Product code: 195434</div>

<!--product reviews and stars avaliation-->
<section class="card__reviews">
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-text">Reviews: 5</div>
</section>

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

<!--button buy-->
<button class="card__button-buy">BUY</button>
</div>
<div class="card">
<!--Product name and code-->
<div class="card__text">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</div>
<div class="card__prod-code">Product code: 195434</div>

<!--product reviews and stars avaliation-->
<section class="card__reviews">
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-text">Reviews: 5</div>
</section>

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

<!--button buy-->
<button class="card__button-buy">BUY</button>
</div>
<div class="card">
<!--Product name and code-->
<div class="card__text">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</div>
<div class="card__prod-code">Product code: 195434</div>

<!--product reviews and stars avaliation-->
<section class="card__reviews">
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-star"></div>
<div class="card__reviews-text">Reviews: 5</div>
</section>

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

<!--button buy-->
<button class="card__button-buy">BUY</button>
Comment on lines +88 to +268

Choose a reason for hiding this comment

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

The product details, including name, code, reviews, and price, are repeated multiple times with the same content. If this is intentional for layout testing, it is fine. However, for a real application, ensure that each product card displays unique data.

</div>
Comment on lines +53 to +269

Choose a reason for hiding this comment

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

The product details are repeated multiple times with the same content. Ensure this repetition is intentional for testing purposes. In a real-world scenario, each product card should have unique content.

</main>
</body>
</html>
2 changes: 1 addition & 1 deletion src/scripts/main.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
'use strict';
'use strict';
Loading
Loading