Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/test.yml-template
Original file line number Diff line number Diff line change
@@ -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
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ The page should match the design Pixel Perfect: all the sizes, colors and distan

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

- [DEMO LINK](https://<your_account>.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://<your_account>.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.

Expand All @@ -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)
- [ ] The Google Fonts Configuration follows requirements.
![alt text](./assets/image.png)
94 changes: 93 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,100 @@
rel="stylesheet"
href="./style.css"
/>
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossorigin="anonymous"
/>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"
rel="stylesheet"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="#"
class="header__logo-link"
>
<img
src="images/logo.png"
alt="MOYO logo"
/>
</a>
<nav>
<ul class="nav__links">
<li class="nav__item">
<a
href="#apple"
class="nav__link is-active"
>
Apple
</a>
</li>
<li class="nav__item">
<a
href="#samsung"
class="nav__link"
>
Samsung
</a>
</li>
<li class="nav__item">
<a
href="#smartphones"
class="nav__link"
>
Smartphones
</a>
</li>
<li class="nav__item">
<a
href="#laptops"
data-qa="hover"
class="nav__link"
>
Laptops & Computers
</a>
</li>
<li class="nav__item">
<a
href="#gadgets"
class="nav__link"
>
Gadgets
</a>
</li>
<li class="nav__item">
<a
href="#tablets"
class="nav__link"
>
Tablets
</a>
</li>
<li class="nav__item">
<a
href="#photo"
class="nav__link"
>
Photo
</a>
</li>
<li class="nav__item">
<a
href="#video"
class="nav__link"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
81 changes: 81 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -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;
}
}