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

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

Develop #5857

Show file tree
Hide file tree
Changes from 2 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://srvalle.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://srvalle.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
63 changes: 63 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,75 @@
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;700&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="#"
srvalle marked this conversation as resolved.
Show resolved Hide resolved
class="logo-link"
>
<img
src="images/logo.png"
alt="logo"
class="logo"
/>
</a>
<nav class="nav">
<ul class="list">
<li class="list-item">
<a
href="#"

Choose a reason for hiding this comment

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

Using href="#" is not ideal for accessibility and usability. Consider using a more meaningful URL or a JavaScript function to handle the click event if this is a placeholder.

class="is-active"
srvalle marked this conversation as resolved.
Show resolved Hide resolved
>
Apple
</a>
</li>
<li class="list-item">
<a href="#">Samsung</a>
</li>
<li class="list-item">
<a href="#">Smartphones</a>
</li>
<li class="list-item">
<a
href="#"

Choose a reason for hiding this comment

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

Using href="#" is not ideal for accessibility and usability. Consider using a more meaningful URL or a JavaScript function to handle the click event if this is a placeholder.

class="is-active"
srvalle marked this conversation as resolved.
Show resolved Hide resolved
data-qa="hover"
>
Laptops & Computers
</a>
</li>
<li class="list-item">
<a href="#">Gadgets</a>
</li>
<li class="list-item">
<a href="#">Tablets</a>
</li>
<li class="list-item">
<a href="#">Photo</a>
</li>
<li class="list-item">
<a href="#">Video</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
83 changes: 83 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,86 @@
body {
margin: 0;
background-color: #e4e4e4;

--blue-color: #00acdc;
}

.header {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
background-color: white;
}

.nav {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
height: 60px;
}

.list {
display: flex;
padding: 0;
margin: 0;
}

.list-item {
list-style: none;
margin: 0 10px;

}

.list-item:first-child {
margin: 0;
}

.list-item:last-child {
margin: 0;
}

.list a {
display: block;
height: 60px;
line-height: 60px;
font-family: Roboto, Arial, Helvetica, sans-serif;
font-size: 12px;
text-decoration: none;
color: black;
font-weight: bold;
text-transform: uppercase;
}

.list a:hover {
text-decoration: underline;
text-decoration-color: var(--blue-color);
text-decoration-thickness: 2px;
}

.list .is-active {
color: var(--blue-color);
}

.list .is-active::after {
position: absolute;

Choose a reason for hiding this comment

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

The .is-active::after pseudo-element uses position: absolute, but it may not display correctly unless its parent element is positioned (i.e., has a position property other than static). Ensure the parent element is positioned to avoid layout issues.

content: "";
width: 36px;
height: 4px;
left: 0;
bottom: 0;
background: var(--blue-color);
border-radius: 8px;
}
Comment on lines +66 to +75

Choose a reason for hiding this comment

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

The .is-active::after pseudo-element uses position: absolute. Ensure that its parent element has a position property other than static to avoid layout issues. Consider adding position: relative to the parent element.


.logo {
width: 40px;
height: 40px;
display: flex;

Choose a reason for hiding this comment

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

The .logo class uses display: flex, which is not typically applied to images. Consider removing this property unless there is a specific reason for its use.

margin-right: 50px;
}

.logo-link {
text-decoration: none;
}
Loading