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 #5728

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

Develop #5728

Show file tree
Hide file tree
Changes from 6 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://IvanIlnytskyy.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://IvanIlnytskyy.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
101 changes: 100 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,111 @@
content="ie=edge"
/>
<title>Moyo header</title>
<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"
/>
<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="#"
class="logo"
>
<img
src="images/logo.png"
alt="MOYO Logo"
/>
</a>

<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"

Choose a reason for hiding this comment

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

The 'data-qa' attribute is not explained or used in the code. If it's not needed, consider removing it to avoid confusion. If it serves a purpose, ensure it is documented or utilized properly.

>
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>
<a
href="#"
class="nav__link"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
72 changes: 72 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,75 @@
body {
margin: 0;
}

.logo img {
max-height: 40px;
margin-left: 50px;
margin-top: 10px;
margin-bottom: 10px;
}

Choose a reason for hiding this comment

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

Suggested change
.logo img {
max-height: 40px;
margin-left: 50px;
margin-top: 10px;
margin-bottom: 10px;
}
.logo {
height: 40px;
width: 40px;
}


.header {
display: flex;
align-items: center;
justify-content: space-between;
background-color: #fff;

Choose a reason for hiding this comment

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

This color is default

Suggested change
background-color: #fff;

font-weight: 500;
width: 1024px;
position: relative;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0, 5);

Choose a reason for hiding this comment

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

The box-shadow property has an incorrect value 'rgba(0, 0, 0, 0, 5)'. The last parameter should be a decimal between 0 and 1 to represent opacity. Consider correcting this to achieve the desired shadow effect.

font-family: Roboto, sans-serif;
margin-right: 0 50px;
box-sizing: border-box;
}

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

.nav__item {
margin-right: 20px;
}

.nav__link {
text-decoration: none;
color: #000;
line-height: 60px;
font-family: Roboto, sans-serif;
font-weight: 500;
text-transform: uppercase;
display: block;
text-align: center;
font-size: 12px;
}

.nav__link.is-active {
color: #00acdc;

Choose a reason for hiding this comment

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

Create a variable for repeated color and use it everywhere

position: relative;
}

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

.nav__list:last-child {
margin-right: 0;
}
Comment on lines +50 to +56

Choose a reason for hiding this comment

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

Suggested change
.nav__list:first-child {
margin-left: 0;
}
.nav__list:last-child {
margin-right: 0;
}

looks like redundant


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

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