-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 #5380
base: master
Are you sure you want to change the base?
Develop #5380
Changes from all commits
8d4ae25
bc64578
8540202
27d9f01
dbeac27
d0c1010
a1c586f
3aecc1f
01ab920
5aa9a81
7a6b106
dce3f2d
be49922
19a4fe2
894ec3d
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,5 +1,8 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<html | ||
class="html" | ||
lang="en" | ||
> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta | ||
|
@@ -15,8 +18,97 @@ | |
rel="stylesheet" | ||
href="./style.css" | ||
/> | ||
<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,500&display=swap" | ||
rel="stylesheet" | ||
/> | ||
</head> | ||
<body> | ||
<h1>Moyo header</h1> | ||
<body class="body"> | ||
<header class="header"> | ||
<a href="#"> | ||
<img | ||
class="img" | ||
src="images/logo.png" | ||
alt="MOYO_main_logo" | ||
Comment on lines
+36
to
+40
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> | ||
<nav class="nav"> | ||
<ul class="nav__list"> | ||
<li class="nav__item"> | ||
<a | ||
class="nav__link is-active" | ||
href="#" | ||
> | ||
Comment on lines
+46
to
+49
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 |
||
Apple | ||
</a> | ||
</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" | ||
data-qa="hover" | ||
href="#" | ||
> | ||
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> | ||
</header> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,71 @@ | ||
body { | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
Comment on lines
+1
to
+4
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 { | ||
--header-link-color: #00acdc; | ||
} | ||
|
||
Comment on lines
+6
to
+8
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. It's not common practice to create a class named |
||
.body { | ||
margin: 0; | ||
} | ||
|
||
Comment on lines
+10
to
+12
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 |
||
.img { | ||
display: block; | ||
} | ||
|
||
Comment on lines
+14
to
+16
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 like |
||
.header { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 0 50px; | ||
font-family: Roboto, sans-serif; | ||
font-size: 12px; | ||
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-weight: 500; | ||
} | ||
|
||
.nav__list { | ||
display: flex; | ||
list-style: none; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
.nav__item { | ||
margin-right: 20px; | ||
} | ||
|
||
.nav__item:last-child { | ||
margin-right: 0; | ||
} | ||
|
||
.nav__link { | ||
display: flex; | ||
align-items: center; | ||
height: 60px; | ||
color: #000; | ||
text-decoration: none; | ||
text-transform: uppercase; | ||
} | ||
|
||
.nav__link:hover { | ||
color: var(--header-link-color); | ||
} | ||
|
||
.is-active { | ||
position: relative; | ||
color: var(--header-link-color); | ||
} | ||
|
||
.is-active::after { | ||
content: ''; | ||
position: absolute; | ||
width: 100%; | ||
height: 4px; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
border-radius: 8px; | ||
background: var(--header-link-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.
The
class
attribute on thehtml
tag is not necessary unless it's being used for a specific purpose in CSS or JavaScript. If it's not used, it's better to remove it to keep the markup clean.