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

Develop #5377

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Develop #5377

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://Oleg473.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://Oleg473.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
104 changes: 102 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
content="width=device-width, user-scalable=no, initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0"
/>
<meta
http-equiv="X-UA-Compatible"
Expand All @@ -15,8 +15,108 @@
rel="stylesheet"
href="./style.css"
/>
<link
rel="preconnect"
href="https://fonts.googleapis.com"
>
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossorigin
>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"
rel="stylesheet"
>
<title>Moyo header</title>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="#header"
class="logo"
>
<img
src="images/logo.png"
alt="Moyo-Logo"
/>
</a>
<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
<a
class="nav__link is-active"
href="#header"
>
Apple
</a>
</li>

<li class="nav__item">
<a
class="nav__link is-active"
href="#header"
>
Samsung
</a>
</li>

<li class="nav__item">
<a
class="nav__link is-active"
href="#header"
>
Smartphones
</a>
</li>

<li class="nav__item">
<a
class="nav__link is-active"
href="#header"
data-qa="hover"
>
Laptops & Computers
</a>
</li>

<li class="nav__item">
<a
class="nav__link is-active"
href="#header"
>
Gadgets
</a>
</li>

<li class="nav__item">
<a
class="nav__link is-active"
href="#header"
>
Tablets
</a>
</li>

<li class="nav__item">
<a
class="nav__link is-active"
href="#header"
>
Photo
</a>
</li>

<li class="nav__item">
<a
class="nav__link is-active"
href="#header"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
83 changes: 82 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,84 @@
body {
body{
padding: 0;
margin: 0;
padding-bottom: 2000px;
}


:root{
--header-height: 60px;
}

.roboto-medium {
font-family: "Roboto", sans-serif;
font-weight: 500;
font-style: normal;
}

.header {
display: flex;
margin: 0 50px;
justify-content: space-between;

}

.logo {
height: 40px;
width: 40px;
object-fit: contain;
padding: 10px 0;
}

.nav {
text-transform: uppercase;
}

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

.nav__item{
transition: all ease-in-out 0.15s;
}

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

.nav__link{
font-weight: 500;
font-size: 12px;
height: var(--header-height);
line-height: var(--header-height);
font-family: Roboto, sans-serif;
text-decoration: none;
display: inline-block;
color: inherit;
}

.nav__item:hover {
color: #00ACDC;
}

.is-active{
position: relative;
}

.is-active::after{
content: '';
position: absolute;
border: 4px solid #00ACDC;
border-radius: 8px;
width: calc(100% - 5px);
bottom: 0;
left: 0;
opacity: 0;
}

.is-active:hover::after {
bottom: 0;
opacity: 1;
}
Loading