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 #5730

Open
wants to merge 1 commit 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://thalie-git.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://thalie-git.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
93 changes: 92 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,99 @@
rel="stylesheet"
href="./style.css"
/>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"
rel="stylesheet"
/>
</head>

<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="#"
Comment on lines +26 to +27

Choose a reason for hiding this comment

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

The href attribute for the logo link is set to '#', which is a placeholder. Consider providing a valid URL or using JavaScript to handle the click event if it's meant to be interactive.

class="logo"
>
<img
src="./images/logo.png"
alt="logo Moyo"
/>
</a>
<nav class="nav">
<ul class="nav_list">
<li class="nav_item">
<a
href="#"

Choose a reason for hiding this comment

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

The href attribute for the navigation links is set to '#', which is a placeholder. Consider providing valid URLs for each link to improve navigation.

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"

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 here, which seems to be for testing purposes. Ensure that this attribute is necessary for your application or remove it if not needed.

>
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>
75 changes: 75 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,78 @@
:root {
font-family: Roboto, sans-serif;
font-size: 12px;
font-weight: 500;
margin: 0;

--active-link-color: #00acdc;
}

body {
margin: 0;
}

.header {
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
padding: 0 50px;
}

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

.nav_list {
margin: 0;
padding: 0;
height: 60px;
display: flex;
align-items: center;
}

.nav_item {
list-style: none;
line-height: 60px;
margin-right: 20px;
}

.nav_link {
color: #000;
font-size: 12px;
font-weight: 500;
text-transform: uppercase;
text-decoration: none;
display: flex;
}

a:hover {
color: var(--active-link-color);
text-decoration: none;
}

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

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

.nav_link .is-active {
color: var(--active-link-color);
}
Comment on lines +72 to +74

Choose a reason for hiding this comment

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

The selector .nav_link .is-active seems redundant because .is-active is already styled separately. Ensure that this selector is necessary or remove it to avoid conflicts.


.nav_item:last-child {
margin-right: 0;
}
Loading