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

Closed
wants to merge 4 commits into from
Closed
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://amir-al-mohamad.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://amir-al-mohamad.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
87 changes: 86 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,97 @@
content="ie=edge"
/>
<title>Moyo header</title>
<link
href="https://fonts.googleapis.com/css?family=Roboto:regular,500"
rel="stylesheet"
/>
amir-al-mohamad marked this conversation as resolved.
Show resolved Hide resolved
<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<div class="header__logo">
<a
amir-al-mohamad marked this conversation as resolved.
Show resolved Hide resolved
href="#"
class="header__img"
>
<img
src="./images/logo.png"
alt="Company Logo"
/>
amir-al-mohamad marked this conversation as resolved.
Show resolved Hide resolved
</a>
amir-al-mohamad marked this conversation as resolved.
Show resolved Hide resolved
</div>
<nav class="header__menu menu">
<ul class="menu__list">
<li class="menu__item">
<a
class="menu__link is-active"
href="#apple"
>
Apple
</a>
</li>
<li class="menu__item">
<a
class="menu__link"
href="#samsung"
>
Samsung
</a>
</li>
<li class="menu__item">
<a
class="menu__link"
href="#smartphones"
amir-al-mohamad marked this conversation as resolved.
Show resolved Hide resolved
>
Smartphones
</a>
</li>
<li class="menu__item">
<a
class="menu__link"
href="#laptops-computers"
data-qa="hover"
>
Laptops & Computers
</a>
</li>
<li class="menu__item">
<a
class="menu__link"
href="#gadgets"
>
Gadgets
</a>
</li>
<li class="menu__item">
<a
class="menu__link"
href="#tablets"
>
Tablets
</a>
</li>
<li class="menu__item">
<a
class="menu__link"
href="#photo"
>
Photo
</a>
</li>
<li class="menu__item">
<a
class="menu__link"
href="#video"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
79 changes: 79 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,82 @@
:root {
--font-family: 'Roboto', Arial, sans-serif;
amir-al-mohamad marked this conversation as resolved.
Show resolved Hide resolved
}

body {
font-family: var(--font-family);
font-weight: 500;
font-size: 12px;
color: #000;
margin: 0;

--header-height: 60px;
--blue-color: #00acdc;
}

.header {
padding: 0 50px;
display: flex;
justify-content: space-between;
align-items: center;
}
amir-al-mohamad marked this conversation as resolved.
Show resolved Hide resolved

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

.header__img {
height: 100%;
width: 100%;
display: inline-block;
}

.menu {
align-items: center;
display: flex;
}

.menu__list {
padding: 0;
margin: 0;
display: flex;
}

.menu__link {
text-decoration: none;
text-transform: uppercase;
white-space: nowrap;
text-align: center;
display: block;
color: inherit;
line-height: var(--header-height);
}

.menu__link.is-active,
.menu__link:hover {
color: var(--blue-color);
}

.menu__link.is-active {
position: relative;
}

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

.menu__item {
margin-right: 20px;
list-style: none;
}

.menu__item:last-child {
margin-right: 0;
}
Loading