-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 #5087
base: master
Are you sure you want to change the base?
add task solution #5087
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,68 @@ | |
content="width=device-width, initial-scale=1.0" | ||
/> | ||
<title>Product cards</title> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.googleapis.com" | ||
/> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.gstatic.com" | ||
/> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Poppins&family=Roboto:wght@400;500;700&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="./styles/index.scss" | ||
/> | ||
</head> | ||
<body> | ||
<h1>Product cards</h1> | ||
<div | ||
class="card" | ||
data-qa="card" | ||
> | ||
<div class="image"> | ||
<img | ||
src="/src/images/imac.jpeg" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The image path should be relative to the HTML file. Consider changing the path from '/src/images/imac.jpeg' to '../images/imac.jpeg' to ensure the image loads correctly. |
||
alt="apple_image" | ||
class="image__display image__display--settings" | ||
/> | ||
</div> | ||
|
||
<a | ||
href="#" | ||
class="card__product" | ||
> | ||
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | ||
</a> | ||
|
||
<section class="card__code">Product code: 195434</section> | ||
|
||
<div class="rating"> | ||
<div class="stars"> | ||
<div class="stars__star stars__star--active"></div> | ||
<div class="stars__star stars__star--active"></div> | ||
<div class="stars__star stars__star--active"></div> | ||
<div class="stars__star stars__star--active"></div> | ||
<div class="stars__star"></div> | ||
</div> | ||
<div class="rating__review">Reviews: 5</div> | ||
</div> | ||
|
||
<div class="cash"> | ||
<div class="cash__name cash__name--price">Price:</div> | ||
<div class="cash__sum cash__sum--value-of-price">$2,199</div> | ||
</div> | ||
|
||
<a | ||
href="#" | ||
class="card__button" | ||
data-qa="hover" | ||
> | ||
BUY | ||
</a> | ||
</div> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.card { | ||
box-sizing: border-box; | ||
position: relative; | ||
text-align: justify; | ||
width: 200px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The card width is correctly set to 200px, which includes the border. This aligns with the task requirements. |
||
height: 407px; | ||
border: 1px solid $grey-star-color; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the color value for the border is defined as a variable in a separate file, as per the task requirements for maintainability. |
||
border-radius: 5px; | ||
} | ||
|
||
.card__product { | ||
display: block; | ||
padding-inline: $standart-inline-pad; | ||
padding-bottom: 4px; | ||
font-weight: 500; | ||
font-size: 12px; | ||
line-height: 18px; | ||
color: $standart-black-color; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the color value is defined as a variable in a separate file, as per the task requirements for maintainability. |
||
text-decoration: none; | ||
} | ||
|
||
.card__code { | ||
display: flex; | ||
justify-content: flex-start; | ||
align-items: center; | ||
padding-inline: $standart-inline-pad; | ||
padding-bottom: 16px; | ||
font-size: 10px; | ||
font-weight: 400; | ||
color: #616070; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider defining this color value as a variable in a separate file to adhere to the task requirements for maintainability. |
||
} | ||
|
||
.card__button { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
margin-inline: 16px; | ||
height: 40px; | ||
border: 1px solid $grey-star-color; | ||
border-radius: 5px; | ||
font-weight: 700; | ||
font-size: 14px; | ||
text-decoration: none; | ||
color: #fff; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the color value is defined as a variable in a separate file, as per the task requirements for maintainability. |
||
background-color: #00acdc; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider defining this background color value as a variable in a separate file to adhere to the task requirements for maintainability. |
||
cursor: pointer; | ||
} | ||
|
||
.card__button:hover { | ||
background-color: #fff; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that this color value is defined as a variable in a separate file, as per the task requirements for maintainability. |
||
border: 1px solid #00acdc; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider defining this border color value as a variable in a separate file to adhere to the task requirements for maintainability. |
||
border-radius: 5px; | ||
color: #00acdc; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that this color value is defined as a variable in a separate file, as per the task requirements for maintainability. |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.cash { | ||
display: flex; | ||
height: 19px; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding-inline: $standart-inline-pad; | ||
padding-bottom: 16px; | ||
} | ||
|
||
.cash__name--price { | ||
font-weight: 400; | ||
font-size: 12px; | ||
color: #616070; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider defining this color value as a variable in a separate file to adhere to the task requirements for maintainability. |
||
} | ||
|
||
.cash__sum--value-of-price { | ||
font-weight: 700; | ||
font-size: 16px; | ||
color: $standart-black-color; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.image { | ||
padding: 32px 19px 40px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider defining the padding values as variables in a separate file to adhere to the task requirements for maintainability. |
||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
.image__display--settings { | ||
width: 160px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider defining the width value as a variable in a separate file to adhere to the task requirements for maintainability. |
||
height: 134px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider defining the height value as a variable in a separate file to adhere to the task requirements for maintainability. |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
html { | ||
font-family: Roboto, serif; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the font family used here matches the task requirements. Consider defining the font family as a variable in a separate file for maintainability. |
||
} | ||
|
||
body { | ||
margin: 0; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.rating { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
padding-inline: $standart-inline-pad; | ||
padding-bottom: 24px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider defining the padding-bottom value as a variable in a separate file to adhere to the task requirements for maintainability. |
||
} | ||
|
||
.rating__review { | ||
font-size: 10px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider defining the font size as a variable in a separate file to adhere to the task requirements for maintainability. |
||
font-weight: 400; | ||
color: $standart-black-color; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.stars { | ||
display: flex; | ||
} | ||
|
||
.stars__star { | ||
width: 16px; | ||
height: 16px; | ||
background-image: url(../images/star.svg); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the path to the image is correct and relative to the SCSS file location. The current path '../images/star.svg' seems correct, but verify it aligns with your project structure. |
||
color: $grey-star-color; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the color value is defined as a variable in a separate file, as per the task requirements for maintainability. |
||
background-position: center; | ||
background-repeat: no-repeat; | ||
} | ||
|
||
.stars__star:not(:last-child) { | ||
margin-right: 4px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider defining the margin-right value as a variable in a separate file to adhere to the task requirements for maintainability. |
||
} | ||
|
||
.stars__star--active { | ||
background-image: url(../images/star-active.svg); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the path to the active star image is correct and relative to the SCSS file location. The current path '../images/star-active.svg' seems correct, but verify it aligns with your project structure. |
||
color: #ffde6a; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider defining this color value as a variable in a separate file to adhere to the task requirements for maintainability. |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
$grey-star-color: #f3f3f3; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The variable for the grey star color is correctly defined. Ensure all color values used in your styles are defined here. |
||
$standart-inline-pad: 16px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The variable for standard inline padding is correctly defined. Ensure all padding values used in your styles are defined here. |
||
$standart-black-color: #060b35; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The variable for standard black color is correctly defined. Ensure all color values used in your styles are defined here. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
body { | ||
margin: 0; | ||
} | ||
@import '/src/styles/blocks/variables'; | ||
@import '/src/styles/blocks/page'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the import path for the variables file is correct and relative to the SCSS file location. The current path '/src/styles/blocks/variables' should be './blocks/variables' to align with the project structure. |
||
@import '/src/styles/blocks/card'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the import path for the page styles is correct and relative to the SCSS file location. The current path '/src/styles/blocks/page' should be './blocks/page' to align with the project structure. |
||
@import '/src/styles/blocks/image'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the import path for the card styles is correct and relative to the SCSS file location. The current path '/src/styles/blocks/card' should be './blocks/card' to align with the project structure. |
||
@import '/src/styles/blocks/cash'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the import path for the image styles is correct and relative to the SCSS file location. The current path '/src/styles/blocks/image' should be './blocks/image' to align with the project structure. |
||
@import '/src/styles/blocks/rating'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the import path for the cash styles is correct and relative to the SCSS file location. The current path '/src/styles/blocks/cash' should be './blocks/cash' to align with the project structure. |
||
@import '/src/styles/blocks/stars'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the import path for the rating styles is correct and relative to the SCSS file location. The current path '/src/styles/blocks/rating' should be './blocks/rating' to align with the project structure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SCSS file is linked correctly, which is acceptable as per the task requirements.