Skip to content
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
8 changes: 4 additions & 4 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 the `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://dianakerekesha.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://dianakerekesha.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 All @@ -39,5 +39,5 @@ The page should match the design Pixel Perfect: all the sizes, colors and distan
- [ ] **CSS Variable** is used for a blue color
- [ ] Pseudo-element is used for a blue line below the active link
- [ ] Code follows all the [Code Style Rules ❗️](./checklist.md)
- [ ] The Google Fonts Configuration follows requirements.
![alt text](./assets/image.png)
- [ ] The Google Fonts Configuration follows requirements.
![alt text](./assets/image.png)
86 changes: 85 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,92 @@
rel="stylesheet"
href="./style.css"
/>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"
rel="stylesheet"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="#"
class="logo"
>
<img
src="images/logo.png"
alt="MOYO logo"
/>
</a>

<nav class="nav">
<ul class="nav__list">
<li class="nav__list-item">
<a
class="nav__link is-active"
href="#"
>
Apple
</a>
</li>
<li class="nav__list-item">
<a
class="nav__link"
href="#"
>
Samsung
</a>
</li>
<li class="nav__list-item">
<a
class="nav__link"
href="#"
>
Smartphones
</a>
</li>
<li class="nav__list-item">
<a
class="nav__link"
data-qa="hover"
href="#"
>
Laptops & Computers
</a>
</li>
<li class="nav__list-item">
<a
class="nav__link"
href="#"
>
Gadgets
</a>
</li>
<li class="nav__list-item">
<a
class="nav__link"
href="#"
>
Tablets
</a>
</li>
<li class="nav__list-item">
<a
class="nav__link"
href="#"
>
Photo
</a>
</li>
<li class="nav__list-item">
<a
class="nav__link"
href="#"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
72 changes: 72 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,75 @@
html {
--color-blue: #00acdc;
}

body {
margin: 0;
padding: 0;
}

.header {
width: 100%;
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
font-family: Roboto, sans-serif;
font-weight: 500;
padding: 0 50px;
}

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

.nav {
margin-left: 48px;
}

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

.nav__list-item {
margin-left: 20px;
}

.nav__list-item:first-child {
margin: 0;
}

.nav__link {
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
text-transform: uppercase;
font-size: 12px;
height: 60px;
color: #000;
}

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

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

.is-active::after {
content: '';
position: absolute;
left: 0;
bottom: 0;

width: 100%;
height: 4px;
border-radius: 2px;
background-color: var(--color-blue);
}