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

firstTry1 #5851

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://WhiteP8wder8.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://WhiteP8wder8.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
111 changes: 110 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,122 @@
http-equiv="X-UA-Compatible"
content="ie=edge"
/>
<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: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>
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossorigin="anonymous"
/>
<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"
/>
Comment on lines +26 to +38

Choose a reason for hiding this comment

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

The link tags for preconnecting to Google Fonts and loading the Roboto font are duplicated. Consider removing the redundant set of link tags to avoid unnecessary HTTP requests and improve page load performance.

<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a href="#">
<img
class="img__logo"
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="#"
>
Apple
</a>
</li>

<li class="nav__item">
<a
class="nav__link"
href="#"
>
Samsung
</a>
</li>

<li class="nav__item">
<a
class="nav__link"
href="#"
>
Smartphones
</a>
</li>

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

<li class="nav__item">
<a
class="nav__link"
href="#"
>
Gadgets
</a>
</li>

<li class="nav__item">
<a
class="nav__link"
href="#"
>
Tablets
</a>
</li>

<li class="nav__item">
<a
class="nav__link"
href="#"
>
Photo
</a>
</li>

<li class="nav__item">
<a
class="nav__link"
href="#"
>
Video
</a>
</li>
</ul>
</nav>
</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 {
margin: 0;

--main-color: #00acdc;
}

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

background: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

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

.nav__item {
margin-left: 20px;
height: 60px;
display: flex;
align-content: center;
}

.nav__link {
font-family: Roboto, serif;
font-weight: 500;
text-transform: uppercase;
font-size: 12px;
color: #000;
align-content: center;
text-decoration: none;
}

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

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

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

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