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

moyo-header #5871

Open
wants to merge 2 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
4 changes: 2 additions & 2 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 `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://AnoriFrell.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://AnoriFrell.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 Down
40 changes: 39 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,51 @@
http-equiv="X-UA-Compatible"
content="ie=edge"
/>
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
rel="preconnect"
href="https://fonts.gstatic.com"
/>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap"
rel="stylesheet"
/>
<title>Moyo header</title>
<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header
class="header"
id="top"
>
<a href="#top">
<img
src="/src/images/logo.png"
alt="logo"
class="logo"
/>
</a>
<nav class="nav">
<a class="nav__link is-active">Apple</a>
<a class="nav__link">Samsung</a>
<a class="nav__link">Smartphones</a>
<a
class="nav__link"
data-qa="hover"

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, such as identifying elements in automated tests. Ensure that this attribute is necessary for your project. If not, consider removing it to keep the HTML clean.

>
Laptops &amp; Computers
</a>
<a class="nav__link">Gadgets</a>
<a class="nav__link">Tablets</a>
<a class="nav__link">Photo</a>
<a class="nav__link">Video</a>
</nav>
</header>
</body>
</html>
56 changes: 56 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,59 @@
/* stylelint-disable custom-property-empty-line-before */
/* stylelint-disable comment-empty-line-before */
/* stylelint-disable font-family-name-quotes */
body {
margin: 0;
font-family: 'Roboto', serif;
--main-color: #00acdc;
}

.header {
display: flex;
position: relative;
justify-content: flex-end;
background-color: #fff;
}

.logo {
position: absolute;
left: 50px;
top: 10px;
}

.nav {
display: flex;
align-items: center;
margin-right: 50px;
line-height: 60px;
text-transform: uppercase;
font-size: 12px;

Choose a reason for hiding this comment

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

The font-size property in the .nav class is missing a unit. Consider adding a unit like px to ensure the style is applied correctly.

font-weight: 500;
}

.nav__link {
display: inline-block;
}

.nav__link:not(:first-child) {
margin-left: 20px;
}

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

Choose a reason for hiding this comment

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

The <nav> element should ideally use a list structure (<ul> and <li>) for better semantics and accessibility. Consider restructuring the navigation links within a list.


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

.is-active::after {
position: absolute;
content: '';
left: 0;
bottom: 0;
height: 4px;
border-radius: 8px;

Choose a reason for hiding this comment

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

The border-radius property in the .is-active::after selector is missing a unit. Consider adding a unit like px to ensure the style is applied correctly.

width: 100%;
background-color: var(--main-color);
}
Loading