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

Develop #5146

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

Develop #5146

Show file tree
Hide file tree
Changes from 2 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
52 changes: 52 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@
name="viewport"
content="width=device-width, initial-scale=1.0"
/>
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossorigin="anonymous"
/>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap"
rel="stylesheet"
/>
<title>Product cards</title>
<link
rel="stylesheet"
Expand All @@ -14,5 +27,44 @@
</head>
<body>
<h1>Product cards</h1>
<div
class="card"
data-qa="card"
>
<img
class="card__image"
src="images/imac.jpeg"
alt="iMac"
/>
<p class="card__title">
APPLE A1419 iMac 27" Retina
<br />
5K Monoblock (MNED2UA/A)
</p>
<p class="card__product-code">Product code: 195434</p>
<div class="card__review">
<div class="stars stars--4">
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
</div>
<div class="card__reviews">
<p class="card__reviews-count">Reviews: 5</p>
</div>
</div>
<div class="card__price">
<p class="card__price-tab">Price:</p>
<p class="card__price-num">$2,199</p>
</div>
<a
href="#"
class="card__button"
data-qa="hover"
>
BUY
</a>
</div>
</body>
</html>
152 changes: 152 additions & 0 deletions src/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,155 @@
* {
margin: 0;
}

body {
margin: 0;
width: 198px;
}

.card {
width: 198px;
border: 1px solid white;
box-shadow: 1px 1px 1px #f3f3f3;
margin: 0;
padding: 0;
}

.card__image {
height: 134px;
width: 160px;
margin-top: 32px;
margin-left: 19px;
}

.card__title {
font-family: Roboto, serif;
font-weight: 500;
font-style: normal;
font-size: 12px;
margin: 0;
color: #060b35;
margin-top: 36px;
margin-left: 16px;
line-height: 18px;
}

.star {
display: inline-flex;
background-image: url(/src/images/star.svg);
background-repeat: no-repeat;
height: 16px;
width: 16px;
align-self: center;
background-position: center;
}

.stars {
display: flex;
width: 96px;
}

.star:not(:last-child) {
margin-right: 4px;
}

.stars--1 .star:nth-child(-n + 1),
.stars--2 .star:nth-child(-n + 2),
.stars--3 .star:nth-child(-n + 3),
.stars--4 .star:nth-child(-n + 4),
.stars--5 .star:nth-child(-n + 5) {
background-image: url(/src/images/star-active.svg);
}

.card__review {
display: inline-flex;
color: #060b35;
margin-top: 16px;
margin-left: 16px;
}

.card__product-code {
font-family: Roboto, serif;
font-weight: 400;
font-style: normal;
font-size: 10px;
color: #616070;
margin-top: 6px;
margin-bottom: 0;
margin-left: 16px;
}

.card__reviews-count {
font-family: Roboto, serif;
font-weight: 400;
font-style: normal;
font-size: 10px;
color: #060b35;
align-self: flex-end;
margin-left: 23.3px;
line-height: 14px;
}

.card__price-tab {
font-family: Roboto, serif;
font-weight: 400;
font-style: normal;
font-size: 12px;
color: #616070;
align-content: center;
}

.card__price-num {
font-family: Roboto, serif;
font-weight: 700;
font-style: normal;
color: #000;
margin-left: 86px;
font-size: 16px;
margin-bottom: 0.8px;
}

.card__price {
margin-top: 20px;
display: inline-flex;
margin-left: 16px;
}

.card__reviews {
display: flex;
}

.card__button {
margin-top: 16px;
font-family: Roboto, serif;
font-weight: 700;
font-style: normal;
font-size: 14px;
width: 166px;
height: 40px;
display: flex;
background-color: #00acdc;
color: white;
text-decoration: none;
align-items: center;
justify-content: center;
border-radius: 5px;
margin-left: 16px;
}

.card__button:hover {
font-family: Roboto, serif;
font-weight: 700;
font-style: normal;
font-size: 14px;
width: 166px;
height: 40px;
display: flex;
background-color: white;
color: #00acdc;
text-decoration: none;
align-items: center;
justify-content: center;
border: 1px solid #00acdc;
border-radius: 5px;
}
Loading