Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #6109

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Dev #6109

Show file tree
Hide file tree
Changes from 8 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": "^1.9.12",
"@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://drdakka.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://drdakka.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)
Binary file added src/images/moyo_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
93 changes: 93 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,105 @@
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>
<header class="header">
<a
class="logo"
href="index.html"
Comment on lines +38 to +40

Choose a reason for hiding this comment

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

Consider adding aria-label or title attribute to the logo link for better accessibility, as it currently only contains an image.

>
<img
src="/src/images/logo.png"
alt="logo"
/>
</a>
<nav class="nav">
<ul class="nav__list">
<li>
<a
class="nav__link is-active"
href="#"
Comment on lines +50 to +52

Choose a reason for hiding this comment

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

The link's href attribute is set to #, which is generally used as a placeholder. Ensure that this is intentional and consider providing a valid URL or using JavaScript to handle the click event if needed.

>
apple
</a>
</li>
<li>
<a
class="nav__link returned"
href="#"

Choose a reason for hiding this comment

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

Similar to the previous comment, ensure that the href attribute set to # is intentional. Consider providing a valid URL or handling the click event with JavaScript.

>
samsung
</a>
</li>
<li>
<a
class="nav__link returned"
href="#"

Choose a reason for hiding this comment

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

Ensure that the href attribute set to # is intentional. Consider providing a valid URL or handling the click event with JavaScript.

>
smartphones
</a>
</li>
<li>
<a
class="nav__link returned"
data-qa="hover"
href="#"

Choose a reason for hiding this comment

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

The data-qa attribute is used for testing purposes. Ensure that it is necessary and does not interfere with production code.

>
laptops & computers
</a>
</li>
<li>
<a
class="nav__link returned"
href="#"

Choose a reason for hiding this comment

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

Ensure that the href attribute set to # is intentional. Consider providing a valid URL or handling the click event with JavaScript.

>
gadgets
</a>
</li>
<li>
<a
class="nav__link returned"
href="#"

Choose a reason for hiding this comment

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

Ensure that the href attribute set to # is intentional. Consider providing a valid URL or handling the click event with JavaScript.

>
tablets
</a>
</li>
<li>
<a
class="nav__link returned"
href="#"

Choose a reason for hiding this comment

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

Ensure that the href attribute set to # is intentional. Consider providing a valid URL or handling the click event with JavaScript.

>
photo
</a>
</li>
<li>
<a
class="nav__link returned"
href="#"
Comment on lines +107 to +109

Choose a reason for hiding this comment

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

Ensure that the href attribute set to # is intentional. Consider providing a valid URL or handling the click event with JavaScript.

>
video
</a>
</li>
</ul>
</nav>
</header>
<h1>Moyo header</h1>
</body>
</html>
79 changes: 78 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,80 @@
body {
* {
margin: 0;
padding: 0;
}

html {
font-family: Roboto, serif;

Choose a reason for hiding this comment

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

The task requires using only the Roboto font with specific settings. The inclusion of serif as a fallback does not meet the task requirements. Please adjust this to use only the Roboto font.

font-optical-sizing: auto;
font-weight: 500;
font-style: normal;
font-variation-settings: 'wdth' 100;

--blue: #00acdc;
}

.header {
display: flex;
box-sizing: border-box;
flex-direction: row;
justify-content: flex-end;
width: 100%;
min-width: 1024px;

Choose a reason for hiding this comment

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

The use of min-width: 1024px; on the .header class might cause layout issues on smaller screens. Consider using media queries to ensure responsiveness across different devices.

align-items: center;
background-color: #fff;
padding-right: 50px;
}

h1 {
margin: 30px;
}

.logo {
display: inline-block;
position: absolute;
width: 40px;
height: 40px;
left: 50px;

Choose a reason for hiding this comment

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

The .logo class uses position: absolute;, which might lead to overlapping issues with other elements. Ensure that this positioning is necessary and does not affect the layout negatively.

}

.nav__list {
display: flex;
flex-direction: row;
list-style-type: none;
align-content: flex-end;

Choose a reason for hiding this comment

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

The align-content: flex-end; property on .nav__list has no effect because the flex container is set to flex-direction: row;. Consider removing it or adjusting the flex properties if needed.

}

.nav__link {
height: 60px;
line-height: 60px;
text-transform: uppercase;
display: inline-block;
text-decoration: none;
font-size: 12px;
color: #000;
}

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

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

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

.returned {
margin-left: 20px;
}