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

final-code #5067

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
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ This is possible because [we use the Parcel library](https://en.parceljs.org/scs

❗️ Replace `<your_account>` with your GitHub username and copy the links to the `Pull Request` description:

- [DEMO LINK](https://<your_account>.github.io/layout_product-cards/)
- [TEST REPORT LINK](https://<your_account>.github.io/layout_product-cards/report/html_report/)
- [DEMO LINK](https://pryge.github.io/layout_product-cards/)
- [TEST REPORT LINK](https://pryge.github.io/layout_product-cards/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
49 changes: 46 additions & 3 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,61 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0"
/>
<title>Product cards</title>
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&amp;display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="./styles/index.scss"
href="../src/styles/index.css"

Choose a reason for hiding this comment

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

The href attribute is currently pointing to a .scss file. Make sure to link to the corresponding .css file that is generated after preprocessing the SCSS.

/>
</head>

<body>
<h1>Product cards</h1>
<div
class="card"
data-qa="card"
>
<img
src="./images/imac.jpeg"
alt="iMac"
class="card__image"
/>
<h2 class="card__name">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h2>
<p class="card__code">Product code: 195434</p>
<div class="card__stars">
<div class="stars">
<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__cost">
<p class="card__price">Price:</p>
<p class="card__total">$2,199</p>
</div>
<button
data-qa="hover"
class="card__button"
>
Buy
</button>
</div>
<deepl-input-controller></deepl-input-controller>
</body>
</html>
91 changes: 91 additions & 0 deletions src/styles/card.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
.card {
box-sizing: border-box;
background-color: $color-white;
border: 1px solid #f3f3f3;
border-radius: 5px;
height: 408px;
width: 200px;
padding: 32px 16px 16px;
position: relative;

&__image {
width: 160px;
height: 134px;
display: block;
margin: 0 auto 40px;
}

&__name {
font-size: 12px;
font-weight: 500;
line-height: 18px;
color: $text-main-color;
margin-bottom: 4px;
}

&__code {
font-weight: 400;
font-size: 10px;
color: $text-secondary-color;
line-height: 14px;
text-align: left;
position: relative;
}

&__reviews {
color: $text-main-color;
font-size: 10px;
line-height: 14px;
font-weight: 400;
display: flex;
align-items: flex-end;
margin-bottom: 24px;
}

&__cost {
display: flex;
justify-content: space-between;
margin-bottom: 16px;
}

&__price {
font-weight: 400;
font-size: 12px;
line-height: 18px;
color: $text-secondary-color;
text-align: left;
position: relative;
}

&__total {
font-weight: 700;
font-size: 16px;
line-height: 18px;
color: $text-main-color;
display: flex;
align-items: flex-end;
}

&__button {
position: absolute;
justify-content: center;
align-items: center;
width: 166px;
height: 40px;
right: 16px;
background: $color-blue-accent;
border: 1px solid $color-blue-accent;
border-radius: 5px;
font-weight: 700;
font-size: 14px;
line-height: 16px;
text-transform: uppercase;
color: $color-white;
box-sizing: border-box;
}

&__button:hover {
color: $color-blue-accent;
background-color: $color-white;
}
}
135 changes: 135 additions & 0 deletions src/styles/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading