-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
base: master
Are you sure you want to change the base?
Develop #5881
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,54 @@ | |
/> | ||
</head> | ||
<body> | ||
<h1>Moyo header</h1> | ||
<header class="container"> | ||
<a | ||
href="#" | ||
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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
> | ||
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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
> | ||
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> |
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); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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; | ||
} |
There was a problem hiding this comment.
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 usingjavascript:void(0);
if the link is not intended to navigate.