-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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 solution #5381
base: master
Are you sure you want to change the base?
task solution #5381
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 |
---|---|---|
@@ -1,14 +1,22 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<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: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" | ||
/> | ||
<meta charset="UTF-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" | ||
/> | ||
<meta | ||
http-equiv="X-UA-Compatible" | ||
content="ie=edge" | ||
content="width=device-width, initial-scale=1.0" | ||
/> | ||
<title>Moyo header</title> | ||
<link | ||
|
@@ -17,6 +25,86 @@ | |
/> | ||
</head> | ||
<body> | ||
<h1>Moyo header</h1> | ||
<header class="header"> | ||
<a | ||
href="/" | ||
class="logo-link" | ||
> | ||
<img | ||
src="images/logo.png" | ||
alt="MOYO Logo" | ||
class="logo" | ||
/> | ||
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 |
||
</a> | ||
<nav class="nav"> | ||
<ul class="nav__list"> | ||
<li class="nav__item"> | ||
<a | ||
href="#" | ||
class="nav__link is-active" | ||
> | ||
Apple | ||
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. Avoid using spaces in the |
||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="#" | ||
class="nav__link" | ||
> | ||
Samsung | ||
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 |
||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="#" | ||
class="nav__link" | ||
> | ||
Smartphones | ||
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. Similar to the previous comments, ensure the |
||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<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. Don't use spaces in |
||
> | ||
Laptops & Computers | ||
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 |
||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="#" | ||
class="nav__link" | ||
> | ||
Gadgets | ||
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 |
||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="#" | ||
class="nav__link" | ||
> | ||
Tablets | ||
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 the |
||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="#" | ||
class="nav__link" | ||
> | ||
Photo | ||
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 |
||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="#" | ||
class="nav__link" | ||
> | ||
Video | ||
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 |
||
</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
</header> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,72 @@ | ||
body { | ||
:root { | ||
--main-color: #00acdc; | ||
} | ||
|
||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
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. Don't use |
||
|
||
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. Remember to use fallback fonts - alternative font-family in case the main one doesn't work. For instance, you could specify a generic font family like 'sans-serif' as a fallback. |
||
|
||
.logo { | ||
display: block; | ||
width: 40px; | ||
height: 40px; | ||
} | ||
|
||
.nav__item { | ||
margin-right: 20px; | ||
} | ||
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. Be consistent with your vertical margins. It's recommended to add only top or only bottom margin, but not both, to prevent issues with margin collapse. In this case, consider using only |
||
|
||
.nav__item:last-child { | ||
margin-right: 0; | ||
} | ||
|
||
Comment on lines
+38
to
+44
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. Be consistent with your vertical margins. You're adding right margin to |
||
.header { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
padding: 0 50px; | ||
} | ||
|
||
.nav__list { | ||
list-style: none; | ||
display: flex; | ||
} | ||
|
||
.nav__link { | ||
height: 60px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
font-weight: 500; | ||
font-size: 12px; | ||
text-transform: uppercase; | ||
color: #000; | ||
text-decoration: none; | ||
} | ||
|
||
.nav__link:hover { | ||
color: var(--main-color); | ||
} | ||
|
||
.is-active { | ||
color: var(--main-color); | ||
position: relative; | ||
} | ||
|
||
.is-active::after { | ||
display: block; | ||
position: absolute; | ||
content: ''; | ||
bottom: 0; | ||
height: 4px; | ||
width: 100%; | ||
border-radius: 8px; | ||
background-color: var(--main-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.
There should be an empty line between multiline sibling blocks of HTML. Please add an empty line after the closing
</a>
tag and before the<nav>
tag to improve readability.