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

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

Develop #5867

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
91 changes: 91 additions & 0 deletions src/index.html
Copy link

Choose a reason for hiding this comment

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

Use 2 spaces for indentation in your file (not a tab character)

Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,99 @@
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,500&display=swap"
rel="stylesheet"
/>
</head>
<body>
<header class="header">
<a href="#">
<img
src="images/logo.png"
alt="MOYO logo"
class="header_top_logo"
/>
</a>
<nav class="navigation">
<ul class="nav__list">
<li class="list_item">
<a
href="#apple"
class="nav-link is-active"
id="active-link"
>
apple
</a>
</li>
<li class="list_item">
<a
href="#samsung"
class="nav-link"
>
samsung
</a>
</li>
<li class="list_item">
<a
href="#smartphones"
class="nav-link"
>
smartphones
</a>
</li>
<li class="list_item">
<a
data-qa="hover"
class="nav-link"
href="#computers"
>
laptops & computers
</a>
</li>
<li class="list_item">
<a
href="#gadgets"
class="nav-link"
>
gadgets
</a>
</li>
<li class="list_item">
<a
href="#tablets"
class="nav-link"
>
tablets
</a>
</li>
<li class="list_item">
<a
href="#photo"
class="nav-link"
>
photo
</a>
</li>
<li class="list_item">
<a
href="#video"
class="nav-link"
>
video
</a>
</li>
</ul>
</nav>
</header>
<h1>Moyo header</h1>
</body>
</html>
84 changes: 83 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,85 @@
body {
html {
/* stylelint-disable-next-line font-family-name-quotes */
font-family: 'Roboto', sans-serif;
font-size: 12px;
font-style: normal;
font-weight: 500;
text-transform: uppercase;

--link-color: #00acdc;
}

* {
margin: 0;
}

.list_item {
list-style: none;
margin-left: 20px;
}

.list_item:first-child {
margin-left: 0;
color: var(--link-color);
}

.nav__list {
padding: 0;
display: flex;
}

.header {
position: relative;
width: 100%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
}

.header_top_logo {
margin-left: 50px;
width: 40px;
height: 40px;
padding-top: 10px;
padding-bottom: 10px;
display: flex;
}

.is-active {
position: relative;

Choose a reason for hiding this comment

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

The '.is-active' class is used to style active links. Ensure that this class is consistently applied in the HTML to avoid styling inconsistencies.

color: var(--link-color);
}

/* stylelint-disable-next-line selector-max-id */
#active-link {
color: var(--link-color);
}

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

.nav-link {
line-height: 60px;
height: 60px;
display: inline-block;
text-decoration: none;
color: black;
}

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

.navigation {
margin-right: 50px;
}
Loading