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 6 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
97 changes: 96 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,107 @@
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">
<a href="#homepage">
<img
src="images/logo.png"
alt="MOYO-logo"
/>
</a>
<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
</a>
<nav class="nav">
</a>
<nav class="nav">

<ul class="nav-list">
<li class="nav-item">
<a
class="nav__link is-active"
href="#apple"
>
apple
</a>
</li>

<li class="nav-item">
<a
class="nav__link"
href="#samsung"
>
samsung
</a>
</li>

<li class="nav-item">
<a
class="nav__link"
href="#smartphones"
>
smartphones
</a>
</li>

<li class="nav-item">
<a
class="nav__link"
href="#laptops & computers"
data-qa="hover"
>
laptops & computers
</a>
</li>

<li class="nav-item">
<a
class="nav__link"
href="#gadgets"
>
gadgets
</a>
</li>

<li class="nav-item">
<a
class="nav__link"
href="#tablets"
>
tablets
</a>
</li>

<li class="nav-item">
<a
class="nav__link"
href="#photo"
>
photo
</a>
</li>

<li class="nav-item">
<a
class="nav__link"
href="#video"
>
video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
117 changes: 117 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,120 @@
: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;
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;
}

.nav-list {
list-style: none;
padding: 0;
margin: 0;
line-height: 60px;
}

.nav-item {
display: inline-block;
margin-left: 17px;
text-align: center;
height: 60px;
line-height: 60px;
}

.nav-item:first-child {
margin-left: 0;
}

.nav .nav__link {

Choose a reason for hiding this comment

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

Suggested change
.nav .nav__link {
.nav__link {

text-transform: uppercase;
text-decoration: none;
cursor: pointer;
display: flex;
color: black;
}

.nav__link:hover {
color: var(--link-color) !important;

Choose a reason for hiding this comment

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

Don't use important

Suggested change
color: var(--link-color) !important;
color: var(--link-color);

}

.nav-item:nth-of-type(1) .nav__link {
color: var(--link-color) !important;
}

Choose a reason for hiding this comment

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

Suggested change
.nav-item:nth-of-type(1) .nav__link {
color: var(--link-color) !important;
}
.nav__link {
color: var(--link-color);
}


.nav__link[data-qa='hover']:hover {

Choose a reason for hiding this comment

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

Suggested change
.nav__link[data-qa='hover']:hover {
.nav__link:hover {

color: var(--link-color);
}

.is-active {
color: var(--link-color);
position: relative;
}

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

Choose a reason for hiding this comment

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

Redundant

Suggested change
transform: scaleX(1);
transition: transform 0.15s ease-in-out;

}

.is-active:hover::after {
transform: scaleX(1);
}

.is-active:link {
color: black;
}

.is-active:visited {
color: grey;
}

.is-active:hover {
text-decoration-color: var(--link-color);
}

.nav-item.is-active.apple-active .nav__link {
color: var(--link-color);
}

Choose a reason for hiding this comment

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

Redundant

Suggested change
.is-active:hover::after {
transform: scaleX(1);
}
.is-active:link {
color: black;
}
.is-active:visited {
color: grey;
}
.is-active:hover {
text-decoration-color: var(--link-color);
}
.nav-item.is-active.apple-active .nav__link {
color: var(--link-color);
}

Loading