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 #4697

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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://Teslaanazuma.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://Teslaanazuma.github.io/layout_moyo-header/report/html_report/)

Choose a reason for hiding this comment

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

Consider adding these links to the PR description


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

Expand Down
96 changes: 95 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,106 @@
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@400;500&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<div class="container">
<a
href="#"
class="logo"
>
<img
src="./images/logo.png"
alt="logo"
/>
</a>
<nav class="nav">
<ul class="nav__list">
<li class="nav__list-item">
<a
href="#"
class="link is-active"
>
Apple
</a>
</li>
<li class="nav__list-item">
<a
href="#"
class="link"
>
Samsung
</a>
</li>
<li class="nav__list-item">
<a
href="#"
class="link"
>
Smartphones
</a>
</li>

<li class="nav__list-item">
<a
href="#"
data-qa="hover"
class="link"
>
Laptops & Computers
</a>
</li>
<li class="nav__list-item">
<a
href="#"
class="link"
>
Gadgets
</a>
</li>
<li class="nav__list-item">
<a
href="#"
class="link"
>
Tablets
</a>
</li>
<li class="nav__list-item">
<a
href="#"
class="link"
>
Photo
</a>
</li>
<li class="nav__list-item">
<a
href="#"
class="link"
>
Video
</a>
</li>
</ul>
</nav>
</div>
</header>
</body>
</html>
69 changes: 69 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,72 @@
html {
font-family: Roboto, sans-serif;
font-weight: 400;
font-style: normal;

--active-color: #00acdc;
}

body {
margin: 0;
}

.container {
max-width: 1100px;
margin: 0 auto;
padding: 0 50px;
display: flex;
align-items: center;
justify-content: space-between;
}

.logo {
max-height: 40px;
}

.nav__list {
list-style-type: none;
display: flex;
margin: 0;
padding: 0;
text-align: center;
align-items: center;
}

.link {
color: #000;
display: block;
text-decoration: none;
font-size: 12px;
font-weight: 500;
text-transform: uppercase;
line-height: 60px;
height: 60px;
}

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

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

.is-active::after {
content: '';
display: block;
height: 4px;
min-width: 100%;
position: absolute;
bottom: 0;
border-radius: 8px;
background-color: var(--active-color);
}

.nav__list-item:not(.nav__list-item:first-child) {
margin-left: 10px;
}

.nav__list-item:not(.nav__list-item:last-child) {
margin-right: 10px;
}
Loading