From c85192d2c9f447413e8ea31d09885979302ca272 Mon Sep 17 00:00:00 2001 From: Igor Plavutskyi Date: Thu, 6 Feb 2025 15:49:17 +0200 Subject: [PATCH 1/3] Updated files and added new image --- .github/workflows/test.yml-template | 29 +++++++ package-lock.json | 9 ++- package.json | 3 +- readme.md | 4 +- src/images/logo.png | Bin 1820 -> 0 bytes src/images/moyo_1.png | Bin 0 -> 2290 bytes src/index.html | 83 ++++++++++++++++++- src/style.css | 119 +++++++++++++++++++++++++++- 8 files changed, 236 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/test.yml-template delete mode 100644 src/images/logo.png create mode 100644 src/images/moyo_1.png 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 7eef7e5ecc..3738cb1849 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": "^1.9.12", "@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": "1.9.12", + "resolved": "https://registry.npmjs.org/@mate-academy/scripts/-/scripts-1.9.12.tgz", + "integrity": "sha512-/OcmxMa34lYLFlGx7Ig926W1U1qjrnXbjFJ2TzUcDaLmED+A5se652NcWwGOidXRuMAOYLPU2jNYBEkKyXrFJA==", "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 45fd6b0d41..ef9b108584 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": "^1.9.12", "@mate-academy/stylelint-config": "latest", "backstopjs": "6.3.23", "jest": "^29.7.0", diff --git a/readme.md b/readme.md index 8a1dd91f32..e5ee303afe 100644 --- a/readme.md +++ b/readme.md @@ -27,8 +27,8 @@ The page should match the design Pixel Perfect: all the sizes, colors and distan ❗️ Replace `` with your GitHub username and copy the links to the `Pull Request` description: -- [DEMO LINK](https://.github.io/layout_moyo-header/) -- [TEST REPORT LINK](https://.github.io/layout_moyo-header/report/html_report/) +- [DEMO LINK](https://IPlavutskyi.github.io/layout_moyo-header/) +- [TEST REPORT LINK](https://IPlavutskyi.github.io/layout_moyo-header/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/images/logo.png b/src/images/logo.png deleted file mode 100644 index 9ea6299ec2a9cbc388bf91d4567c23bcf7dcd985..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1820 zcmV+%2jlpOP)XUV`sei&R(qhJV&bBQiNA;CF=V~L4lNHF0m4&nko zfQia5214B84?&j&gs2k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et}f@i7R{*ntBFOu-4& zP`c*Ju?Q9M^LAq|q(TRh4PGHse`^|ol%U9$W=w-NF=N8Y8HUD~Gbcw+D3>fv8AOl^!dUevZgt@eggoUPfJHLCb2x@P@ zP_7C~9}VL7FU>IczH6PMI{BsmSrP%+?e>grC0Qi0&aF2diG_F(8)>BZ4T>UzfoQm+ zTAKmaR(i1IyY47hTJlS}Bp3?DH8i!!f)OIlHV?r6!(tRUtinn2#gqEhQ~0!h0=)!c zKB?Vhkz@6@D%8D{uKX;Nxoc%l_5$}?ib%}ePWaxxOYTDz3tD38eWAdKDzel(t1Os{ z#K2Ww?u1`4)?`@$CaU;x&L0aK3D+^wpKjwOs}{znpoKYB?F;|<8mAtNLb0YRnoNZK zAzx$gtrK5FKCXxuOi|(aQ!SW7e(>#Q3bCNj2|KB_h0fx^=0TjHM8QILK&m~>)d);7 z>dEAJ21%36qzD&aK`pr;Ky=3~8QgTzCt)Iw1#Ys!_d2!=1zH;U26$g0-CPd+%>V!Z M07*qoM6N<$f`ou!{r~^~ literal 0 HcmV?d00001 diff --git a/src/index.html b/src/index.html index b39fe97123..b5b20e0775 100644 --- a/src/index.html +++ b/src/index.html @@ -13,10 +13,89 @@ Moyo header -

Moyo header

