Skip to content

Commit

Permalink
add task solution
Browse files Browse the repository at this point in the history
  • Loading branch information
ErasoumZe committed Nov 1, 2024
1 parent efaaeef commit a2cada7
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 31 deletions.
38 changes: 18 additions & 20 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
</li>
<li class="nav__item">
<a
class="nav__link nav__link--hover"
class="nav__link"
href="#"
data-qa="nav-hover"
>
Expand Down Expand Up @@ -124,7 +124,7 @@ <h2 class="card__title">
<span class="card__code">Product code: 195434</span>

<div class="card__rating">
<div class="stars stars--active">
<div class="stars stars--4">
<div class="stars__item"></div>
<div class="stars__item"></div>
<div class="stars__item"></div>
Expand All @@ -141,7 +141,7 @@ <h2 class="card__title">

<a
href="#"
class="buy"
class="card__buy-button"
data-qa="card-hover"
>
Buy
Expand All @@ -160,7 +160,7 @@ <h2 class="card__title">
<span class="card__code">Product code: 195434</span>

<div class="card__rating">
<div class="stars stars--active">
<div class="stars stars--4">
<div class="stars__item"></div>
<div class="stars__item"></div>
<div class="stars__item"></div>
Expand All @@ -177,7 +177,7 @@ <h2 class="card__title">

<a
href="#"
class="buy"
class="card__buy-button"
>
Buy
</a>
Expand All @@ -195,7 +195,7 @@ <h2 class="card__title">
<span class="card__code">Product code: 195434</span>

<div class="card__rating">
<div class="stars stars--active">
<div class="stars stars--4">
<div class="stars__item"></div>
<div class="stars__item"></div>
<div class="stars__item"></div>
Expand All @@ -212,7 +212,7 @@ <h2 class="card__title">

<a
href="#"
class="buy"
class="card__buy-button"
>
Buy
</a>
Expand All @@ -230,7 +230,7 @@ <h2 class="card__title">
<span class="card__code">Product code: 195434</span>

<div class="card__rating">
<div class="stars stars--active">
<div class="stars stars--4">
<div class="stars__item"></div>
<div class="stars__item"></div>
<div class="stars__item"></div>
Expand All @@ -247,7 +247,7 @@ <h2 class="card__title">

<a
href="#"
class="buy"
class="card__buy-button"
>
Buy
</a>
Expand All @@ -265,7 +265,7 @@ <h2 class="card__title">
<span class="card__code">Product code: 195434</span>

<div class="card__rating">
<div class="stars stars--active">
<div class="stars stars--4">
<div class="stars__item"></div>
<div class="stars__item"></div>
<div class="stars__item"></div>
Expand All @@ -282,7 +282,7 @@ <h2 class="card__title">

<a
href="#"
class="buy"
class="card__buy-button"
>
Buy
</a>
Expand All @@ -300,7 +300,7 @@ <h2 class="card__title">
<span class="card__code">Product code: 195434</span>

<div class="card__rating">
<div class="stars stars--active">
<div class="stars stars--4">
<div class="stars__item"></div>
<div class="stars__item"></div>
<div class="stars__item"></div>
Expand All @@ -317,7 +317,7 @@ <h2 class="card__title">

<a
href="#"
class="buy"
class="card__buy-button"
>
Buy
</a>
Expand All @@ -329,13 +329,11 @@ <h2 class="card__title">
src="./images/imac.jpeg"
alt="imac"
/>
<h2 class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h2>
<h2 class="card__title">Julynha linda</h2>
<span class="card__code">Product code: 195434</span>

<div class="card__rating">
<div class="stars stars--active">
<div class="stars stars--4">
<div class="stars__item"></div>
<div class="stars__item"></div>
<div class="stars__item"></div>
Expand All @@ -352,7 +350,7 @@ <h2 class="card__title">

<a
href="#"
class="buy"
class="card__buy-button"
>
Buy
</a>
Expand All @@ -370,7 +368,7 @@ <h2 class="card__title">
<span class="card__code">Product code: 195434</span>

<div class="card__rating">
<div class="stars stars--active">
<div class="stars stars--4">
<div class="stars__item"></div>
<div class="stars__item"></div>
<div class="stars__item"></div>
Expand All @@ -387,7 +385,7 @@ <h2 class="card__title">

<a
href="#"
class="buy"
class="card__buy-button"
>
Buy
</a>
Expand Down
5 changes: 3 additions & 2 deletions src/styles/blocks/buy.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.buy {
.card__buy-button {
text-align: center;
text-decoration: none;
text-transform: uppercase;
Expand All @@ -10,10 +10,11 @@
line-height: 16px;
border-radius: $rounding;
transition: $transition-duration;
border: 2px solid transparent;

&:hover {
background-color: $white;
color: $blue-accent;
border: $blue-border;
border-color: $blue-border;
}
}
2 changes: 1 addition & 1 deletion src/styles/blocks/nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
padding-block: 23px;
transition: $transition-duration;

&--hover:hover {
&:hover {
color: $blue-accent;
}

Expand Down
16 changes: 8 additions & 8 deletions src/styles/blocks/stars.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
.stars {
display: flex;

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

&--active :not(:last-child) {
background-image: url(/src/images/star-active.svg);
}

&__item {
width: 16px;
height: 16px;
background-image: url(/src/images/star.svg);
background-repeat: no-repeat;
background-position: center;
}

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

&--4 .stars__item:nth-child(-n + 4) {
background-image: url(/src/images/star-active.svg);
}
}

0 comments on commit a2cada7

Please sign in to comment.