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

task solution #5343

Closed
wants to merge 1 commit 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://kitaru64.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://kitaru64.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
82 changes: 81 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,86 @@
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="#"
class="logo"
>
<img
src="images/logo.png"
alt="logo"
/>
</a>

<nav class="navbar">
<ul class="navbar__list">
<li>
<a
href="#"
class="navbar__link is-active"
>
Apple
</a>
</li>
<li>
<a
href="#"
class="navbar__link"
>
Samsung
</a>
</li>
<li>
<a
href="#"
class="navbar__link"
>
Smartphones
</a>
</li>
<li>
<a
href="#"
class="navbar__link"
data-qa="hover"
>
Laptops & Computers
</a>
</li>
<li>
<a
href="#"
class="navbar__link"
>
Gadgets
</a>
</li>
<li>
<a
href="#"
class="navbar__link"
>
Tablets
</a>
</li>
<li>
<a
href="#"
class="navbar__link"
>
Photo
</a>
</li>
<li>
<a
href="#"
class="navbar__link"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
74 changes: 73 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,75 @@
body {
@import 'https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap';

* {
margin: 0;
box-sizing: border-box;
font-family: Roboto, sans-serif;

--header-height: 60px;
}

.header {
display: flex;
justify-content: space-between;
align-items: center;

position: fixed;
width: 100%;
height: var(--header-height);
padding: 0 50px;
}

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

.navbar__list {
display: flex;
list-style-type: none;
padding: 0;
margin: 0;
}

.navbar__link {
display: flex;
align-items: center;
position: relative;
color: black;
text-decoration: none;
text-transform: uppercase;

font-size: 12px;
font-weight: 500;
line-height: var(--header-height);

white-space: nowrap;
}

.navbar__list li {
margin: auto 0;
}

.navbar__list li:not(:first-child) {
margin-left: 20px;
}

.navbar__link:hover {
color: #00acdc;
}

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

a.is-active::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 4px;
border-radius: 2px;
background-color: #00acdc;
}
Loading