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

solution try #6210

Open
wants to merge 1 commit 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
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://EtienneD10.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://EtienneD10.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)
95 changes: 94 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,101 @@
rel="stylesheet"
href="./style.css"
/>
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
rel="preconnect"
href="https://fonts.gstatic.com"
/>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"
rel="stylesheet"
/>
</head>

<body>
<h1>Moyo header</h1>
<header class="nav-area">
<a
class="logo"
href="#"
>
<img
src="./images/logo.png"
alt="logo"
/>
</a>

<nav class="nav">
<ul class="nav-list">
<li class="nav-item">
<a
href="#"
class="is-active nav-link nav-link--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="#"
class="nav-link"
data-qa="hover"
>
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>
67 changes: 67 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,70 @@
body {
padding: 0;
box-sizing: border-box;
margin: 0;
font-family: Roboto, sans-serif;
color: black;
font-size: 10px;
font-weight: 400;
line-height: 14px;

--main-color: #00acdc;
}

.nav-area {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 50px;
background: white;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.nav-list {
display: flex;
gap: 20px;
padding: 0;
margin: 0;
list-style: none;
}

.nav-link {
position: relative;
display: flex;
align-items: center;
height: 60px;
color: #000;
font-size: 12px;
font-weight: 500;
text-decoration: none;
}

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

.nav-link--active::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 4px;
border-radius: 2px;
background-color: var(--main-color);
}

.nav-link:hover {
color: var(--main-color);
}

.is-active {
position: relative;
margin-left: 0;
color: var(--main-color);
}