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

added Momyo header in html and css #5814

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://ochepurna.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://ochepurna.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
101 changes: 100 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,107 @@
rel="stylesheet"
href="./style.css"
/>
<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,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="#"
class="img"
>
<img
src="images/logo.png"
alt="Moyo"
/>
</a>

<nav>
<ul class="nav__list">
<li>
<a
href="#apple"
class="nav__link is-active"
>
Apple
</a>
</li>

<li>
<a
href="#samsung"
class="nav__link"
>
Samsung
</a>
</li>

<li>
<a
href="#smartphones"
class="nav__link"
>
Smartphones
</a>
</li>

<li>
<a
href="#laptops&Computers"
class="nav__link"
data-qa="hover"
>
Laptops & Computers
</a>
</li>

<li>
<a
href="#gadgets"
class="nav__link"
>
Gadgets
</a>
</li>

<li>
<a
href="#tablets"
class="nav__link"
>
Tablets
</a>
</li>

<li>
<a
href="#photo"
class="nav__link"
>
Photo
</a>
</li>

<li>
<a
href="#video"
class="nav__link"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
63 changes: 63 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,66 @@
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 properly loaded in your HTML file. The current setup in the HTML file does not correctly link to the Google Fonts stylesheet.


--blue-color: #00acdc;
}

.header {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
padding: 0 50px;
}
Comment on lines +14 to +15

Choose a reason for hiding this comment

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

Suggested change
padding: 0 50px;
}
padding: 0 50px;
box-sizing: border-box;
}


.nav__list {
display: flex;
justify-content: flex-end;
margin: 0;
padding: 0;
list-style-type: none;
}

.nav__link {
display: block;
margin: auto 20px;
color: #000;
text-decoration: none;
font-size: 12px;
font-weight: 500;
line-height: 60px;
text-align: center;
text-transform: uppercase;
}

.nav__link:last-child {
margin-right: 0;
}

.img {
width: 40px;
height: 40px;
margin: 10px 0;
}

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

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

.nav__link:hover {
color: var(--blue-color);
}
Loading