-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Task solved #5900
base: master
Are you sure you want to change the base?
Task solved #5900
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 |
---|---|---|
|
@@ -15,8 +15,101 @@ | |
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="index.html" | ||
class="logo__link" | ||
> | ||
<img | ||
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 image path 'images/logo.png' is correct and that the image exists in the specified location. This will prevent broken image links on the webpage. |
||
class="logo__img" | ||
src="images/logo.png" | ||
alt="Moyo logo" | ||
/> | ||
</a> | ||
<nav class="nav"> | ||
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 adding |
||
<ul class="nav__list"> | ||
<li class="nav__item"> | ||
<a | ||
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 'is-active' class is applied to the 'Apple' link. Ensure this class is dynamically managed if this is meant to indicate the current page, to avoid misleading users. |
||
class="nav__link is-active" | ||
href="#" | ||
> | ||
Apple | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
class="nav__link" | ||
href="#" | ||
> | ||
Samsung | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
class="nav__link" | ||
href="#" | ||
> | ||
Smartphones | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
class="nav__link" | ||
href="#" | ||
data-qa="hover" | ||
> | ||
Laptops & Computers | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
class="nav__link" | ||
href="#" | ||
> | ||
Gadgets | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
class="nav__link" | ||
href="#" | ||
> | ||
Tablets | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
class="nav__link" | ||
href="#" | ||
> | ||
Photo | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
class="nav__link" | ||
href="#" | ||
> | ||
Video | ||
</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
Comment on lines
+44
to
+112
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. Make sure that the logo is not part of the |
||
</header> | ||
Comment on lines
+33
to
+113
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 header stretches the full page width without using horizontal margins. This is a critical requirement according to the task description. |
||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,71 @@ | ||
body { | ||
--primary-link-color: #000; | ||
--highlight-link-color: #00acdc; | ||
|
||
margin: 0; | ||
} | ||
|
||
.header { | ||
width: 100%; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
|
||
.logo__link { | ||
margin-left: 50px; | ||
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 use of |
||
} | ||
|
||
.logo__img { | ||
display: block; | ||
width: 40px; | ||
height: 40px; | ||
} | ||
|
||
.nav { | ||
margin-right: 50px; | ||
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 use of |
||
} | ||
|
||
.nav__list { | ||
display: flex; | ||
align-items: center; | ||
padding: 0; | ||
margin: 0; | ||
list-style: none; | ||
} | ||
|
||
.nav__link { | ||
display: flex; | ||
align-items: center; | ||
position: relative; | ||
height: 60px; | ||
text-transform: uppercase; | ||
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. The font stack includes 'Roboto' and 'serif'. Ensure that 'Roboto' is correctly loaded in your HTML file, as it is a sans-serif font, and consider using a fallback sans-serif font instead of 'serif'. |
||
font-size: 12px; | ||
font-weight: 500; | ||
color: var(--primary-link-color); | ||
text-decoration: none; | ||
} | ||
|
||
.nav__item:not(:last-child) { | ||
margin-right: 20px; | ||
} | ||
|
||
.nav__link:hover { | ||
color: var(--highlight-link-color); | ||
} | ||
|
||
.is-active { | ||
color: var(--highlight-link-color); | ||
} | ||
|
||
.is-active::after { | ||
content: ''; | ||
position: absolute; | ||
bottom: 0; | ||
width: 100%; | ||
left: 0; | ||
height: 4px; | ||
border-radius: 8px; | ||
background-color: var(--highlight-link-color); | ||
} |
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.
Consider using a
<nav>
element instead of a<header>
for the navigation section to improve semantic structure. This change can enhance accessibility by clearly indicating the navigation role to assistive technologies.