Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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://xundseth.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://xundseth.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)
102 changes: 96 additions & 6 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,109 @@
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
content="width=device-width, initial-scale=1.0"
/>
<meta
http-equiv="X-UA-Compatible"
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"
Comment on lines +19 to +21
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This violates checklist item: "Lines of code have 80 chars max". The Google Fonts block is too long on the single attribute line. Also follow the checklist guidance: "If the HTML element has long attribute values or number of attributes is more than 2 - start each one, including the first, on the new line with 2-space indentation related to tag. Tag’s closing bracket should be on the same level as opening one." Wrap/split the long tag (or its attributes) so no physical line exceeds 80 characters (for example put each attribute on its own indented line and ensure the long URL line stays under 80 chars).

/>
<title>Moyo header</title>
<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="#"
class="logo"
>
<img
src="images/logo.png"
alt="Moyo logo"
class="logo__image"
/>
</a>

<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 &amp; 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>
63 changes: 63 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,66 @@
:root {
--main-blue: #00acdc;
}

body {
margin: 0;
font-family: Roboto, sans-serif;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The PR description must include your demo/test links and the copied Checklist block. Please add and complete these exactly as required. Quoting the checklist items that are not satisfied in the PR description:

  • "Replace <your_account> with your GitHub username in the links."
  • "Copy the DEMO LINK (https://<your_account>.github.io/layout_moyo-header/) to the Pull Request description (with <your_account> replaced)."
  • "Copy the TEST REPORT LINK (https://<your_account>.github.io/layout_moyo-header/report/html_report/) to the Pull Request description (with <your_account> replaced)."
  • "Copy the provided Checklist block to the Pull Request description after the links."
  • "Put - [x] before each checklist point after you checked it."

Action: update your Pull Request description — include the DEMO and TEST REPORT links with your GitHub username in place of <your_account>, then paste the full Checklist block from the task and mark each completed item with - [x].

font-size: 14px;
}

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

.logo {
display: flex;
margin-right: 30px;
}

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

.nav__item:not(:last-child) {
margin-right: 20px;
}

.nav__link {
color: #000;
text-transform: uppercase;
text-decoration: none;
font-weight: 500;
height: 60px;
display: flex;
align-items: center;
position: relative;
transition: color 0.3s;
font-size: 12px;
line-height: 14px;
}
Comment thread
xundseth marked this conversation as resolved.

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

.nav__link.is-active {
color: var(--main-blue);
}

.nav__link.is-active::after {
content: '';
position: absolute;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 4px;
background-color: var(--main-blue);
border-radius: 8px;
}
Loading