-
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
Develop #5361
base: master
Are you sure you want to change the base?
Develop #5361
Changes from 4 commits
cc960ec
d9149a3
36d3f03
f6a5963
8efa107
3071fea
da9ecb3
6240ce3
b1b83a5
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,73 @@ | |||||||||||
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: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" | ||||||||||||
/> | ||||||||||||
<link | ||||||||||||
rel="stylesheet" | ||||||||||||
href="./style.css" | ||||||||||||
/> | ||||||||||||
</head> | ||||||||||||
<body> | ||||||||||||
<h1>Moyo header</h1> | ||||||||||||
<header class="header"> | ||||||||||||
<div class="nav-logo"> | ||||||||||||
<a href="#homepage"> | ||||||||||||
<img | ||||||||||||
src="images/logo.png" | ||||||||||||
alt="MOYO-logo" | ||||||||||||
/> | ||||||||||||
</a> | ||||||||||||
</div> | ||||||||||||
<nav class="nav"> | ||||||||||||
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
|
||||||||||||
<div class="nav-links"> | ||||||||||||
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
|
||||||||||||
<ul class="nav-list"> | ||||||||||||
<li class="nav-item is-active apple-active"> | ||||||||||||
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. Remove unnecessary spaces between sibling elements. There should be an empty line between multiline sibling elements, but not spaces. 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 | ||||||||||||
href="#apple" | ||||||||||||
class="is-active" | ||||||||||||
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
|
||||||||||||
> | ||||||||||||
apple | ||||||||||||
</a> | ||||||||||||
</li> | ||||||||||||
<li class="nav-item is-active"> | ||||||||||||
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
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. is-active is class which should be used for Apple link. 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 same for other elements. |
||||||||||||
<a href="#samsung">samsung</a> | ||||||||||||
</li> | ||||||||||||
<li class="nav-item is-active"> | ||||||||||||
<a href="#smartphones">smartphones</a> | ||||||||||||
</li> | ||||||||||||
<li class="nav-item is-active"> | ||||||||||||
<a | ||||||||||||
href="#laptops & computers" | ||||||||||||
data-qa="hover" | ||||||||||||
> | ||||||||||||
laptops & computers | ||||||||||||
</a> | ||||||||||||
</li> | ||||||||||||
<li class="nav-item is-active"> | ||||||||||||
<a href="#gadgets">gadgets</a> | ||||||||||||
</li> | ||||||||||||
<li class="nav-item is-active"> | ||||||||||||
<a href="#tablets">tablets</a> | ||||||||||||
</li> | ||||||||||||
<li class="nav-item is-active"> | ||||||||||||
<a href="#photo">photo</a> | ||||||||||||
</li> | ||||||||||||
<li class="nav-item is-active"> | ||||||||||||
<a href="#video">video</a> | ||||||||||||
</li> | ||||||||||||
</ul> | ||||||||||||
</div> | ||||||||||||
</nav> | ||||||||||||
</header> | ||||||||||||
</body> | ||||||||||||
</html> |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -1,3 +1,133 @@ | ||||
:root { | ||||
--link-color: #00acdc; | ||||
} | ||||
|
||||
html { | ||||
font-family: Roboto, Arial, sans-serif; | ||||
font-size: 12px; | ||||
font-weight: 500; | ||||
} | ||||
|
||||
body { | ||||
margin: 0; | ||||
} | ||||
|
||||
.header { | ||||
width: 100%; | ||||
display: flex; | ||||
align-items: center; | ||||
justify-content: space-between; | ||||
padding: 0 50px; | ||||
margin: 10px 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
|
||||
height: 60px; | ||||
box-sizing: border-box; | ||||
} | ||||
|
||||
.nav-logo a { | ||||
display: flex; | ||||
align-items: center; | ||||
} | ||||
|
||||
img { | ||||
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 class selector for image 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. |
||||
width: 40px; | ||||
height: 40px; | ||||
} | ||||
|
||||
.nav { | ||||
display: flex; | ||||
align-items: center; | ||||
} | ||||
|
||||
.nav-links { | ||||
display: flex; | ||||
justify-content: flex-end; | ||||
} | ||||
|
||||
ul.nav-list { | ||||
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. remove tags from selectors |
||||
list-style: none; | ||||
padding: 0; | ||||
margin: 0; | ||||
line-height: 60px; | ||||
} | ||||
|
||||
li { | ||||
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 |
||||
display: inline-block; | ||||
margin-left: 17px; | ||||
text-align: center; | ||||
height: 60px; | ||||
line-height: 60px; | ||||
} | ||||
|
||||
li:first-child { | ||||
margin-left: 0; | ||||
} | ||||
|
||||
.nav a { | ||||
text-transform: uppercase; | ||||
text-decoration: none; | ||||
cursor: pointer; | ||||
display: flex; | ||||
color: black; | ||||
} | ||||
|
||||
a[data-qa='hover']:hover { | ||||
color: var(--link-color); | ||||
} | ||||
|
||||
a.is-active { | ||||
color: var(--link-color); | ||||
} | ||||
|
||||
a.is-active::after { | ||||
content: ''; | ||||
position: absolute; | ||||
left: 0; | ||||
bottom: 0; | ||||
width: 100%; | ||||
height: 4px; | ||||
background-color: var(--link-color); | ||||
border-radius: 2px; | ||||
transform: scaleX(1); | ||||
transition: transform 0.15s ease-in-out; | ||||
} | ||||
|
||||
a.is-active:hover::after { | ||||
transform: scaleX(1); | ||||
} | ||||
|
||||
li.is-active { | ||||
position: relative; | ||||
} | ||||
|
||||
li.is-active:link { | ||||
color: black; | ||||
} | ||||
|
||||
li.is-active:visited { | ||||
color: grey; | ||||
} | ||||
|
||||
li.is-active:hover { | ||||
text-decoration-color: var(--link-color); | ||||
} | ||||
|
||||
/* li.is-active::after { | ||||
content: ''; | ||||
position: absolute; | ||||
left: 0; | ||||
bottom: 0; | ||||
width: 100%; | ||||
height: 4px; | ||||
background-color: var(--link-color); | ||||
border-radius: 2px; | ||||
transform: scaleX(0); | ||||
transition: transform 0.15s ease-in-out; | ||||
} */ | ||||
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. Remove commented code |
||||
|
||||
li.is-active:hover::after { | ||||
transform: scaleX(1); | ||||
} | ||||
|
||||
li.nav-item.is-active.apple-active a { | ||||
color: var(--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.
This div is redundant