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

add header #5740

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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": "^1.9.12",
"@mate-academy/stylelint-config": "latest",
"backstopjs": "6.3.23",
"jest": "^29.7.0",
Expand Down
49 changes: 48 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,55 @@
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:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
rel="stylesheet"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a href="https://127.0.0.1:5500/src/index.html">

Choose a reason for hiding this comment

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

The href attribute in the anchor tag should point to the actual homepage URL rather than a local server URL like https://127.0.0.1:5500/src/index.html. Consider using a relative path or the correct URL for deployment.

<img
class="img"
src="images/logo.png"

Choose a reason for hiding this comment

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

Ensure the src attribute points to the correct path of the logo image. If images/logo.png is not the correct path, please update it accordingly.

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 to improve accessibility. Instead of just 'logo', consider something like 'Company Logo' or 'Moyo Logo'.

/>
</a>
<nav class="nav">
<ul>
<li>
<a
class="is-active"
href="#"
>
apple
</a>
</li>
<li><a href="#">samsung</a></li>
<li><a href="#">smartphones</a></li>
<li>
<a
data-qa="hover"
href="#"
>
laptops & computers
</a>
</li>
<li><a href="#">gadgets</a></li>
<li><a href="#">tables</a></li>
<li><a href="#">photo</a></li>
<li><a href="#">video</a></li>
</ul>
</nav>
</header>
</body>
</html>
62 changes: 62 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,65 @@
body {
margin: 0;
font-family: Roboto, sans-serif;
font-weight: 700;
font-style: normal;
}

.header {
display: flex;
width: 1200px;
background-color: #fff;
justify-content: space-between;

Choose a reason for hiding this comment

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

There is a missing closing bracket '}' for the '.header' class. Ensure that each CSS rule set is properly closed to avoid unexpected behavior.

.img {
display: block;
margin-left: 50px;
margin-top: 10px;
margin-bottom: 10px;
}
.nav {
margin-right: 50px;
display: flex;
align-items: center;
justify-content: center;
}
a {
text-decoration: none;
color: black;
}

ul {
display: flex;
font-size: 12px;
list-style: none;
text-transform: uppercase;
font-weight: bold;
}
li:not(:last-child) {
margin-right: 20px;
}
}

.blue {
color: #00acdc;

Choose a reason for hiding this comment

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

The color value #00acdc should be defined as a CSS variable as per the project requirements. Consider adding a variable like --blue-color: #00acdc; at the top of your CSS and using it here.

}

a:hover {
color: #00acdc;

Choose a reason for hiding this comment

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

The color value #00acdc should be replaced with the CSS variable for the blue color. Ensure consistency by using the variable throughout the CSS file.

}

.is-active {
color: #00acdc;

Choose a reason for hiding this comment

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

The color value #00acdc should be replaced with the CSS variable for the blue color. Ensure consistency by using the variable throughout the CSS file.

position: relative;
}

.is-active::after {
content: '';
position: absolute;
left: 0;
bottom: -22.5px;
width: 100%;
height: 4px;
border-radius: 8px;
background-color: #00ACDC;

Choose a reason for hiding this comment

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

The background-color value #00ACDC should be replaced with the CSS variable for the blue color. Ensure consistency by using the variable throughout the CSS file.

}
Loading