-
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
Develop #5374
base: master
Are you sure you want to change the base?
Develop #5374
Changes from 2 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,103 @@ | |||||||||||
rel="stylesheet" | ||||||||||||
href="./style.css" | ||||||||||||
/> | ||||||||||||
<!-- <link rel="stylesheet" href="https://fonts.google.com/specimen/Roboto"> --> | ||||||||||||
<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" | ||||||||||||
/> | ||||||||||||
</head> | ||||||||||||
<body> | ||||||||||||
<h1>Moyo header</h1> | ||||||||||||
<header class="header"> | ||||||||||||
<a | ||||||||||||
href="index.html" | ||||||||||||
class="header__logo-link" | ||||||||||||
> | ||||||||||||
<img | ||||||||||||
src="./images/logo.png" | ||||||||||||
alt="Moyo logo" | ||||||||||||
class="header__logo-pic" | ||||||||||||
/> | ||||||||||||
</a> | ||||||||||||
|
||||||||||||
<nav class="header__nav"> | ||||||||||||
<ul class="header__list"> | ||||||||||||
<li class="header__item"> | ||||||||||||
<a | ||||||||||||
href="#!" | ||||||||||||
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 |
||||||||||||
class="header__link is-active" | ||||||||||||
> | ||||||||||||
Apple | ||||||||||||
</a> | ||||||||||||
</li> | ||||||||||||
<li class="header__item"> | ||||||||||||
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. Add the blank line between the links
Suggested change
|
||||||||||||
<a | ||||||||||||
href="#!" | ||||||||||||
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 |
||||||||||||
class="header__link" | ||||||||||||
> | ||||||||||||
Samsung | ||||||||||||
</a> | ||||||||||||
</li> | ||||||||||||
<li class="header__item"> | ||||||||||||
<a | ||||||||||||
href="#!" | ||||||||||||
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 |
||||||||||||
class="header__link" | ||||||||||||
> | ||||||||||||
Smartphones | ||||||||||||
</a> | ||||||||||||
</li> | ||||||||||||
<li class="header__item"> | ||||||||||||
<a | ||||||||||||
href="#!" | ||||||||||||
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 |
||||||||||||
class="header__link" | ||||||||||||
data-qa="hover" | ||||||||||||
> | ||||||||||||
Laptops & Computers | ||||||||||||
</a> | ||||||||||||
</li> | ||||||||||||
<li class="header__item"> | ||||||||||||
<a | ||||||||||||
href="#!" | ||||||||||||
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 |
||||||||||||
class="header__link" | ||||||||||||
> | ||||||||||||
Gadgets | ||||||||||||
</a> | ||||||||||||
</li> | ||||||||||||
<li class="header__item"> | ||||||||||||
<a | ||||||||||||
href="#!" | ||||||||||||
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 |
||||||||||||
class="header__link" | ||||||||||||
> | ||||||||||||
Tablets | ||||||||||||
</a> | ||||||||||||
</li> | ||||||||||||
<li class="header__item"> | ||||||||||||
<a | ||||||||||||
href="#!" | ||||||||||||
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 |
||||||||||||
class="header__link" | ||||||||||||
> | ||||||||||||
Photo | ||||||||||||
</a> | ||||||||||||
</li> | ||||||||||||
<li class="header__item"> | ||||||||||||
<a | ||||||||||||
href="#!" | ||||||||||||
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 |
||||||||||||
class="header__link" | ||||||||||||
> | ||||||||||||
Video | ||||||||||||
</a> | ||||||||||||
</li> | ||||||||||||
</ul> | ||||||||||||
</nav> | ||||||||||||
</header> | ||||||||||||
</body> | ||||||||||||
</html> |
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,3 +1,81 @@ | ||||||||||||||
body { | ||||||||||||||
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. The body hasn't a padding
Suggested change
|
||||||||||||||
} | ||||||||||||||
|
||||||||||||||
html { | ||||||||||||||
font-family: Roboto, Arial, 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 example, |
||||||||||||||
font-size: 12px; | ||||||||||||||
font-weight: 500; | ||||||||||||||
|
||||||||||||||
--active-color: #00acdc; | ||||||||||||||
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. Create a variable with |
||||||||||||||
} | ||||||||||||||
|
||||||||||||||
.header { | ||||||||||||||
display: flex; | ||||||||||||||
width: 100%; | ||||||||||||||
align-items: center; | ||||||||||||||
justify-content: space-between; | ||||||||||||||
} | ||||||||||||||
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
|
||||||||||||||
|
||||||||||||||
.header__nav { | ||||||||||||||
margin: 0 50px 0 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
|
||||||||||||||
|
||||||||||||||
.header__list { | ||||||||||||||
display: flex; | ||||||||||||||
margin: 0; | ||||||||||||||
padding: 0; | ||||||||||||||
list-style: none; | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
.header__link { | ||||||||||||||
display: flex; | ||||||||||||||
height: 60px; | ||||||||||||||
line-height: 60px; | ||||||||||||||
|
||||||||||||||
color: #000; | ||||||||||||||
text-decoration: none; | ||||||||||||||
text-transform: uppercase; | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
li { | ||||||||||||||
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. Avoid using tag names for styling (except |
||||||||||||||
|
||||||||||||||
li:last-child { | ||||||||||||||
margin-right: 0; | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
.is-active::after { | ||||||||||||||
position: absolute; | ||||||||||||||
bottom: 0; | ||||||||||||||
display: block; | ||||||||||||||
content: ''; | ||||||||||||||
height: 4px; | ||||||||||||||
width: 100%; | ||||||||||||||
background-color: var(--active-color); | ||||||||||||||
border-radius: 8px; | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
.header__logo-pic { | ||||||||||||||
display: block; | ||||||||||||||
width: 40px; | ||||||||||||||
height: 40px; | ||||||||||||||
margin: 10px 0 10px 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.
Suggested change
|
||||||||||||||
} | ||||||||||||||
|
||||||||||||||
a { | ||||||||||||||
text-decoration: none; | ||||||||||||||
padding: 0; | ||||||||||||||
margin: 0; | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
a: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. Use only class selector |
||||||||||||||
color: var(--active-color); | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
.is-active { | ||||||||||||||
color: var(--active-color); | ||||||||||||||
position: relative; | ||||||||||||||
} |
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.
The
href
attribute in thelink
tag for Google Fonts is too long. It should be split into multiple lines to adhere to the 80 character limit per line. You could place each font weight on a new line to improve readability.