-
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 #5859
base: master
Are you sure you want to change the base?
add task solution #5859
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,98 @@ | |
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=Roboto:wght@500&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="./style.css" | ||
/> | ||
</head> | ||
<body> | ||
<h1>Moyo header</h1> | ||
<body class="page"> | ||
<header class="header"> | ||
<a | ||
href="index.html" | ||
class="logo" | ||
> | ||
<img | ||
src="images/logo.png" | ||
alt="moyo" | ||
class="logo__img" | ||
/> | ||
</a> | ||
|
||
<nav class="nav"> | ||
<ul class="nav__list"> | ||
<li class="nav__item"> | ||
<a | ||
href="#" | ||
class="nav__link is-active" | ||
> | ||
Apple | ||
</a> | ||
|
||
<a | ||
href="#" | ||
class="nav__link" | ||
> | ||
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. Each navigation link should be wrapped in a |
||
<a | ||
href="#" | ||
class="nav__link" | ||
> | ||
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. Each navigation link should be wrapped in a |
||
<a | ||
href="#" | ||
class="nav__link" | ||
data-qa="hover" | ||
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 |
||
> | ||
Laptops & Computers | ||
</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. Each navigation link should be wrapped in a |
||
<a | ||
href="#" | ||
class="nav__link" | ||
> | ||
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. Each navigation link should be wrapped in a |
||
<a | ||
href="#" | ||
class="nav__link" | ||
> | ||
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. Each navigation link should be wrapped in a |
||
<a | ||
href="#" | ||
class="nav__link" | ||
> | ||
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. Each navigation link should be wrapped in a |
||
<a | ||
href="#" | ||
class="nav__link" | ||
> | ||
Video | ||
</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
</header> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,76 @@ | ||
body { | ||
html { | ||
font-family: Roboto, sans-serif; | ||
font-style: normal; | ||
line-height: normal; | ||
font-size: 12px; | ||
font-weight: 500; | ||
text-transform: uppercase; | ||
} | ||
Comment on lines
+2
to
+7
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. Applying |
||
|
||
:root { | ||
--main-color: black; | ||
--active-color: #00acdc; | ||
} | ||
|
||
.page { | ||
margin: 0; | ||
} | ||
|
||
.header { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 0 50px; | ||
} | ||
|
||
.logo__img { | ||
display: block; | ||
height: 40px; | ||
width: 40px; | ||
} | ||
|
||
.nav__list { | ||
list-style: none; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
.nav__item { | ||
display: flex; | ||
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 |
||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
.nav__link { | ||
display: block; | ||
height: 60px; | ||
line-height: 60px; | ||
padding: 0; | ||
text-decoration: none; | ||
color: var(--main-color); | ||
margin-right: 20px; | ||
} | ||
|
||
.nav__link:last-child { | ||
margin-right: 0; | ||
} | ||
|
||
.nav__link:hover { | ||
color: var(--active-color); | ||
} | ||
|
||
.is-active { | ||
color: var(--active-color); | ||
position: relative; | ||
} | ||
|
||
.is-active::after { | ||
content: ''; | ||
display: block; | ||
height: 4px; | ||
width: 100%; | ||
border-radius: 8px; | ||
background-color: var(--active-color); | ||
position: absolute; | ||
bottom: 0; | ||
} |
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.
Each navigation link should be wrapped in a
<li>
element to ensure semantic correctness and improve accessibility. Consider wrapping each<a>
tag within its own<li>
tag.