From 17db0785b748ca7655029ad9ff77cd0d198879e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=20=20=D0=B5=20=D0=B0=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Date: Thu, 31 Oct 2024 17:04:05 +0200 Subject: [PATCH 1/2] add task solution --- readme.md | 6 +++--- src/index.html | 55 ++++++++++++++++++++++++++++++++++++++++++++++-- src/style.css | 57 +++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 112 insertions(+), 6 deletions(-) diff --git a/readme.md b/readme.md index b8c3a1d3f2..4479d00599 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ Implement the [Stars Block](https://www.figma.com/file/ojkArVazq7vsX0nbpn9CxZ/Moyo-%2F-Catalog-(ENG)?node-id=11325%3A2960) used in a card and catalog. -Hold `Alt` key (`Option` on MacOS) to measure distances in Figma. +Hold `Alt` key (`Option` on MacOS) to measure distances in Figma. > Here are the [Layout Tasks Instructions](https://mate-academy.github.io/layout_task-guideline) @@ -22,8 +22,8 @@ Hold `Alt` key (`Option` on MacOS) to measure distances in Figma. ❗️ Replace `` with your Github username and copy the links to `Pull Request` description: -- [DEMO LINK](https://.github.io/layout_stars/) -- [TEST REPORT LINK](https://.github.io/layout_stars/report/html_report/) +- [DEMO LINK](https://OleksandrLib.github.io/layout_stars/) +- [TEST REPORT LINK](https://OleksandrLib.github.io/layout_stars/report/html_report/) ❗️ Copy this `Checklist` to the `Pull Request` description after links, and put `- [x]` before each point after you checked it. diff --git a/src/index.html b/src/index.html index 3e4d7e8ab0..376e6cfc4d 100644 --- a/src/index.html +++ b/src/index.html @@ -1,3 +1,4 @@ + @@ -12,7 +13,57 @@ href="./style.css" /> - -

Stars

+ + + +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
diff --git a/src/style.css b/src/style.css index a63fa10d43..064559b3c9 100644 --- a/src/style.css +++ b/src/style.css @@ -1 +1,56 @@ -/* add styles here */ +.page { + margin: 0; +} + +.container { + height: 96px; + + display: flex; + justify-content: space-between; + flex-direction: column; +} + +.stars { + width: 96px; + + display: flex; + justify-content: space-between; + flex-direction: row; +} + +.stars__star { + margin: 2px 1.5px 1.5px 2px; + background-image: url(./images/star.svg); + width: 13px; + height: 12px; +} + +.stars--1 > .stars__star:nth-child(1) { + background-image: url(./images/star-active.svg); + width: 13px; + height: 12px; +} + +.stars--2 > .stars__star:nth-child(-n + 2) { + background-image: url(./images/star-active.svg); + width: 13px; + height: 12px; +} + +.stars--3 > .stars__star:nth-child(-n + 3) { + background-image: url(./images/star-active.svg); + width: 13px; + height: 12px; +} + +.stars--4 > .stars__star:nth-child(-n + 4) { + background-image: url(./images/star-active.svg); + width: 13px; + height: 12px; +} + +.stars--5 > .stars__star:nth-child(-n + 5) { + background-image: url(./images/star-active.svg); + width: 13px; + height: 12px; +} From 6eaf49a3bcb645d73a39b262d6378e94e728816c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=20=20=D0=B5=20=D0=B0=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Date: Fri, 1 Nov 2024 11:27:52 +0200 Subject: [PATCH 2/2] add task solution --- readme.md | 8 ++--- src/index.html | 84 ++++++++++++++++++++++++-------------------------- src/style.css | 13 +------- 3 files changed, 46 insertions(+), 59 deletions(-) diff --git a/readme.md b/readme.md index 4479d00599..75466c4074 100644 --- a/readme.md +++ b/readme.md @@ -27,7 +27,7 @@ Hold `Alt` key (`Option` on MacOS) to measure distances in Figma. ❗️ Copy this `Checklist` to the `Pull Request` description after links, and put `- [x]` before each point after you checked it. -- [ ] Yellow stars are added with container modifier + pseudo-selector (NO extra classes) -- [ ] Each BEM block has its own separate file -- [ ] All `Typical Mistakes` from `BEM` lesson theory are checked. -- [ ] Code follows all the [Code Style Rules ❗️](./checklist.md) +- [x] Yellow stars are added with container modifier + pseudo-selector (NO extra classes) +- [x] Each BEM block has its own separate file +- [x] All `Typical Mistakes` from `BEM` lesson theory are checked. +- [x] Code follows all the [Code Style Rules ❗️](./checklist.md) diff --git a/src/index.html b/src/index.html index 376e6cfc4d..bdc8f501a0 100644 --- a/src/index.html +++ b/src/index.html @@ -16,54 +16,52 @@ -
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/src/style.css b/src/style.css index 064559b3c9..55a6ae6a53 100644 --- a/src/style.css +++ b/src/style.css @@ -2,24 +2,13 @@ margin: 0; } -.container { - height: 96px; - - display: flex; - justify-content: space-between; - flex-direction: column; -} - .stars { - width: 96px; - display: flex; - justify-content: space-between; flex-direction: row; } .stars__star { - margin: 2px 1.5px 1.5px 2px; + margin: 2px 5px 2px 2px; background-image: url(./images/star.svg); width: 13px; height: 12px;