Skip to content

Commit

Permalink
task completed
Browse files Browse the repository at this point in the history
  • Loading branch information
staner1 committed Oct 31, 2024
1 parent 4e2df17 commit 68f84ed
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 26 deletions.
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Create HTML page with catalog. Develop semantic page structure as shown on [the
- add `data-qa="card-hover"` (not just `hover`) to the link `Buy` inside the first card
- nav links color is not `black` any more (nav links should have `#060b35` color)
- add class `is-active` to the first link (`Apple`) in navigation
- use `<main>` tag for cards container
- use `<main>` tag for cards container
- use grid for cards with different number of columns:
- 1 for the smaller screens
- 2 starting at `488px`
Expand All @@ -32,8 +32,8 @@ Make all the changes smooth on hover (during 300ms):
## Checklist

❗️ Replace `<your_account>` with your Github username and copy the links to `Pull Request` description:
- [DEMO LINK](https://<your_account>.github.io/layout_catalog/)
- [TEST REPORT LINK](https://<your_account>.github.io/layout_catalog/report/html_report/)
- [DEMO LINK](https://staner1.github.io/layout_catalog/)
- [TEST REPORT LINK](https://staner1.github.io/layout_catalog/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
17 changes: 10 additions & 7 deletions src/styles/blocks/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,43 @@
gap: 4px;

&-title {
font-size: 12px;
font-size: $font-size-standart;
font-weight: 500;
line-height: 18px;
color: $black;
}

&-subtitle {
font-size: 10px;
font-size: $font-size-small;
color: $gray;
font-weight: 400;
line-height: 14px;
}
}

&__review {
width: 100%;
width: $width-100-perc;
margin-bottom: 24px;
display: flex;
justify-content: space-between;

&-label {
font-size: 10px;
font-size: $font-size-small;
line-height: 16px;
color: $black;
}
}

&__price {
margin-bottom: 16px;
width: 100%;
width: $width-100-perc;
height: 18px;
display: flex;
justify-content: space-between;
align-items: center;

&-label {
font-size: 12px;
font-size: $font-size-standart;
font-weight: 400;
color: $gray;
}
Expand All @@ -67,13 +69,14 @@
font-size: 16px;
font-weight: 700;
line-height: 18px;
color: $black;
}
}

&__button {
text-decoration: none;

width: 100%;
width: $width-100-perc;
height: 40px;
background-color: $turquoise;
border-radius: 5px;
Expand Down
15 changes: 2 additions & 13 deletions src/styles/blocks/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,7 @@
display: grid;
justify-content: center;

grid-template-columns: repeat(1, 200px);
gap: 46px 48px;

@media (min-width: 488px) {
grid-template-columns: repeat(2, 200px);
}
@include content-grid-columns;

@media (min-width: 768px) {
grid-template-columns: repeat(3, 200px);
}

@media (min-width: 1024px) {
grid-template-columns: repeat(4, 200px);
}
gap: 46px 48px;
}
6 changes: 5 additions & 1 deletion src/styles/blocks/modifiers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
content: '';
position: absolute;
bottom: 0;
width: 100%;
width: $width-100-perc;
height: 4px;
background-color: $turquoise;
border-radius: 8px;
Expand All @@ -20,6 +20,10 @@
transform: scale(1.2);
}

.card:hover .card__text-title {
color: $blue-black;
}

.stars--4 .stars__star:nth-child(-n + 4) {
background-image: url(../images/star-active.svg);
background-repeat: no-repeat;
Expand Down
3 changes: 1 addition & 2 deletions src/styles/blocks/nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
}

&__item {
position: relative;
text-decoration: none;
list-style-type: none;
margin-right: 20px;

font-size: 12px;
font-size: $font-size-standart;
font-weight: 500;

&:last-child {
Expand Down
1 change: 1 addition & 0 deletions src/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import './utils/mixins';
@import './utils/variables';
@import './blocks/modifiers';
@import './blocks/page';
Expand Down
33 changes: 33 additions & 0 deletions src/styles/utils/mixins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@mixin small() {
@media (min-width: 488px) {
@content;
}
}

@mixin medium() {
@media (min-width: 768px) {
@content;
}
}

@mixin large() {
@media (min-width: 1024px) {
@content;
}
}

@mixin content-grid-columns() {
grid-template-columns: repeat(1, 200px);

@include small {
grid-template-columns: repeat(2, 200px);
}

@include medium {
grid-template-columns: repeat(3, 200px);
}

@include large {
grid-template-columns: repeat(4, 200px);
}
}
4 changes: 4 additions & 0 deletions src/styles/utils/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ $black: #060b35;
$gray-border: #f3f3f3;
$gray: #616070;
$white: #fff;
$blue-black: #34568b;
$font-size-standart: 12px;
$font-size-small: 10px;
$width-100-perc: 100%;

0 comments on commit 68f84ed

Please sign in to comment.