-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
base: master
Are you sure you want to change the base?
add task solution #6068
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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"> | ||
<li class="nav_li"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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> |
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 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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); | ||
} |
There was a problem hiding this comment.
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.