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

add task solution #4902

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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://mhryvko.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://mhryvko.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
93 changes: 92 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,103 @@
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:wght@500&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="#"
class="logo-link"
>
<img
src="images/logo.png"
alt="logo"

Choose a reason for hiding this comment

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

For logos, use the format: "[Organization name] logo."

image

class="logo"
/>
</a>
<nav class="main-nav">
<ul class="nav-list">
<li>
<a
href="#"
class="nav-link is-active"
>
Apple
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
Samsung
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
Smartphones
</a>
</li>
<li data-qa="hover">
<a
href="#"
class="nav-link"
>
Laptops & Computers
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
Gadgets
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
Tablets
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
Photo
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
Binary file added src/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,75 @@
body {
margin: 0;
font-family: Roboto, sans-serif;
background-color: azure;
font-weight: 500;
font-style: normal;

Choose a reason for hiding this comment

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

This is the default value, you don't need to specify it.

Choose a reason for hiding this comment

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

Suggested change
font-style: normal;

height: 100%;
}

.header {
background-color: #fff;
display: flex;
align-items: center;
padding: 0 50px;
}

.logo {
width: 40px;
height: 40px;
margin: 10px 0;
display: block;
}

.main-nav {
margin-left: auto;
box-sizing: border-box;
}

.nav-list {
padding: 0;
margin: 0;
text-align: center;
box-sizing: border-box;
display: flex;
}

.nav-list li {

Choose a reason for hiding this comment

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

Don't use tag names for styling (except html and body) , better use classes.

image

display: inline-block;
font-size: 12px;
text-transform: uppercase;
box-sizing: border-box;
}

.nav-list li:not(:last-child) {
margin-right: 20px;
}

.nav-link {
position: relative;
text-decoration: none;
color: black;
height: 60px;
line-height: 60px;
display: block;
}

.nav-link.is-active {
color: #00acdc;
}

.nav-link:hover {
color: #00acdc;

Choose a reason for hiding this comment

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

For the same properties it is better to use variables.
Fix it in all code.

}

.nav-link.is-active::after {
content: ' ';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 4px;
color: #00acdc;
background-color: #00acdc;
border-radius: 8px;
}
Loading