From 52a6754faa4c1fae6acbe96c9c3c1aa4daaa322d Mon Sep 17 00:00:00 2001 From: Marek Maciejewski Date: Sat, 22 Jul 2023 19:45:19 +0200 Subject: [PATCH 1/2] add task solution --- readme.md | 4 ++-- src/index.html | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- src/style.css | 27 +++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index 67cabc463e..cc307085de 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ # Stars block 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://mareksax.github.io/layout_stars/) +- [TEST REPORT LINK](https://mareksax.github.io/layout_stars/report/html_report/) > Follow [this instructions](https://mate-academy.github.io/layout_task-guideline) ___ diff --git a/src/index.html b/src/index.html index 3963c1c4cd..c267ac4fb7 100644 --- a/src/index.html +++ b/src/index.html @@ -8,6 +8,54 @@ -

Stars

+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
diff --git a/src/style.css b/src/style.css index e69de29bb2..447839ecc0 100644 --- a/src/style.css +++ b/src/style.css @@ -0,0 +1,27 @@ +body { + margin: 0; +} + +.stars { + display: flex; +} + +.stars_star { + width: 16px; + height: 16px; + background-image: url(images\star.svg); + background-repeat: no-repeat; + background-position: center; +} + +.stars_star:not(:first-child) { + margin-left: 4px; +} + +.stars--1 .stars_star:nth-child(-n + 1), +.stars--2 .stars_star:nth-child(-n + 2), +.stars--3 .stars_star:nth-child(-n + 3), +.stars--4 .stars_star:nth-child(-n + 4), +.stars--5 .stars_star:nth-child(-n + 5) { + background-image: url(images\star-active.svg); +} From 4a13b913b4aa8bc169a7f3fa45d81c896e0b4e5a Mon Sep 17 00:00:00 2001 From: Marek Maciejewski Date: Thu, 27 Jul 2023 11:47:17 +0200 Subject: [PATCH 2/2] made requested changes --- src/index.html | 84 +++++++++++++++++++++++++------------------------- src/style.css | 17 +++++----- 2 files changed, 52 insertions(+), 49 deletions(-) diff --git a/src/index.html b/src/index.html index c267ac4fb7..8a322816b1 100644 --- a/src/index.html +++ b/src/index.html @@ -9,53 +9,53 @@
-
-
-
-
-
-
-
+
    +
  • +
  • +
  • +
  • +
  • +
-
-
-
-
-
-
-
+
    +
  • +
  • +
  • +
  • +
  • +
-
-
-
-
-
-
-
+
    +
  • +
  • +
  • +
  • +
  • +
-
-
-
-
-
-
-
+
    +
  • +
  • +
  • +
  • +
  • +
-
-
-
-
-
-
-
+
    +
  • +
  • +
  • +
  • +
  • +
-
-
-
-
-
-
-
+
    +
  • +
  • +
  • +
  • +
  • +
diff --git a/src/style.css b/src/style.css index 447839ecc0..31b502036e 100644 --- a/src/style.css +++ b/src/style.css @@ -3,13 +3,16 @@ body { } .stars { + list-style-type: none; display: flex; + padding: 0; + margin: 0; } .stars_star { width: 16px; height: 16px; - background-image: url(images\star.svg); + background-image: url(images/star.svg); background-repeat: no-repeat; background-position: center; } @@ -18,10 +21,10 @@ body { margin-left: 4px; } -.stars--1 .stars_star:nth-child(-n + 1), -.stars--2 .stars_star:nth-child(-n + 2), -.stars--3 .stars_star:nth-child(-n + 3), -.stars--4 .stars_star:nth-child(-n + 4), -.stars--5 .stars_star:nth-child(-n + 5) { - background-image: url(images\star-active.svg); +.stars--1 :nth-child(-n + 1), +.stars--2 :nth-child(-n + 2), +.stars--3 :nth-child(-n + 3), +.stars--4 :nth-child(-n + 4), +.stars--5 :nth-child(-n + 5) { + background-image: url(images/star-active.svg); }