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

Develop #5881

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Develop #5881

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
Binary file added src/fonts/Roboto-Medium.ttf
Binary file not shown.
50 changes: 49 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,54 @@
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="container">
<a
href="#"
Comment on lines +21 to +22

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 means it doesn't lead anywhere. Consider providing a meaningful URL or using javascript:void(0); if the link is not intended to navigate.

class="logo"
>
<img
src="./images/logo.png"
alt="logo"
/>
</a>
<nav>
<ul class="nav">
<li class="nav__item">
<a
class="is-active"
href="#"
Comment on lines +33 to +35

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 means they don't lead anywhere. Consider providing meaningful URLs for these links to improve navigation.

>
Apple
</a>
</li>
<li class="nav__item">
<a href="#">Samsung</a>
</li>
<li class="nav__item">
<a href="#">Smartphones</a>
</li>
<li class="nav__item">
<a
href="#"
data-qa="hover"
Comment on lines +47 to +49

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 is typically for testing purposes. Ensure this is intentional and necessary for your project.

>
Laptops & Computers
</a>
</li>
<li class="nav__item">
<a href="#">Gadgets</a>
</li>
<li class="nav__item">
<a href="#">Tablets</a>
</li>
<li class="nav__item">
<a href="#">Photo</a>
</li>
<li class="nav__item">
<a href="#">Video</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
73 changes: 73 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,76 @@
@font-face {
font-family: Roboto;
src: url(fonts/Roboto-Medium.ttf);

Choose a reason for hiding this comment

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

Ensure that the path to the font file is correct and that the font file is available in the specified location. Otherwise, the font may not load properly.

}

html {
--active-color: #00acdc;
}

body {
margin: 0;
font-family: Roboto, serif;

Choose a reason for hiding this comment

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

Consider providing a fallback font that is more similar to 'Roboto' than 'serif', such as 'Arial' or 'Helvetica', for better consistency across different browsers and systems.

box-sizing: border-box;
font-size: 12px;
}

ul {
margin: 0;
padding: 0;
list-style-type: none;
}

a {
text-decoration: none;
}

.container {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 50px;
max-height: 60px;
}

.logo {
display: flex;
}

.nav {
display: flex;
align-items: center;
}

.nav__item {
text-transform: uppercase;
position: relative;
margin-left: 20px;

a {
color: #000;
line-height: 60px;
height: 60px;
text-align: center;
display: flex;
}
.is-active {
color: var(--active-color);
}
a:hover {
color: var(--active-color);
}
}

.nav__item:first-child {
margin-left: 0;
}

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