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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

julia303920201
Copy link

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Thank you for your hard work on this project! 🎉 However, there are a few critical issues that need to be addressed before we can approve the pull request:

  1. SCSS Compilation: The href attribute in your HTML is pointing to a .scss file, which browsers cannot interpret. Please compile your SCSS to CSS and link the resulting CSS file instead.

  2. Layout Shifts on Hover: Using transform: scale(1.2) on hover can cause layout shifts, especially in grid or flex layouts. Consider using a smaller scale value or a different effect to avoid disrupting the layout.

  3. Repetitive Content: The content within the article elements is highly repetitive. Consider using a templating engine or JavaScript to dynamically generate this content, which will reduce redundancy and improve maintainability.

Once these issues are resolved, your code will be in great shape! Keep up the great work, and feel free to reach out if you have any questions or need further assistance. 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review button in the Reviewers tab.

src/index.html Outdated
<link
rel="stylesheet"
href="styles/index.scss"
href="/src/styles/index.scss"

Choose a reason for hiding this comment

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

The href attribute is pointing to a .scss file. Browsers cannot directly interpret SCSS files. You should compile the SCSS to CSS and link the resulting CSS file instead.

src/index.html Outdated
Comment on lines 167 to 445
<div class="stars__star"></div>

<div class="stars__star"></div>

<div class="stars__star"></div>

<div class="stars__star"></div>
</div>

<p class="review-descr">Reviews: 5</p>
</div>

<div class="card__price">
<p class="price-text">Price:</p>

<p class="price-amount">$2,199</p>
</div>

<a class="card__button">BUY</a>
</article>

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

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

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

<div class="card__reviews">
<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="review-descr">Reviews: 5</p>
</div>

<div class="card__price">
<p class="price-text">Price:</p>

<p class="price-amount">$2,199</p>
</div>

<a class="card__button">BUY</a>
</article>

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

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

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

<div class="card__reviews">
<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="review-descr">Reviews: 5</p>
</div>

<div class="card__price">
<p class="price-text">Price:</p>

<p class="price-amount">$2,199</p>
</div>

<a class="card__button">BUY</a>
</article>

Choose a reason for hiding this comment

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

The content within the article elements is highly repetitive. Consider using a templating engine or JavaScript to dynamically generate this content to reduce redundancy and improve maintainability.

}

&:hover {
transform: scale(1.2);

Choose a reason for hiding this comment

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

Using transform: scale(1.2) on hover can cause layout shifts and might lead to unexpected behavior, especially if the card is part of a grid or flex layout. Consider using a smaller scale value or another effect to avoid disrupting the layout.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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


Great job on your submission! 🎉 While your code meets most of the task requirements, there are a few areas for improvement that will enhance your project's functionality and maintainability:

  1. Layout Shifts on Hover: The transform: scale(1.2) on hover for the .card class can cause layout shifts, affecting neighboring elements. Consider using a smaller scale value or a different effect to maintain a smooth user experience.

  2. Repetitive Content: The HTML file contains repetitive content within the article elements. Using a templating engine or JavaScript to dynamically generate this content can significantly improve maintainability.

  3. SCSS Compilation: Browsers cannot interpret SCSS files directly. Ensure that your SCSS is compiled into CSS and update the href attribute in your HTML to link to the compiled CSS file.

  4. Import Order: Make sure to import mixins-variables-fonts before any styles that use these variables or mixins to prevent any undefined variable issues.

  5. Redundant Media Query: There's a redundant media query for .catalog that duplicates the media-mixin. Removing this will help avoid conflicts and streamline your code.

These adjustments will not only meet the task requirements but also help you develop cleaner and more efficient code. Keep up the great work, and continue to learn from these experiences! 🚀

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

rel="stylesheet"
/>

<link
rel="stylesheet"
href="styles/index.scss"

Choose a reason for hiding this comment

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

Browsers cannot interpret SCSS files directly. You need to compile your SCSS file into a CSS file and link to the resulting CSS file instead. Update the href attribute to point to the compiled CSS file.

Comment on lines +123 to +445
<div class="stars__star"></div>

<div class="stars__star"></div>

<div class="stars__star"></div>

<div class="stars__star"></div>
</div>

<p class="review-descr">Reviews: 5</p>
</div>

<div class="card__price">
<p class="price-text">Price:</p>

<p class="price-amount">$2,199</p>
</div>

<a class="card__button">BUY</a>
</article>

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

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

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

<div class="card__reviews">
<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="review-descr">Reviews: 5</p>
</div>

<div class="card__price">
<p class="price-text">Price:</p>

<p class="price-amount">$2,199</p>
</div>

<a class="card__button">BUY</a>
</article>

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

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

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

<div class="card__reviews">
<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="review-descr">Reviews: 5</p>
</div>

<div class="card__price">
<p class="price-text">Price:</p>

<p class="price-amount">$2,199</p>
</div>

<a class="card__button">BUY</a>
</article>

Choose a reason for hiding this comment

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

The content within the article elements is highly repetitive. Consider using a templating engine or JavaScript to dynamically generate this content to reduce redundancy and improve maintainability.

}

&:hover {
transform: scale(1.2);

Choose a reason for hiding this comment

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

Using transform: scale(1.2) on hover can cause layout shifts, especially in grid or flex layouts. Consider using a smaller scale value or a different effect to avoid disrupting the layout.

Comment on lines +22 to +26
@media (min-width: 768px) {
.catalog {
grid-template-columns: repeat(3, min-content);
}
}

Choose a reason for hiding this comment

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

This media query for .catalog is redundant because the same styling is already applied using the media-mixin on line 15. Consider removing this block to avoid duplication and potential conflicts.

@@ -1,3 +1,16 @@
@import 'blocks/header';
@import 'blocks/mixins-variables-fonts';

Choose a reason for hiding this comment

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

Consider importing mixins-variables-fonts before any other styles that might use these variables or mixins. This ensures that all variables and mixins are defined before they are used in other styles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants