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

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

develop #5604

Show file tree
Hide file tree
Changes from 1 commit
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 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 distanced MUST be the same as on the design.
Expand Down Expand Up @@ -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 `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://julia303920201.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://julia303920201.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
95 changes: 94 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,105 @@
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:wght@400;500&display=swap"
rel="stylesheet"
/>

<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
class="logo"
href="dr"

Choose a reason for hiding this comment

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

The href attribute for the logo link is set to 'dr', which seems incorrect. It should be a valid URL or path. Consider updating it to the correct destination.

>
<img
src="./images/logo.png"
alt="logo"
/>
</a>
<nav class="nav">
<ul class="nav-list">
<li class="nav-item">
<a
class="nav-link is-active"
href="Apple"

Choose a reason for hiding this comment

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

The href attribute for the 'Apple' link is set to 'Apple', which is not a valid URL. It should be a valid URL or path. Consider updating it to the correct destination.

>
Apple
</a>
</li>
<li class="nav-item">
<a
class="nav-link"
href="Samsung"

Choose a reason for hiding this comment

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

The href attribute for the 'Samsung' link is set to 'Samsung', which is not a valid URL. It should be a valid URL or path. Consider updating it to the correct destination.

>
Samsung
</a>
</li>
<li class="nav-item">
<a
class="nav-link"
href="Smartphones"

Choose a reason for hiding this comment

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

The href attribute for the 'Smartphones' link is set to 'Smartphones', which is not a valid URL. It should be a valid URL or path. Consider updating it to the correct destination.

>
Smartphones
</a>
</li>
<li class="nav-item">
<a
class="nav-link"
data-qa="hover"
href="Laptops & Computers"

Choose a reason for hiding this comment

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

The href attribute for the 'Laptops & Computers' link is set to 'Laptops & Computers', which is not a valid URL. It should be a valid URL or path. Consider updating it to the correct destination.

>
Laptops & Computers
</a>
</li>
<li class="nav-item">
<a
class="nav-link"
href="Gadgets"

Choose a reason for hiding this comment

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

The href attribute for the 'Gadgets' link is set to 'Gadgets', which is not a valid URL. It should be a valid URL or path. Consider updating it to the correct destination.

>
Gadgets
</a>
</li>
<li class="nav-item">
<a
class="nav-link"
href="Tablets"

Choose a reason for hiding this comment

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

The href attribute for the 'Tablets' link is set to 'Tablets', which is not a valid URL. It should be a valid URL or path. Consider updating it to the correct destination.

>
Tablets
</a>
</li>
<li class="nav-item">
<a
class="nav-link"
href="Photo"

Choose a reason for hiding this comment

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

The href attribute for the 'Photo' link is set to 'Photo', which is not a valid URL. It should be a valid URL or path. Consider updating it to the correct destination.

>
Photo
</a>
</li>
<li class="nav-item">
<a
class="nav-link"
href="Video"

Choose a reason for hiding this comment

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

The href attribute for the 'Video' link is set to 'Video', which is not a valid URL. It should be a valid URL or path. Consider updating it to the correct destination.

>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
74 changes: 74 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,77 @@
:root {
--active-color: #00acdc;
}

body {
margin: 0;
}

html {
font-family: Roboto, Arial, sans-serif;
font-size: 12px;
font-weight: 500;
text-transform: uppercase;
}

.header {
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
box-shadow: 0 2px 4px 0 #0000000d;
padding: 0 50px;
}

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

.nav-link {
display: flex;
position: relative;
align-items: center;
height: 60px;
margin-left: 20px;
color: black;
text-decoration: none;
}

.nav-item {
cursor: default;
justify-content: center;
}

.is-active {
margin-left: 0;
color: var(--active-color);
}

.nav__link:hover {

Choose a reason for hiding this comment

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

The selector .nav__link:hover seems to be incorrect as there is no class nav__link defined in the HTML. It should be .nav-link:hover to match the class used in the HTML file.

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

.logo {
display: flex;
width: 40px;
height: 40px;
margin-top: 10px;
margin-bottom: 10px;
}

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

:hover {

Choose a reason for hiding this comment

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

The :hover selector is too generic and will apply to all elements. Consider using a more specific selector to target only the elements you want to apply the hover effect to, such as .nav-link:hover.

color: var(--active-color);
}
Loading