Skip to content
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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Develop #5361

Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ The page should match the design Pixel Perfect: all the sizes, colors and distan

❗️ Replace `<your_account>` with your Github username and copy the links to `Pull Request` description:

- [DEMO LINK](https://<your_account>.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://<your_account>.github.io/layout_moyo-header/report/html_report/)
- [DEMO LINK](https://artuom2283.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://artuom2283.github.io/layout_moyo-header/report/html_report/)

❗️ Copy this `Checklist` to the `Pull Request` description after links, and put `- [x]` before each point after you checked it.

Expand Down
63 changes: 62 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This div is redundant

Suggested change
<div class="nav-logo">

<a href="#homepage">
<img
src="images/logo.png"
alt="MOYO-logo"
/>
</a>
</div>
<nav class="nav">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
</div>
<nav class="nav">
</div>
<nav class="nav">

<div class="nav-links">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<div class="nav-links">

<ul class="nav-list">
<li class="nav-item is-active apple-active">

Choose a reason for hiding this comment

The 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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<li class="nav-item is-active apple-active">
<li class="nav-item">

<a
href="#apple"
class="is-active"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class="is-active"
class="nav__link is-active"

>
apple
</a>
</li>
<li class="nav-item is-active">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<li class="nav-item is-active">
<li class="nav-item">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is-active is class which should be used for Apple link.

Choose a reason for hiding this comment

The 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>
130 changes: 130 additions & 0 deletions src/style.css
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;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
margin: 10px 0;

height: 60px;
box-sizing: border-box;
}

.nav-logo a {
display: flex;
align-items: center;
}

img {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use class selector for image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

you yourself asked to remove class nav-logo

width: 40px;
height: 40px;
}

.nav {
display: flex;
align-items: center;
}

.nav-links {
display: flex;
justify-content: flex-end;
}

ul.nav-list {

Choose a reason for hiding this comment

The 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 {

Choose a reason for hiding this comment

The 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;
} */

Choose a reason for hiding this comment

The 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);
}
Loading