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

add task solution #5873

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://vvyboichyk.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://vvyboichyk.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: 97 additions & 7 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,109 @@
<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, initial-scale=1.0"
/>
<meta
http-equiv="X-UA-Compatible"
content="ie=edge"
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossorigin="use-credentials"

Choose a reason for hiding this comment

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

The crossorigin attribute should be set to anonymous instead of use-credentials when preconnecting to Google Fonts. This is because Google Fonts does not require credentials, and using anonymous is more secure and compatible.

/>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
rel="stylesheet"
/>
<title>Moyo header</title>
<title>Moyo Header</title>
<link
rel="stylesheet"
href="./style.css"
href="style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="index.html"
class="logo"
>
<img
src="images/logo.png"
alt="moyo__logo"
/>
</a>
<div class="nav_block">
<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
<a
href="#"
class="nav__link is-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>
</div>
</header>
</body>
</html>
66 changes: 66 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,69 @@
body {
font-family: Roboto, sans-serif;
margin: 0;
}

ul {
list-style: none;
}

a {
text-decoration: none;
}

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

.nav__list {
display: flex;
padding: 0;
margin: 0;
}

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

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

.nav__link:hover {
color: #00acdc;
}

.nav__link:active {
color: #00acdc;
box-shadow: 0 4px 0 #00acdc;
}

.is-active {
position: relative;
color: #00acdc;
}

.is-active::after {
content: '';
position: absolute;
background-color: #00acdc;
height: 4px;
bottom: 0;
left: 0;
width: 100%;
border-radius: 8px;
}

.logo {
max-height: 40px;
}
Loading