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

moyo header #6096

Open
wants to merge 2 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
97 changes: 95 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,101 @@
rel="stylesheet"
href="./style.css"
/>
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossorigin="use-credentials"
/>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"
rel="stylesheet"
/>
</head>
<body>
<h1>Moyo header</h1>
<body class="reset">
<header class="header">
<a
class="link"
href="#"

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 '#', which is not a valid URL. Please update it to include a protocol, such as 'http://localhost:8080', to ensure it is a valid URL.

>
<img
src="images/logo.png"
alt="link__logo"
/>
</a>

<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
<a
class="nav__link is-active"
href="https://www.apple.com/"
>
Apple
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="https://www.samsung.com/"
>
Samsung
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="https://www.samsung.com/Smartphones"
>
Smartphones
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
data-qa="hover"
href="https://www.samsung.com/Laptops"
>
Laptops &amp computers
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="https://www.samsung.com/Gadgets"
>
Gadgets
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="https://www.samsung.com/Tablets"
>
Tablets
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="https://www.samsung.com/galery"
>
Photo
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="https://www.samsung.com/videogalery"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
1 change: 1 addition & 0 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
'use strict';
76 changes: 75 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,77 @@
body {
:root {
--blue-color: #00acdc;
}

.reset {
margin: 0;
}

.header {
display: flex;
background-color: #fff;
justify-content: space-between;
box-sizing: border-box;
align-items: center;
flex-wrap: nowrap;
min-width: 800px;
padding: 0 50px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.link {
text-decoration: none;
height: 40px;
}

.nav__list {
margin: 0;
padding: 0;
list-style: none;
display: flex;
justify-content: space-between;
align-items: center;
}

.nav__item {
position: relative;
color: #060b35;
list-style: none;
}

.nav__item:not(:last-child) {
margin-right: 20px;
}

.nav__link {
--height: 60px;

height: var(--height);
line-height: var(--height);
text-align: center;
font-size: 12px;
font-weight: 500;
font-family: Roboto, sans-serif;
color: #000;
text-transform: uppercase;
display: inline-block;
text-decoration: none;
}

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

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

.nav__list li:first-child::after {
content: '';
position: absolute;
top: 56px;
left: 0;
height: 4px;
width: 100%;
border-radius: 8px;
background-color: var(--blue-color);
}