+
+ + +
diff --git a/src/style.css b/src/style.css index 293d3b1f13..94d3905df1 100644 --- a/src/style.css +++ b/src/style.css @@ -1,3 +1,120 @@ -body { + +* { margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: Roboto, sans-serif; + font-size: 12px; + font-weight: 500; +} + +.header { + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + height: 60px; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05); + transition: border 0.3s ease; + background: rgba(255, 255, 255, 1); + +} + +/* Рамка навколо хедера при наведенні */ +.header:hover { + border: 2px solid #00acdc; +} + +/* Рамка при натисканні на хедер */ +.header:active { + border: 2px solid #00acdc; +} + +.logo { + margin-left: 50px; +} + +.logo img { + width: 40px; + height: 40px; + display: block; + transition: border 0.3s ease; +} + +/* Рамка навколо логотипа при наведенні */ +.logo:hover { + border: 2px solid #00acdc; +} + +/* Тонша рамка навколо логотипа при натисканні */ +.logo:active { + border: 1px solid #00acdc; +} + +.nav { + margin-right: 50px; +} + +.nav__list { + display: flex; + list-style: none; +} + +.nav__list li { + margin-right: 20px; +} + +.nav__list li:last-child { + margin-right: 0; +} + +.nav__link { + position: relative; + font-size: 12px; + font-weight: 500; + text-transform: uppercase; + color: black; + text-decoration: none; + transition: + color 0.3s ease, + border 0.3s ease; +} + +.nav__link:hover { + color: #00acdc; +} + +/* Підкреслення при наведенні */ +.nav__link:hover::after { + content: ''; + position: absolute; + width: 100%; + height: 2px; + background-color: #00acdc; + bottom: -2px; + left: 0; +} + +/* Рамка при натисканні */ +.nav__link:active { + border: 2px solid #00acdc; + padding: 2px; + background: rgba(0, 172, 220, 1); + +} + +/* Спеціальний стиль для Apple (підкреслення-плашка) */ +.nav__link.is-active::after { + content: ''; + position: absolute; + width: 37px; + height: 4px; + background: rgba(0, 172, 220, 1); + border-radius: 8px; + bottom: -22px; + left: 50%; + transform: translateX(-50%); } From 85522c1101de7fc36caca8b57005fb153758c083 Mon Sep 17 00:00:00 2001 From: Igor Plavutskyi Date: Fri, 7 Feb 2025 15:30:38 +0200 Subject: [PATCH 2/3] fixed some errors --- src/index.html | 6 +++- src/style.css | 87 ++++++++++++-------------------------------------- 2 files changed, 25 insertions(+), 68 deletions(-) diff --git a/src/index.html b/src/index.html index b5b20e0775..dba699d193 100644 --- a/src/index.html +++ b/src/index.html @@ -15,6 +15,10 @@ rel="stylesheet" href="style.css" /> +
@@ -23,7 +27,7 @@ class="logo" > Logo diff --git a/src/style.css b/src/style.css index 94d3905df1..a29d59f663 100644 --- a/src/style.css +++ b/src/style.css @@ -1,120 +1,73 @@ - * { margin: 0; padding: 0; box-sizing: border-box; } -body { - font-family: Roboto, sans-serif; - font-size: 12px; - font-weight: 500; -} - .header { + position: relative; display: flex; justify-content: space-between; align-items: center; width: 100%; height: 60px; - box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05); - transition: border 0.3s ease; background: rgba(255, 255, 255, 1); - -} - -/* Рамка навколо хедера при наведенні */ -.header:hover { - border: 2px solid #00acdc; -} - -/* Рамка при натисканні на хедер */ -.header:active { - border: 2px solid #00acdc; -} - -.logo { - margin-left: 50px; } .logo img { width: 40px; height: 40px; display: block; - transition: border 0.3s ease; -} - -/* Рамка навколо логотипа при наведенні */ -.logo:hover { - border: 2px solid #00acdc; -} - -/* Тонша рамка навколо логотипа при натисканні */ -.logo:active { - border: 1px solid #00acdc; -} - -.nav { - margin-right: 50px; + margin-left: 50px; } .nav__list { display: flex; list-style: none; + align-items: center; } .nav__list li { + height: 100%; + display: flex; + align-items: center; margin-right: 20px; } .nav__list li:last-child { - margin-right: 0; + margin-right: 50px; } .nav__link { - position: relative; + font-family: Roboto, sans-serif; font-size: 12px; font-weight: 500; text-transform: uppercase; + display: flex; + position: relative; color: black; text-decoration: none; - transition: - color 0.3s ease, - border 0.3s ease; -} -.nav__link:hover { - color: #00acdc; -} + justify-content: center; /* Вирівнюємо текст по центру */ -/* Підкреслення при наведенні */ -.nav__link:hover::after { - content: ''; - position: absolute; - width: 100%; - height: 2px; - background-color: #00acdc; - bottom: -2px; - left: 0; + line-height: 60px; /* Вирівнюємо текст вертикально */ } -/* Рамка при натисканні */ -.nav__link:active { - border: 2px solid #00acdc; - padding: 2px; - background: rgba(0, 172, 220, 1); +.nav__link:hover { + color: rgba(0, 172, 220, 1); +} +.nav__link.is-active { + color: #00acdc; } -/* Спеціальний стиль для Apple (підкреслення-плашка) */ .nav__link.is-active::after { + display: block; content: ''; position: absolute; - width: 37px; + width: 100%; height: 4px; background: rgba(0, 172, 220, 1); border-radius: 8px; - bottom: -22px; - left: 50%; - transform: translateX(-50%); + bottom: 0; } From f32d45c8711862399d7d5f6b2755c42d076c02f5 Mon Sep 17 00:00:00 2001 From: Igor Plavutskyi Date: Fri, 7 Feb 2025 16:36:56 +0200 Subject: [PATCH 3/3] corrected all errors --- src/style.css | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/style.css b/src/style.css index a29d59f663..2b91edbde0 100644 --- a/src/style.css +++ b/src/style.css @@ -12,13 +12,13 @@ width: 100%; height: 60px; background: rgba(255, 255, 255, 1); + padding: 0 50px; } .logo img { width: 40px; height: 40px; display: block; - margin-left: 50px; } .nav__list { @@ -35,7 +35,7 @@ } .nav__list li:last-child { - margin-right: 50px; + margin-right: 0; } .nav__link { @@ -47,10 +47,8 @@ position: relative; color: black; text-decoration: none; - - justify-content: center; /* Вирівнюємо текст по центру */ - - line-height: 60px; /* Вирівнюємо текст вертикально */ + justify-content: center; + line-height: 60px; } .nav__link:hover {