Skip to content

Commit

Permalink
add task solution
Browse files Browse the repository at this point in the history
  • Loading branch information
ErasoumZe committed Oct 25, 2024
1 parent d710b7c commit efaaeef
Show file tree
Hide file tree
Showing 11 changed files with 194 additions and 392 deletions.
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/>
<link
rel="stylesheet"
href="styles/index.css"
href="styles/index.scss"
/>
</head>

Expand Down
19 changes: 19 additions & 0 deletions src/styles/blocks/buy.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.buy {
text-align: center;
text-decoration: none;
text-transform: uppercase;
padding: 12px 70px;
color: rgba(255, 255, 255, 1);
background-color: $blue-accent;
font-weight: 700;
font-size: 14px;
line-height: 16px;
border-radius: $rounding;
transition: $transition-duration;

&:hover {
background-color: $white;
color: $blue-accent;
border: $blue-border;
}
}
75 changes: 75 additions & 0 deletions src/styles/blocks/card.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
.grid-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 200px));
justify-content: center;
gap: 46px 48px;
padding: 50px 40px;
}

.card {
display: flex;
justify-content: center;
flex-direction: column;
width: 200px;
border: $gray-border;
padding: 32px 16px 16px;
border-radius: $rounding;
transition: $transition-duration;

&:hover {
transform: scale(1.2);
}

&__image {
margin-bottom: 40px;
padding-inline: 3px;
min-height: 134px;
}

&__title {
font-weight: 500;
font-size: 12px;
line-height: 18px;
margin-bottom: 4px;
}

&:hover .card__title {
color: $title-hover;
}

&__code {
font-size: 10px;
color: $secondary;
margin-bottom: 16px;
}

&__rating {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
}

&__review {
font-size: 10px;
color: $main-accent;
}

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

&__price-text {
line-height: 18px;
color: $secondary;
}

&__price-number {
font-weight: 700;
font-size: 16px;
line-height: 18px;
color: $main-accent;
}
}
11 changes: 11 additions & 0 deletions src/styles/blocks/header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding-inline: 50px;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);

&__logo-link {
display: flex;
}
}
42 changes: 42 additions & 0 deletions src/styles/blocks/nav.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.nav {
text-transform: uppercase;
font-weight: 500;

&__list {
display: flex;
list-style: none;

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

&__link {
position: relative;
display: block;
text-decoration: none;
color: $main-accent;
padding-block: 23px;
transition: $transition-duration;

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

&--active {
color: $blue-accent;

&::before {
content: '';
display: block;
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 4px;
border-radius: 8px;
background-color: $blue-accent;
}
}
}
}
17 changes: 17 additions & 0 deletions src/styles/blocks/page.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}

.page {
font-family: Roboto, sans-serif;
font-weight: 400;
font-size: 12px;
line-height: 14px;
color: $main-accent;
}

.page__body {
margin: 0;
}
19 changes: 19 additions & 0 deletions src/styles/blocks/stars.scss
Original file line number Diff line number Diff line change
@@ -0,0 +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;
}
}
188 changes: 0 additions & 188 deletions src/styles/index.css

This file was deleted.

1 change: 0 additions & 1 deletion src/styles/index.css.map

This file was deleted.

Loading

0 comments on commit efaaeef

Please sign in to comment.