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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
5 changes: 3 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Moyo header

Create an HTML page with the header using `flexbox` based on the [Figma Mockup](https://www.figma.com/file/1sog2rmfyCjnVxkeZ3ptnc/MOYO-%2F-Header?node-id=0%3A1&mode=dev).

The page should match the design Pixel Perfect: all the sizes, colors and distances MUST be the same as on the design.
@@ -27,8 +28,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 the `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://Vanivnaa.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://Vanivnaa.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.

92 changes: 91 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
@@ -15,8 +15,98 @@
rel="stylesheet"
href="./style.css"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
class="logo"
href="https://www.moyo.ua/"
>
<img
src="images/logo.png"
alt="Logo_moyo"
/>
</a>
<nav class="nav">
<ul class="nav_ul">

Choose a reason for hiding this comment

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

The class name 'nav_ul' does not follow the BEM naming convention. Consider renaming it to something like 'nav__list' to adhere to BEM principles.

<li class="nav_li">

Choose a reason for hiding this comment

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

The class name 'nav_li' does not follow the BEM naming convention. Consider renaming it to something like 'nav__item' to adhere to BEM principles.

<a
href="https://www.moyo.ua/ua/brands/apple/"
class="nav_item is-active"

Choose a reason for hiding this comment

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

The class name 'nav_item' does not follow the BEM naming convention. Consider renaming it to something like 'nav__link' to adhere to BEM principles.

>
Apple
</a>
</li>

<li class="nav_li">
<a
href="https://www.moyo.ua/ua/brands/samsung/"
class="nav_item"
>
Samsung
</a>
</li>

<li class="nav_li">
<a
href="https://www.moyo.ua/ua/portal_brand/smartphones_phones/"
class="nav_item"
>
Smartphones
</a>
</li>

<li class="nav_li laptops">

Choose a reason for hiding this comment

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

The class name 'nav_li laptops' does not follow the BEM naming convention. Consider renaming it to something like 'nav__item nav__item--laptops' to adhere to BEM principles.

<a
href="https://www.moyo.ua/ua/portal_brand/comp_and_periphery/"
data-qa="hover"
class="nav_item"
>
Laptops & Computers
</a>
</li>

<li class="nav_li">
<a
href="https://www.moyo.ua/ua/portal_brand/photo_video/"
class="nav_item"
>
Gadgets
</a>
</li>

<li class="nav_li">
<a
href="https://www.moyo.ua/ua/tablet_el_knigi/tablet/"
class="nav_item"
>
Tablets
</a>
</li>

<li class="nav_li">
<a
href="https://www.moyo.ua/ua/foto_video/photo_video/cameras/"
class="nav_item"
>
Photo
</a>
</li>

<li class="nav_li">
<a
href="https://www.youtube.com/c/MoyoUa/videos"
class="nav_item"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
69 changes: 69 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,72 @@
body {
--main-color: #00acdc;

font-family: Roboto, sans-serif;
margin: 0;
padding: 0;
border: 0;
}

.header {
display: flex;
justify-content: space-between;
align-items: center;
padding-inline: 50px;
background-color: #fff;
}

.logo {
width: 40px;
height: 40px;
}

.nav {
display: flex;
align-items: center;
}

.nav_ul {

Choose a reason for hiding this comment

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

The class name 'nav_ul' does not follow the BEM naming convention. Consider renaming it to something like 'nav__list' to adhere to BEM principles.

list-style: none;
margin: 0;
padding: 0;
display: flex;
align-items: center;
}

.nav_li:not(:last-child) {

Choose a reason for hiding this comment

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

The class name 'nav_li' does not follow the BEM naming convention. Consider renaming it to something like 'nav__item' to adhere to BEM principles.

margin-right: 20px;
}

.nav_item {

Choose a reason for hiding this comment

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

The class name 'nav_item' does not follow the BEM naming convention. Consider renaming it to something like 'nav__link' to adhere to BEM principles.

display: block;
font-size: 12px;
color: #000;
font-weight: 500;
text-decoration: none;
text-transform: uppercase;
line-height: 60px;
}

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

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

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

.nav_li a:hover {

Choose a reason for hiding this comment

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

Avoid using tag names for styling. Instead, apply styles using classes to ensure consistency and maintainability.

color: var(--main-color);
}