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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
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://renatoveludo.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://renatoveludo.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
43 changes: 42 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,49 @@
rel="stylesheet"
href="./style.css"
/>
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossorigin="0"

Choose a reason for hiding this comment

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

The crossorigin attribute is set to '0', which is not a valid value. It should be either 'anonymous' or 'use-credentials'. Please update this attribute to a valid value.

/>
<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"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="images/logo.png"
Comment on lines +34 to +35

Choose a reason for hiding this comment

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

The href attribute in the <a> tag is pointing to an image file (images/logo.png). Typically, the href attribute should point to a URL or a page within the site. If this is intended to be a link to another page, you should update the href to the correct URL.

class="logo"
>
<img
src="images/logo.png"
alt="Logo"
/>
</a>
<div class="box_empty"></div>
<nav class="container">
<div class="titles">
<a class="is-active menu menu-1">APPLE</a>
<div class="menu menu-2">SAMSUNG</div>
<div class="menu menu-3">SMARTPHONES</div>
<div
data-qa="hover"
class="menu menu-4"
>
LAPTOPS & COMPUTERS
</div>
<div class="menu menu-5">GADGETS</div>
<div class="menu menu-6">TABLETS</div>
<div class="menu menu-7">PHOTO</div>
<div class="menu menu-8">VIDEO</div>
</div>
</nav>
</header>
</body>
</html>
84 changes: 84 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,87 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
margin: 0;
}

.header {
width: 100%;
display: flex;
align-items: center;
}

.box_empty {
display: flex;
height: 60px;
flex-grow: 1;
}

.container {
display: flex;
height: 60px;
justify-content: flex-end;
margin-left: 0;
margin-right: 50px;
}

.titles {
font-family: Roboto, sans-serif;
font-weight: 500;
font-style: normal;
font-size: 12px;
list-style: none;
align-items: center;
display: flex;
}

.menu {
color: black;
margin-left: 20px;
height: 60px;
line-height: 60px;
}

.menu:hover {
text-decoration: underline;
text-decoration-thickness: 3px;
text-underline-offset: 0;
text-decoration-color: #00acdc;
}

.logo {
position: absolute;
z-index: 1;
top: 10px;
left: 50px;
width: 40px;
height: 40px;
}

.menu-4:hover {
color: #00acdc;
text-decoration: none;
}

.is-active {
color: #00acdc;
position: relative;
display: inline-block;
margin-left: 0;
}

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