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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
18 changes: 9 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ 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://AllanCordella.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://AllanCordella.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.

- [ ] Header height is set in 1 place (for the links)
- [ ] Content is vertically centered (for any header height)
- [ ] CSS is used to show all letters in Uppercase (don't type them in HTML)
- [ ] Logo is an image wrapped with a link
- [ ] **CSS Variable** is used for a blue color
- [ ] Pseudo-element is used for a blue line below the active link
- [ ] Code follows all the [Code Style Rules ❗️](./checklist.md)
- [x] Header height is set in 1 place (for the links)
- [x] Content is vertically centered (for any header height)
- [x] CSS is used to show all letters in Uppercase (don't type them in HTML)
- [x] Logo is an image wrapped with a link
- [x] **CSS Variable** is used for a blue color
- [x] Pseudo-element is used for a blue line below the active link
- [x] Code follows all the [Code Style Rules ❗️](./checklist.md)
98 changes: 96 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,107 @@
http-equiv="X-UA-Compatible"
content="ie=edge"
/>
<title>Moyo header</title>
<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"
/>
<title>MOYO Header</title>
<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
class="img"
href="index.html"
>
<img
src="images/logo.png"
alt="moyologo"
/>
</a>

<nav class="nav">
Comment on lines +32 to +43

Choose a reason for hiding this comment

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

The <nav> element should not contain the logo. Consider moving the logo outside the <nav> element to maintain proper semantic structure.

<ul class="nav__list">
<li class="nav__item">
<a
href="https://mate.academy/"
class="nav__link is-active"
>
Apple
</a>
</li>
<li class="nav__item">
<a
href="https://mate.academy/"
class="nav__link"
>
Samsung
</a>
</li>
<li class="nav__item">
<a
href="https://mate.academy/"
class="nav__link"
>
Smartphones
</a>
</li>
<li
class="nav__item"
data-qa="hover"
>
<a
href="https://mate.academy/"
class="nav__link"
>
Laptops & Computers
</a>
</li>
<li class="nav__item">
<a
href="https://mate.academy/"
class="nav__link"
>
Gadgets
</a>
</li>
<li class="nav__item">
<a
href="https://mate.academy/"
class="nav__link"
>
Tablets
</a>
</li>
<li class="nav__item">
<a
href="https://mate.academy/"
class="nav__link"
>
Photo
</a>
</li>
<li class="nav__item">
<a
href="https://mate.academy/"

Choose a reason for hiding this comment

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

The href attributes for the navigation links are currently pointing to https://mate.academy/. These should be updated to valid relative or absolute paths relevant to your project.

class="nav__link"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
96 changes: 96 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,99 @@
html {
margin: 0;
font-family: roboto, sans-serif;
}

body {
margin: 0;
}

a {
text-decoration: none;
color: #000;
}

ul {
padding: 0;
list-style: none;
}

li {
list-style: none;
}

.img {
position: absolute;
top: 10px;
left: 50px;
}

.header {
display: flex;

background-color: #fff;

justify-content: end;
align-items: center;
}

.nav {
/* background-color: chartreuse; */

width: 639px;
height: 60px;
display: flex;
align-items: center;
margin-right: 50px;
}

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

/* background-color: blueviolet; */

justify-content: space-between;
}

.nav__item {
/* background-color: beige; */
display: flex;
align-items: center;
flex-direction: row;
justify-content: center;
}

.nav__link {
/* background-color: cyan; */
height: 60px;
display: flex;
font-weight: 500;
color: #000;
font-size: 12px;
text-transform: uppercase;
align-items: center;
}

.nav__link:hover {
color: #00acdc;
}
Comment on lines +78 to +80

Choose a reason for hiding this comment

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

The :hover selector should be more specific to avoid unintended styling across the site. Consider using a more specific selector like .nav__link:hover.


.is-active {
color: #00acdc;
display: flex;
align-items: center;
position: relative;
}

.is-active::after {
content: '';

background-color: #00acdc;
border: solid #00acdc 1px;
height: 2px;
border-radius: 8px;
position: absolute;
bottom: 0;
width: 36px;
}
Loading