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

moyo header completed #5746

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://DmytroKonarev.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://DmytroKonarev.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
74 changes: 73 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,84 @@
content="ie=edge"
/>
<title>Moyo header</title>
<link
rel="stylesheet"
href="style.css"
/>
Comment on lines +14 to +17

Choose a reason for hiding this comment

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

The stylesheet link here is redundant as the same stylesheet is linked again on lines 30-33. Consider removing one of these links to avoid unnecessary duplication.

<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@400;500;700&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="./style.css"
/>
Comment on lines 30 to 33

Choose a reason for hiding this comment

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

This stylesheet link is a duplicate of the one on lines 14-17. You should keep only one of these links to prevent redundancy.

</head>
<body>
<h1>Moyo header</h1>
<header>
<a
href="#"
class="logo"
>
<img
src="./images/logo.png"
alt="MOYO"
/>
</a>

<nav class="navbar">
<ul>
<li class="nav__item">
<a
href="#apple"
class="is-active"
>
APPLE
</a>
</li>

<li class="nav__item">
<a href="#samsung">SAMSUNG</a>
</li>

<li class="nav__item">
<a href="#smartphones">SMARTPHONES</a>
</li>

<li class="nav__item">
<a
href="#laptops&computers"
data-qa="hover"
>
LAPTOPS & COMPUTERS
</a>
</li>

<li class="nav__item">
<a href="#gadgets">GADGETS</a>
</li>

<li class="nav__item">
<a href="#tablets">TABLETS</a>
</li>

<li class="nav__item">
<a href="#photo">PHOTO</a>
</li>

<li class="nav__item">
<a href="#video">VIDEO</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
65 changes: 65 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,68 @@
html,
body {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: Roboto, sans-serif;
}

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

.logo img {
height: 40px;
width: 40px;
vertical-align: top;
}

nav ul {
display: flex;
list-style: none;
margin: 0;
padding: 0;
}

nav ul li {
margin-right: 20px;
font-weight: 500;
}

nav ul li:last-child {
margin-right: 0;
}

nav ul li a {
text-decoration: none;
font-size: 12px;
color: #000;
height: 60px;
display: flex;
align-items: center;
position: relative;
}

nav ul li a:hover {
color: #00acdc;
}

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

nav ul li a.is-active {
color: #00acdc;
}