-
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
product-cards #5140
base: master
Are you sure you want to change the base?
product-cards #5140
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 |
---|---|---|
|
@@ -11,8 +11,126 @@ | |
rel="stylesheet" | ||
href="./styles/index.scss" | ||
/> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.googleapis.com" | ||
/> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.gstatic.com" | ||
/> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="./styles/change.scss" | ||
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. Similar to the previous comment, ensure that SCSS files are compiled into CSS by the Parcel bundler instead of linking them directly in HTML. |
||
/> | ||
</head> | ||
|
||
<body> | ||
<h1>Product cards</h1> | ||
<div | ||
data-qa="card" | ||
class="card" | ||
> | ||
<img | ||
class="card-image" | ||
src="/src/images/img-imac-png.png" | ||
alt="Appleimac" | ||
/> | ||
<h2 class="card-name"> | ||
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | ||
</h2> | ||
<p class="card-product-code">Product code: 195434</p> | ||
|
||
<div class="card-stars"> | ||
<div class="stars"> | ||
<div class="stars-star"> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="13" | ||
height="12" | ||
fill="none" | ||
viewBox="0 0 13 12" | ||
> | ||
<path | ||
fill="#FFDE6A" | ||
d="M5.792.356a.515.515 0 0 1 .98 0l1.13 3.477a.515.515 0 0 0 .49.356h3.656c.499 0 .707.639.303.932l-2.958 2.15a.515.515 0 0 0-.187.575l1.13 3.477a.515.515 0 0 1-.793.576L6.585 9.75a.515.515 0 0 0-.606 0L3.022 11.9a.515.515 0 0 1-.793-.577l1.13-3.477a.515.515 0 0 0-.188-.576L.213 5.121a.515.515 0 0 1 .303-.932h3.656a.515.515 0 0 0 .49-.356L5.792.356z" | ||
/> | ||
</svg> | ||
</div> | ||
<div class="stars-star"> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="13" | ||
height="12" | ||
fill="none" | ||
viewBox="0 0 13 12" | ||
> | ||
<path | ||
fill="#FFDE6A" | ||
d="M5.792.356a.515.515 0 0 1 .98 0l1.13 3.477a.515.515 0 0 0 .49.356h3.656c.499 0 .707.639.303.932l-2.958 2.15a.515.515 0 0 0-.187.575l1.13 3.477a.515.515 0 0 1-.793.576L6.585 9.75a.515.515 0 0 0-.606 0L3.022 11.9a.515.515 0 0 1-.793-.577l1.13-3.477a.515.515 0 0 0-.188-.576L.213 5.121a.515.515 0 0 1 .303-.932h3.656a.515.515 0 0 0 .49-.356L5.792.356z" | ||
/> | ||
</svg> | ||
</div> | ||
<div class="stars-star"> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="13" | ||
height="12" | ||
fill="none" | ||
viewBox="0 0 13 12" | ||
> | ||
<path | ||
fill="#FFDE6A" | ||
d="M5.792.356a.515.515 0 0 1 .98 0l1.13 3.477a.515.515 0 0 0 .49.356h3.656c.499 0 .707.639.303.932l-2.958 2.15a.515.515 0 0 0-.187.575l1.13 3.477a.515.515 0 0 1-.793.576L6.585 9.75a.515.515 0 0 0-.606 0L3.022 11.9a.515.515 0 0 1-.793-.577l1.13-3.477a.515.515 0 0 0-.188-.576L.213 5.121a.515.515 0 0 1 .303-.932h3.656a.515.515 0 0 0 .49-.356L5.792.356z" | ||
/> | ||
</svg> | ||
</div> | ||
<div class="stars-star"> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="13" | ||
height="12" | ||
fill="none" | ||
viewBox="0 0 13 12" | ||
> | ||
<path | ||
fill="#FFDE6A" | ||
d="M5.792.356a.515.515 0 0 1 .98 0l1.13 3.477a.515.515 0 0 0 .49.356h3.656c.499 0 .707.639.303.932l-2.958 2.15a.515.515 0 0 0-.187.575l1.13 3.477a.515.515 0 0 1-.793.576L6.585 9.75a.515.515 0 0 0-.606 0L3.022 11.9a.515.515 0 0 1-.793-.577l1.13-3.477a.515.515 0 0 0-.188-.576L.213 5.121a.515.515 0 0 1 .303-.932h3.656a.515.515 0 0 0 .49-.356L5.792.356z" | ||
/> | ||
</svg> | ||
</div> | ||
<div class="stars-star"> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="13" | ||
height="12" | ||
fill="none" | ||
viewBox="0 0 13 12" | ||
> | ||
<path | ||
fill="#E5E5E5" | ||
d="M5.792.356a.515.515 0 0 1 .98 0l1.13 3.477a.515.515 0 0 0 .49.356h3.656c.499 0 .707.639.303.932l-2.958 2.15a.515.515 0 0 0-.187.575l1.13 3.477a.515.515 0 0 1-.793.576L6.585 9.75a.515.515 0 0 0-.606 0L3.022 11.9a.515.515 0 0 1-.793-.577l1.13-3.477a.515.515 0 0 0-.188-.576L.213 5.121a.515.515 0 0 1 .303-.932h3.656a.515.515 0 0 0 .49-.356L5.792.356z" | ||
/> | ||
</svg> | ||
</div> | ||
</div> | ||
<p class="card_reviews">Reviews: 5</p> | ||
</div> | ||
|
||
<div class="card-price"> | ||
<p class="price">Price:</p> | ||
<p class="total">$2,199</p> | ||
</div> | ||
|
||
<button | ||
class="card-button" | ||
data-qa="hover" | ||
> | ||
BUY | ||
</button> | ||
</div> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$colors-btn: #00acdc; | ||
$colors-backgraund: #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. There's a typo in the variable name |
||
$color-grey: #616070; | ||
$color-dark-blue: #060b35; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,105 @@ | ||
@import './change'; | ||
|
||
body { | ||
margin: 8px; | ||
padding: 0; | ||
font-family: Roboto, sans-serif; | ||
box-sizing: border-box; | ||
display: block; | ||
} | ||
|
||
.card { | ||
border: 1px solid $colors-backgraund; | ||
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 |
||
width: 200px; | ||
padding: 32px 16px 16px; | ||
box-sizing: border-box; | ||
background-color: #fff; | ||
|
||
&-image { | ||
display: block; | ||
width: 160px; | ||
height: 134px; | ||
margin: 0 auto 40px; | ||
} | ||
|
||
&-product-code { | ||
color: $color-grey; | ||
font-size: 10px; | ||
font-weight: 400; | ||
} | ||
|
||
&-name { | ||
line-height: 18px; | ||
color: $color-dark-blue; | ||
font-size: 12px; | ||
font-weight: 500; | ||
margin-bottom: 4px; | ||
} | ||
|
||
&-button { | ||
color: white; | ||
background-color: #00acdc; | ||
width: 166px; | ||
height: 40px; | ||
border: none; | ||
border-radius: 5px; | ||
} | ||
|
||
&_reviews { | ||
color: $color-dark-blue; | ||
font-size: 10px; | ||
font-weight: 400; | ||
line-height: 14px; | ||
} | ||
|
||
&-stars { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
margin-top: 16px; | ||
margin-bottom: 24px; | ||
} | ||
|
||
&-price { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
margin-bottom: 16px; | ||
} | ||
} | ||
|
||
p { | ||
margin: 0; | ||
} | ||
|
||
.card-button:hover { | ||
color: $colors-btn; | ||
background-color: $colors-backgraund; | ||
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 the variable |
||
border: 1px solid $colors-btn; | ||
} | ||
|
||
.stars { | ||
display: flex; | ||
} | ||
|
||
.stars-star { | ||
display: flex; | ||
align-items: center; | ||
width: 16px; | ||
height: 16px; | ||
margin-left: 4px; | ||
} | ||
|
||
.price { | ||
font-size: 12px; | ||
line-height: 18px; | ||
color: $color-grey; | ||
font-weight: 400; | ||
} | ||
|
||
.total { | ||
font-weight: 700; | ||
line-height: 18px; | ||
font-size: 16px; | ||
color: $color-dark-blue; | ||
} |
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.
Linking SCSS files directly in HTML is not recommended as the Parcel bundler should handle the compilation. Ensure that the SCSS files are compiled into CSS files by Parcel.