-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Moyo header #5369
Moyo header #5369
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<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" | ||
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" | ||
|
@@ -15,8 +15,108 @@ | |
rel="stylesheet" | ||
href="./style.css" | ||
/> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.googleapis.com" | ||
> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.gstatic.com" | ||
crossorigin | ||
> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" | ||
rel="stylesheet" | ||
> | ||
<title>Moyo header</title> | ||
</head> | ||
<body> | ||
<h1>Moyo header</h1> | ||
<header class="header"> | ||
<a | ||
href="#header" | ||
class="logo" | ||
> | ||
<img | ||
src="images/logo.png" | ||
alt="Moyo-Logo" | ||
/> | ||
Comment on lines
+35
to
+42
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 |
||
</a> | ||
<nav class="nav"> | ||
<ul class="nav__list"> | ||
<li class="nav__item"> | ||
<a | ||
class="nav__link is-active" | ||
href="#header" | ||
> | ||
Comment on lines
+47
to
+50
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 |
||
Apple | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<a | ||
class="nav__link is-active" | ||
href="#header" | ||
> | ||
Samsung | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<a | ||
class="nav__link is-active" | ||
href="#header" | ||
> | ||
Smartphones | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<a | ||
class="nav__link is-active" | ||
href="#header" | ||
data-qa="hover" | ||
> | ||
Laptops & Computers | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<a | ||
class="nav__link is-active" | ||
href="#header" | ||
> | ||
Gadgets | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<a | ||
class="nav__link is-active" | ||
href="#header" | ||
> | ||
Tablets | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<a | ||
class="nav__link is-active" | ||
href="#header" | ||
> | ||
Photo | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<a | ||
class="nav__link is-active" | ||
href="#header" | ||
> | ||
Video | ||
</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
Comment on lines
+43
to
+119
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 empty lines between multiline sibling blocks of HTML to add some 'air' and simplify reading. For example, there should be an empty line before and after each |
||
</header> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,84 @@ | ||
body { | ||
body{ | ||
padding: 0; | ||
margin: 0; | ||
padding-bottom: 2000px; | ||
} | ||
|
||
|
||
:root{ | ||
--header-height: 60px; | ||
} | ||
|
||
.roboto-medium { | ||
font-family: "Roboto", sans-serif; | ||
font-weight: 500; | ||
font-style: normal; | ||
} | ||
|
||
.header { | ||
display: flex; | ||
margin: 0 50px; | ||
justify-content: space-between; | ||
|
||
} | ||
|
||
.logo { | ||
height: 40px; | ||
width: 40px; | ||
object-fit: contain; | ||
padding: 10px 0; | ||
} | ||
|
||
.nav { | ||
text-transform: uppercase; | ||
} | ||
|
||
.nav__list { | ||
display: flex; | ||
margin: 0; | ||
padding: 0; | ||
list-style: none; | ||
} | ||
|
||
.nav__item{ | ||
transition: all ease-in-out 0.15s; | ||
} | ||
|
||
.nav__item:not(:first-child){ | ||
margin-left: 20px; | ||
} | ||
|
||
.nav__link{ | ||
font-weight: 500; | ||
font-size: 12px; | ||
height: var(--header-height); | ||
line-height: var(--header-height); | ||
font-family: Roboto, sans-serif; | ||
text-decoration: none; | ||
display: inline-block; | ||
color: inherit; | ||
} | ||
|
||
.nav__item:hover { | ||
color: #00ACDC; | ||
} | ||
|
||
.is-active{ | ||
position: relative; | ||
} | ||
|
||
.is-active::after{ | ||
content: ''; | ||
position: absolute; | ||
border: 4px solid #00ACDC; | ||
border-radius: 8px; | ||
width: calc(100% - 5px); | ||
bottom: 0; | ||
left: 0; | ||
opacity: 0; | ||
} | ||
|
||
.is-active:hover::after { | ||
bottom: 0; | ||
opacity: 1; | ||
} |
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 are two
title
tags within thehead
section. Remove the duplicatetitle
tag to comply with proper HTML structure.