Skip to content
Open

Develop #7281

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
7 changes: 7 additions & 0 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"keywords": [],
"author": "Mate Academy",
"license": "GPL-3.0",
"dependencies": {},
"devDependencies": {
"@linthtml/linthtml": "^0.9.6",
"@mate-academy/backstop-config": "latest",
Expand All @@ -38,5 +37,8 @@
"javascript": false,
"bem": false
}
},
"dependencies": {
"header": "file:"
}
}
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://SenyaKir.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://SenyaKir.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)
96 changes: 95 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,106 @@
content="ie=edge"
/>
<title>Moyo header</title>

<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"
/>
<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<div class="header__logo">
<a href="#">
<img
src="images/logo.png"
alt="Logo"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alt attribute should be more descriptive. Instead of just "Logo," describe what the logo represents, for example, "Moyo company logo." This is important for accessibility and aligns with the best practices mentioned in the checklist.

/>
</a>
</div>

<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
<a
href="#"
class="nav__link is-active"
>
Apple
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
>
Samsung
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
>
Smartphones
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
data-qa="hover"
>
Laptops & Computers
</a>
</li>

<li class="nav__item">
<a
href="#"
class="nav__link"
>
Gadgets
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
>
Tablets
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
>
Photo
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
69 changes: 69 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,72 @@
:root {
--blue: #00acdc;
}

body {
margin: 0;
font-family: Roboto, sans-serif;
}

.header {
background: #fff;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 50px;
}

.header__logo {
width: 40px;
height: 40px;
}

.nav {
display: flex;
justify-content: flex-end;
}

.nav__list {
display: flex;
list-style: none;
margin: 0;
padding: 0;
}

.nav__item {
font-size: 12px;
text-transform: uppercase;
margin-left: 20px;
}

.nav__item:first-child {
margin-left: 0;
}

.nav__link {
text-decoration: none;
display: inline-flex;
align-items: center;
height: 60px;
color: #000;
}

.nav__link:hover {
color: var(--blue);
}

.is-active {
position: relative;
color: var(--blue);
}

.is-active::after {
content: '';
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 0;
height: 4px;
width: 38px;
border-radius: 8px;
background-color: var(--blue);
}
Loading