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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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://Remdigger.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://Remdigger.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
50 changes: 49 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
<!doctype html>
<html lang="en">
<head>
<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:ital,wght@0,500;1,500&display=swap"
rel="stylesheet"
/>
<meta charset="UTF-8" />
<meta
name="viewport"
Expand All @@ -17,6 +29,42 @@
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="#"
class="logo"
>
<img
src="/src/images/logo.png"
alt="Moyo Logo"
/>
</a>
<nav class="nav">
<ul class="nav-list">
<li>
<a
class="is-active"
href="#"
>
Apple
</a>
</li>
<li><a href="#">Samsung</a></li>
<li><a href="#">Smartphones</a></li>
<li>
<a
data-qa="hover"
href="#"
>
Laptops & Computers
</a>
</li>
<li><a href="#">Gadgets</a></li>
<li><a href="#">Tablets</a></li>
<li><a href="#">Photo</a></li>
<li><a href="#">Video</a></li>
</ul>
</nav>
</header>
</body>
</html>
Binary file added src/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,82 @@
html {
--link-color: #00acdc;
}

body {
margin: 0;
font-family: Roboto, sans-serif;

Choose a reason for hiding this comment

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

Ensure that the 'Roboto' font is correctly linked in the HTML file. If the font is not loading properly, check the link in the HTML file to ensure it's correct.

font-size: 12px;
font-weight: 500;
font-style: normal;
box-sizing: border-box;
}

.header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 50px;
}

.logo {
/* display: block;
padding: 10px 0; */
Comment on lines +22 to +23

Choose a reason for hiding this comment

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

These commented-out styles for .logo might be unnecessary if they are not intended for future use. Consider removing them to keep the CSS clean.

height: 40px;
}

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

li {
/* display: flex;
text-align: center;
height: 60px;
line-height: 60px; */
Comment on lines +36 to +39

Choose a reason for hiding this comment

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

These commented-out styles for li might be unnecessary if they are not intended for future use. Consider removing them to keep the CSS clean.

margin-left: 20px;
}

a {
display: flex;
height: 100%;
text-decoration: none;
}

nav a {
display: block;
height: 60px;
line-height: 60px;
text-align: center;
text-decoration: none;
text-transform: uppercase;
color: #000;
width: 100%;
}

li:first-child {
margin-left: 0;
}

nav a:hover {
color: var(--link-color);
}

nav a.is-active {
position: relative;
color: var(--link-color);
}

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