-
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 #5824
base: master
Are you sure you want to change the base?
add task solution #5824
Changes from 1 commit
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,54 @@ | |
rel="stylesheet" | ||
href="./style.css" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" | ||
/> | ||
</head> | ||
<body> | ||
<h1>Moyo header</h1> | ||
<header class="header"> | ||
<a href="index.html"> | ||
<img | ||
src="images/logo.png" | ||
alt="Moyo-logo" | ||
class="logo" | ||
/> | ||
</a> | ||
|
||
<nav class="nav"> | ||
<ul class="nav-list"> | ||
<li class="nav-item"> | ||
<a class="is-active section">Apple</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 anchor tags for navigation items should have 'href' attributes to be functional links. Consider adding appropriate URLs or placeholders like '#'. |
||
</li> | ||
<li class="nav-item"> | ||
<a class="section">Samsung</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 anchor tags for navigation items should have 'href' attributes to be functional links. Consider adding appropriate URLs or placeholders like '#'. |
||
</li> | ||
<li class="nav-item"> | ||
<a class="section">Smartphones</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 anchor tags for navigation items should have 'href' attributes to be functional links. Consider adding appropriate URLs or placeholders like '#'. |
||
</li> | ||
<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 anchor tags for navigation items should have 'href' attributes to be functional links. Consider adding appropriate URLs or placeholders like '#'. |
||
class="section" | ||
data-qa="hover" | ||
> | ||
Laptops & Computers | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="section">Gadgets</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 anchor tags for navigation items should have 'href' attributes to be functional links. Consider adding appropriate URLs or placeholders like '#'. |
||
</li> | ||
<li class="nav-item"> | ||
<a class="section">Tablets</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 anchor tags for navigation items should have 'href' attributes to be functional links. Consider adding appropriate URLs or placeholders like '#'. |
||
</li> | ||
<li class="nav-item"> | ||
<a class="section">Photo</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 anchor tags for navigation items should have 'href' attributes to be functional links. Consider adding appropriate URLs or placeholders like '#'. |
||
</li> | ||
<li class="nav-item"> | ||
<a class="section">Video</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 anchor tags for navigation items should have 'href' attributes to be functional links. Consider adding appropriate URLs or placeholders like '#'. |
||
</li> | ||
</ul> | ||
</nav> | ||
</header> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,3 +1,70 @@ | ||||||||||||||||||||||||||||||||
html { | ||||||||||||||||||||||||||||||||
margin: 0; | ||||||||||||||||||||||||||||||||
padding: 0; | ||||||||||||||||||||||||||||||||
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. Redundant
Suggested change
|
||||||||||||||||||||||||||||||||
font-family: Roboto, Arial, sans-serif; | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
body { | ||||||||||||||||||||||||||||||||
margin: 0; | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
--active-color: #00acdc; | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
.header { | ||||||||||||||||||||||||||||||||
display: flex; | ||||||||||||||||||||||||||||||||
justify-content: space-between; | ||||||||||||||||||||||||||||||||
padding: 0 50px; | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
.logo { | ||||||||||||||||||||||||||||||||
margin: 10px 0; | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
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.
Suggested change
|
||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
.nav { | ||||||||||||||||||||||||||||||||
display: flex; | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
.nav-list { | ||||||||||||||||||||||||||||||||
margin: 0; | ||||||||||||||||||||||||||||||||
padding: 0; | ||||||||||||||||||||||||||||||||
list-style: none; | ||||||||||||||||||||||||||||||||
display: flex; | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
.nav-item { | ||||||||||||||||||||||||||||||||
margin-right: 20px; | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
.nav-item:last-child { | ||||||||||||||||||||||||||||||||
margin-right: 0; | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
.section { | ||||||||||||||||||||||||||||||||
display: flex; | ||||||||||||||||||||||||||||||||
align-items: center; | ||||||||||||||||||||||||||||||||
text-transform: uppercase; | ||||||||||||||||||||||||||||||||
text-decoration: none; | ||||||||||||||||||||||||||||||||
height: 60px; | ||||||||||||||||||||||||||||||||
font-size: 12px; | ||||||||||||||||||||||||||||||||
font-weight: 500; | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
.section:hover { | ||||||||||||||||||||||||||||||||
color: var(--active-color); | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
.is-active { | ||||||||||||||||||||||||||||||||
color: var(--active-color); | ||||||||||||||||||||||||||||||||
position: relative; | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
.is-active::after { | ||||||||||||||||||||||||||||||||
content: ''; | ||||||||||||||||||||||||||||||||
position: absolute; | ||||||||||||||||||||||||||||||||
right: 0; | ||||||||||||||||||||||||||||||||
left: 0; | ||||||||||||||||||||||||||||||||
bottom: 0; | ||||||||||||||||||||||||||||||||
height: 4px; | ||||||||||||||||||||||||||||||||
border-radius: 8px; | ||||||||||||||||||||||||||||||||
background-color: var(--active-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 making the 'alt' attribute for the logo image more descriptive, such as 'Moyo Company Logo', to improve accessibility.