From 7784fd1dc1a9733031caf8d11812fb8df5b13bed Mon Sep 17 00:00:00 2001 From: Paulina Wawrowska Date: Wed, 1 Jul 2026 16:59:36 +0200 Subject: [PATCH 1/3] mychanges --- .github/workflows/test.yml-template | 29 +++++++++++++++ package-lock.json | 9 ++--- package.json | 3 +- readme.md | 14 ++++---- src/index.html | 48 ++++++++++++++++++++++++- src/style.css | 55 ++++++++++++++++++++++++++++- 6 files changed, 143 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/test.yml-template diff --git a/.github/workflows/test.yml-template b/.github/workflows/test.yml-template new file mode 100644 index 0000000000..8b5743ecb4 --- /dev/null +++ b/.github/workflows/test.yml-template @@ -0,0 +1,29 @@ +name: Test + +on: + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm test + - name: Upload HTML report(backstop data) + if: ${{ always() }} + uses: actions/upload-artifact@v2 + with: + name: report + path: backstop_data diff --git a/package-lock.json b/package-lock.json index 679d844cb7..f0f21d0865 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@mate-academy/backstop-config": "latest", "@mate-academy/bemlint": "latest", "@mate-academy/linthtml-config": "latest", - "@mate-academy/scripts": "^1.8.6", + "@mate-academy/scripts": "^2.1.3", "@mate-academy/stylelint-config": "latest", "backstopjs": "6.3.23", "jest": "^29.7.0", @@ -1211,10 +1211,11 @@ "dev": true }, "node_modules/@mate-academy/scripts": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/@mate-academy/scripts/-/scripts-1.8.6.tgz", - "integrity": "sha512-b4om/whj4G9emyi84ORE3FRZzCRwRIesr8tJHXa8EvJdOaAPDpzcJ8A0sFfMsWH9NUOVmOwkBtOXDu5eZZ00Ig==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@mate-academy/scripts/-/scripts-2.1.3.tgz", + "integrity": "sha512-a07wHTj/1QUK2Aac5zHad+sGw4rIvcNl5lJmJpAD7OxeSbnCdyI6RXUHwXhjF5MaVo9YHrJ0xVahyERS2IIyBQ==", "dev": true, + "license": "MIT", "dependencies": { "@octokit/rest": "^17.11.2", "@types/get-port": "^4.2.0", diff --git a/package.json b/package.json index 28b7ea9ca7..f47f031da9 100644 --- a/package.json +++ b/package.json @@ -17,13 +17,12 @@ "keywords": [], "author": "Mate Academy", "license": "GPL-3.0", - "dependencies": {}, "devDependencies": { "@linthtml/linthtml": "^0.9.6", "@mate-academy/backstop-config": "latest", "@mate-academy/bemlint": "latest", "@mate-academy/linthtml-config": "latest", - "@mate-academy/scripts": "^1.8.6", + "@mate-academy/scripts": "^2.1.3", "@mate-academy/stylelint-config": "latest", "backstopjs": "6.3.23", "jest": "^29.7.0", diff --git a/readme.md b/readme.md index b8c3a1d3f2..e4cf6f34ce 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,12 +22,12 @@ 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://paulinka200717.github.io/layout_stars/) +- [TEST REPORT LINK](https://paulinka200717.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. -- [ ] 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 3e4d7e8ab0..428d3b303b 100644 --- a/src/index.html +++ b/src/index.html @@ -13,6 +13,52 @@ /> -

Stars

+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
diff --git a/src/style.css b/src/style.css index a63fa10d43..97448a4356 100644 --- a/src/style.css +++ b/src/style.css @@ -1 +1,54 @@ -/* add styles here */ +/* #region Body */ +body { + margin: 0; +} + +/* #endregion */ + +/* #region Stars */ +.stars { + display: flex; + align-items: center; + justify-content: flex-start; + margin: 0; + padding: 0; +} + +.stars__star { + background-image: url('images/star.svg'); + background-repeat: no-repeat; + width: 16px; + height: 16px; + background-size: 100% 100%; + background-position: center; +} + +.stars__star:not(:last-child) { + margin-right: 4px; +} + +.stars--0 .stars__star:nth-child(-n + 0) { + background-image: url('images/star-active.svg'); +} + +.stars--1 .stars__star:nth-child(-n + 1) { + background-image: url('images/star-active.svg'); +} + +.stars--2 .stars__star:nth-child(-n + 2) { + background-image: url('images/star-active.svg'); +} + +.stars--3 .stars__star:nth-child(-n + 3) { + background-image: url('images/star-active.svg'); +} + +.stars--4 .stars__star:nth-child(-n + 4) { + background-image: url('images/star-active.svg'); +} + +.stars--5 .stars__star:nth-child(-n + 5) { + background-image: url('images/star-active.svg'); +} + +/* #endregion */ From 6a663590e885b4ed03baf7fe55182e6b717a0a66 Mon Sep 17 00:00:00 2001 From: Paulina Wawrowska Date: Thu, 2 Jul 2026 14:11:39 +0200 Subject: [PATCH 2/3] changes --- src/index.html | 4 ++++ src/style.css | 50 ++------------------------------------------ src/styles/stars.css | 38 +++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 48 deletions(-) create mode 100644 src/styles/stars.css diff --git a/src/index.html b/src/index.html index 428d3b303b..089fa631c7 100644 --- a/src/index.html +++ b/src/index.html @@ -11,6 +11,10 @@ rel="stylesheet" href="./style.css" /> +
diff --git a/src/style.css b/src/style.css index 97448a4356..8ba3862f98 100644 --- a/src/style.css +++ b/src/style.css @@ -1,54 +1,8 @@ +@import './styles/stars.css'; + /* #region Body */ body { margin: 0; } /* #endregion */ - -/* #region Stars */ -.stars { - display: flex; - align-items: center; - justify-content: flex-start; - margin: 0; - padding: 0; -} - -.stars__star { - background-image: url('images/star.svg'); - background-repeat: no-repeat; - width: 16px; - height: 16px; - background-size: 100% 100%; - background-position: center; -} - -.stars__star:not(:last-child) { - margin-right: 4px; -} - -.stars--0 .stars__star:nth-child(-n + 0) { - background-image: url('images/star-active.svg'); -} - -.stars--1 .stars__star:nth-child(-n + 1) { - background-image: url('images/star-active.svg'); -} - -.stars--2 .stars__star:nth-child(-n + 2) { - background-image: url('images/star-active.svg'); -} - -.stars--3 .stars__star:nth-child(-n + 3) { - background-image: url('images/star-active.svg'); -} - -.stars--4 .stars__star:nth-child(-n + 4) { - background-image: url('images/star-active.svg'); -} - -.stars--5 .stars__star:nth-child(-n + 5) { - background-image: url('images/star-active.svg'); -} - -/* #endregion */ diff --git a/src/styles/stars.css b/src/styles/stars.css new file mode 100644 index 0000000000..9485e129ee --- /dev/null +++ b/src/styles/stars.css @@ -0,0 +1,38 @@ +/* #region Stars */ +.stars { + display: flex; + align-items: center; + justify-content: flex-start; + margin: 0; + padding: 0; +} + +/* #endregion */ + +/* #region Stars__star */ +.stars__star { + background-image: url('../images/star.svg'); + background-repeat: no-repeat; + width: 16px; + height: 16px; + background-size: 100% 100%; + background-position: center; +} + +.stars__star:not(:last-child) { + margin-right: 4px; +} + +/* #endregion */ + +/* #region Stars Modifiers */ +.stars--0 .stars__star:nth-child(-n + 0), +.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'); +} + +/* #endregion */ From be6fee35857b7560722ac97d2d7da4ab88c9fb60 Mon Sep 17 00:00:00 2001 From: Paulina Wawrowska Date: Thu, 2 Jul 2026 14:34:54 +0200 Subject: [PATCH 3/3] stars size changes --- src/styles/stars.css | 1 - 1 file changed, 1 deletion(-) diff --git a/src/styles/stars.css b/src/styles/stars.css index 9485e129ee..c261bd17c3 100644 --- a/src/styles/stars.css +++ b/src/styles/stars.css @@ -15,7 +15,6 @@ background-repeat: no-repeat; width: 16px; height: 16px; - background-size: 100% 100%; background-position: center; }