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

Open
wants to merge 3 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
5 changes: 3 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Moyo header

Create HTML page with the header using `flexbox` based on the [Figma Mockup](https://www.figma.com/file/1sog2rmfyCjnVxkeZ3ptnc/MOYO-%2F-Header?node-id=0%3A1&mode=dev).

The page should match the design Pixel Perfect: all the sizes, colors and distanced MUST be the same as on the design.
Expand Down Expand Up @@ -27,8 +28,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://Larysa1387.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://Larysa1387.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
95 changes: 94 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,105 @@
content="ie=edge"
/>
<title>Moyo header</title>
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossorigin=" "
/>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<!-- <h1>Moyo header</h1> -->
Larysa1387 marked this conversation as resolved.
Show resolved Hide resolved
<header class="header">
<a
href="/"
class="logo"
Larysa1387 marked this conversation as resolved.
Show resolved Hide resolved
>
<img
src="./images/logo.png"
Larysa1387 marked this conversation as resolved.
Show resolved Hide resolved
alt="logo"
/>
</a>
<nav class="nav">
Larysa1387 marked this conversation as resolved.
Show resolved Hide resolved
<ul class="nav-list">
<li>
<a
href="#"
class="nav-link is-active"
Larysa1387 marked this conversation as resolved.
Show resolved Hide resolved
>
Apple
</a>
</li>
<li>
Larysa1387 marked this conversation as resolved.
Show resolved Hide resolved
<a
href="#"
class="nav-link"
>
Samsung
</a>
</li>
<li>
<a
href="#"
class="nav-link"
>
Smartphones
</a>
</li>
<li>
<a
href="#"
data-qa="hover"
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>
74 changes: 74 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,77 @@
body {
margin: 0;
font-family: Roboto, sans-serif;
Larysa1387 marked this conversation as resolved.
Show resolved Hide resolved
background-color: beige;
Larysa1387 marked this conversation as resolved.
Show resolved Hide resolved

--is-active: #00acdc;
Larysa1387 marked this conversation as resolved.
Show resolved Hide resolved
}

.header {
display: flex;
justify-content: space-between;
align-items: center;
background-color: #fff;
Larysa1387 marked this conversation as resolved.
Show resolved Hide resolved
Larysa1387 marked this conversation as resolved.
Show resolved Hide resolved
}

.logo {
margin: 10px 0 10px 50px;
Larysa1387 marked this conversation as resolved.
Show resolved Hide resolved
width: 40px;
height: 40px;
}

.nav {
margin-right: 50px;
}
Larysa1387 marked this conversation as resolved.
Show resolved Hide resolved

.nav-list {
display: flex;
list-style: none;
padding: 0;
margin-bottom: 0;
margin-top: 0;
}

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

a {
text-decoration: none;
}

a:link {
Larysa1387 marked this conversation as resolved.
Show resolved Hide resolved
font-weight: 500;
text-transform: uppercase;
color: #000;
font-size: 12px;
}

a:visited {
color: #000;
}

a:hover {
color: var(--is-active);
}

.nav-link {
position: relative;
display: inline-block;
height: 60px;
line-height: 60px;
}

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

.nav-link.is-active::after {
Larysa1387 marked this conversation as resolved.
Show resolved Hide resolved
position: absolute;
bottom: 0;
content: '';
display: block;
height: 4px;
width: 100%;
border-radius: 8px;
background-color: var(--is-active);
}
Loading