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 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
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
102 changes: 101 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,112 @@
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>
<header class="header">
<a
href="/"
class="header__link"
>
<img
src="./images/logo.png"
Larysa1387 marked this conversation as resolved.
Show resolved Hide resolved
alt="logo"
/>
</a>

<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
<a
href="#"
class="nav__link is-active"
>
Apple
</a>
</li>

<li class="nav__item">
<a
href="#"
class="nav__link"
>
Samsung
</a>
</li>

<li class="nav__item">
<a
href="#"
class="nav__link"
>
Smartphones
</a>
</li>

<li class="nav__item">
<a
href="#"
data-qa="hover"
class="nav__link"
>
Laptops & Computers
</a>
</li>

<li class="nav__item">
<a
href="#"
class="nav__link"
>
Gadgets
</a>
</li>

<li class="nav__item">
<a
href="#"
class="nav__link"
>
Tablets
</a>
</li>

<li class="nav__item">
<a
href="#"
class="nav__link"
>
Photo
</a>
</li>

<li class="nav__item">
<a
href="#"
class="nav__link"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
68 changes: 68 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,71 @@
html {
font-family: Roboto, sans-serif;
Larysa1387 marked this conversation as resolved.
Show resolved Hide resolved
}

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

body {
margin: 0;
}

.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 50px;
box-sizing: border-box;
}

.header__link {
width: 40px;
height: 40px;
}

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

.nav__item:not(:last-child) {
margin-right: 20px;
}

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

.nav__link:visited {
color: #000;
}

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

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

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