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

creat header #4698

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
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://oliaShymanska.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://oliaShymanska.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
103 changes: 102 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,109 @@
rel="stylesheet"
href="./style.css"
/>
<link
rel="stylesheet"
href="./normalized.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="header">
<a href="index.html">
<img
src="images/logo.png"
alt="MOYO"
class="logo__image"
/>
</a>

<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
<a
href="#apple"
class="nav__link is-active nav__link-1"
>
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="#laptopsAndComputers"
data-qa="hover"
class="nav__link"
>
Laptops & Computers
</a>
</li>

<li class="nav__item">
<a
href="#gadgets"
class="nav__link"
>
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>
3 changes: 3 additions & 0 deletions src/normalized.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
margin: 0;
}
57 changes: 57 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,60 @@
body {
--color-link: #00acdc;
--height-header: 60px;
}

.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 50px;
}

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

.nav__link {
font-family: Roboto, sans-serif;
font-size: 12px;
color: #000;
text-decoration: none;
text-transform: uppercase;
display: flex;

height: var(--height-header);
align-items: center;
}

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

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

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

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

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