-
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
add task solution #5878
base: master
Are you sure you want to change the base?
add task solution #5878
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 |
---|---|---|
|
@@ -11,12 +11,111 @@ | |
content="ie=edge" | ||
/> | ||
<title>Moyo header</title> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.googleapis.com" | ||
/> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.gstatic.com" | ||
/> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Roboto:wght@500&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="./style.css" | ||
/> | ||
</head> | ||
<body> | ||
<h1>Moyo header</h1> | ||
<header class="header"> | ||
<a | ||
href="#" | ||
class="header_link" | ||
> | ||
<img | ||
src="images/logo.png" | ||
alt="logo Moyo" | ||
/> | ||
</a> | ||
|
||
<nav class="nav"> | ||
<ul class="nav_list"> | ||
<li class="nav_item"> | ||
<a | ||
class="nav_link is-active" | ||
href="#" | ||
> | ||
Apple | ||
</a> | ||
Comment on lines
+46
to
+51
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 |
||
</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
+43
to
+118
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 using semantic HTML5 elements like |
||
</header> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,67 @@ | ||
:root { | ||
--accent-color: #00acdc; | ||
} | ||
|
||
html { | ||
font-family: Roboto, sans-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. Ensure that the font 'Roboto' is properly loaded in your HTML file, as it is being used as the primary font-family here. |
||
} | ||
|
||
body { | ||
margin: 0; | ||
} | ||
|
||
.header { | ||
display: flex; | ||
justify-content: space-between; | ||
padding: 0 50px; | ||
margin: 0; | ||
align-items: center; | ||
} | ||
|
||
.header_link { | ||
width: 40px; | ||
height: 40px; | ||
} | ||
|
||
.nav_list { | ||
margin: 0; | ||
padding: 0; | ||
display: flex; | ||
list-style: none; | ||
} | ||
|
||
.nav_link { | ||
margin-right: 20px; | ||
position: relative; | ||
font-weight: 500; | ||
font-size: 12px; | ||
display: block; | ||
text-transform: uppercase; | ||
line-height: 60px; | ||
text-decoration: none; | ||
color: #000; | ||
} | ||
|
||
.nav_item:last-child .nav_link { | ||
margin-right: 0; | ||
} | ||
|
||
/* stylelint-disable-next-line no-descending-specificity */ | ||
.nav_link:hover { | ||
color: #00acdc; | ||
} | ||
Comment on lines
+50
to
+52
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 comment about disabling stylelint for no-descending-specificity suggests there might be a specificity issue. Consider reviewing your CSS selectors to ensure specificity is managed properly without needing to disable linting rules. |
||
|
||
.is-active { | ||
color: var(--accent-color); | ||
} | ||
|
||
.is-active::after { | ||
content: ''; | ||
display: block; | ||
position: absolute; | ||
bottom: 0; | ||
width: 100%; | ||
height: 4px; | ||
background-color: var(--accent-color); | ||
border-radius: 8px; | ||
} | ||
Comment on lines
+54
to
+67
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 |
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 adding
aria-label
to the anchor tag for better accessibility, especially if the link text is not descriptive enough for screen readers.