Skip to content

Commit

Permalink
task solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Bolotskyi committed Jan 11, 2025
1 parent 821ca20 commit 9441486
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 4 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Follow

❗️ Replace `<your_account>` with your Github username and copy the links to `Pull Request` description:

- [DEMO LINK](https://<your_account>.github.io/layout_stars/)
- [TEST REPORT LINK](https://<your_account>.github.io/layout_stars/report/html_report/)
- [DEMO LINK](https://mindcontrol01.github.io/layout_stars/)
- [TEST REPORT LINK](https://mindcontrol01.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.

Expand Down
44 changes: 43 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,48 @@
/>
</head>
<body>
<h1>Stars</h1>
<div class="stars stars--0">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>
<div class="stars stars--1">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>
<div class="stars stars--2">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>
<div class="stars stars--3">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>
<div class="stars stars--4">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>
<div class="stars stars--5">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>

</body>
</html>
39 changes: 38 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,38 @@
/* add styles here */
* {
margin: 0;
}

/* stars reg */

.stars {
display: flex;
}

.stars__star {
width: 24px;
height: 24px;
background-image: url(./images/star.svg);
background-size: cover;
background-repeat: no-repeat;
margin-right: 8px;
}

.stars--1 .stars__star:nth-child(1),
.stars--2 .stars__star:nth-child(1),
.stars--2 .stars__star:nth-child(2),
.stars--3 .stars__star:nth-child(1),
.stars--3 .stars__star:nth-child(2),
.stars--3 .stars__star:nth-child(3),
.stars--4 .stars__star:nth-child(1),
.stars--4 .stars__star:nth-child(2),
.stars--4 .stars__star:nth-child(3),
.stars--4 .stars__star:nth-child(4),
.stars--5 .stars__star:nth-child(1),
.stars--5 .stars__star:nth-child(2),
.stars--5 .stars__star:nth-child(3),
.stars--5 .stars__star:nth-child(4),
.stars--5 .stars__star:nth-child(5) {
background-image: url(./images/star-active.svg)
}

/* end reg */

0 comments on commit 9441486

Please sign in to comment.