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

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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://papayapan.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://papayapan.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
94 changes: 92 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,98 @@
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>
<body id="#home">
<header class="header">
<a href="home">
<img
src="./images/logo.png"
alt="logo"
class="icon"
/>
</a>

<nav class="nav">
<ul class="nav_list">
<li class="nav_item">
<a
href="#apple"
class="nav_link is-active"
>
Apple
</a>
</li>
<li class="nav_item">
<a
href="#samsung"
class="nav_link"
>
Samsung
</a>
</li>
<li class="nav_item">
<a
href="#smartphones"
class="nav_link"
>
Smartphones
</a>
</li>
<li class="nav_item">
<a
href="#laptop & Computer"
class="nav_link"
data-qa="hover"
>
laptop & Computer

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
laptop & Computer
laptop & Computers

</a>
</li>
<li class="nav_item">
<a
href="#Gadgest"
class="nav_link"
>
Gadgest

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Gadgest
Gadgets

</a>
</li>
<li class="nav_item">
<a
href="#Tablets"
class="nav_link"
>
Tablets
</a>
</li>
<li class="nav_item">
<a
href="#Photo"
class="nav_link"
>
Photo
</a>
</li>
<li class="nav_item">
<a
href="#Video"
class="nav_link"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
64 changes: 64 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,67 @@
body {
margin: 0;
}

:root {
--main-font: 12px;
--main-color: #00acdc;
}

html {
font-family: Roboto, sans-serif;
font-size: var(--main-font);
}

.header {
padding: 0 50px;
display: flex;
justify-content: space-between;
font-weight: 500;
align-items: center;
background-color: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav_list {
display: flex;
text-transform: uppercase;
list-style: none;
padding: 0;
margin: 0;
}

.nav_item {
margin-left: 20px;
}

.nav_item:first-child {
margin-left: 0;
}

.nav_link {
display: flex;
align-items: center;
height: 60px;
color: black;
text-decoration: none;
position: relative;
}

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

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.is-active {
color: var(--main-color);
}
.nav_link:hover {
color: var(--main-color);
}
.is-active,
.nav_link:hover {
color: var(--main-color);
}


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