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..a105949c38 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 45fd6b0d41..6c8f2aaa0e 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 fc0db80092..74a3b6907f 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://CarlosGabrielOliveiraa.github.io/layout_moyo-header/) +- [TEST REPORT LINK](https://CarlosGabrielOliveiraa.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. @@ -39,5 +39,5 @@ The page should match the design Pixel Perfect: all the sizes, colors and distan - [ ] **CSS Variable** is used for a blue color - [ ] Pseudo-element is used for a blue line below the active link - [ ] Code follows all the [Code Style Rules ❗️](./checklist.md) -- [ ] The Google Fonts Configuration follows requirements. -![alt text](./assets/image.png) \ No newline at end of file +- [ ] The Google Fonts Configuration follows requirements. +![alt text](./assets/image.png) diff --git a/src/index.html b/src/index.html index b39fe97123..67990b1269 100644 --- a/src/index.html +++ b/src/index.html @@ -15,8 +15,100 @@ rel="stylesheet" href="./style.css" /> + + + -

Moyo header

+
+ + MOYO logo + + +
diff --git a/src/style.css b/src/style.css index 293d3b1f13..121782f514 100644 --- a/src/style.css +++ b/src/style.css @@ -1,3 +1,84 @@ +:root { + --color-blue: #00acdc; + --color-white: #fff; + --color-black: #000; +} + body { margin: 0; + font-family: Roboto, sans-serif; + font-weight: 500; +} + +.header { + width: 100%; + box-sizing: border-box; + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 50px; +} + +.header__logo-link { + height: 40px; + width: 40px; + display: inline-flex; +} + +.nav__links { + list-style: none; + display: flex; + font-size: 12px; + padding: 0; + margin: 0; +} + +.nav__links .nav__item { + margin: 0; +} + +.nav__links .nav__item:not(:last-child) { + margin-right: 20px; +} + +.nav__links .nav__link { + height: 60px; + display: flex; + align-items: center; + text-decoration: none; + color: var(--color-black); + line-height: 1; + text-transform: uppercase; + position: relative; +} + +.nav__links .nav__link:hover { + color: var(--color-blue); +} + +.nav__links .nav__link:focus-visible { + outline: 2px solid var(--color-blue); + outline-offset: 4px; + border-radius: 6px; +} + +.nav__links .nav__link.is-active { + color: var(--color-blue); +} + +.nav__links .nav__link.is-active::after { + content: ''; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 4px; + background-color: var(--color-blue); + border-radius: 8px; +} + +@media (max-width: 1023px) { + .header { + padding: 0 40px; + } }