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

Closed
wants to merge 3 commits into from
Closed

develop #5574

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
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
"keywords": [],
"author": "Mate Academy",
"license": "GPL-3.0",
"dependencies": {},
"devDependencies": {
"@linthtml/linthtml": "^0.9.6",
"@mate-academy/backstop-config": "latest",
"@mate-academy/bemlint": "latest",
"@mate-academy/linthtml-config": "latest",
"@mate-academy/scripts": "^1.8.6",
"@mate-academy/scripts": "^1.9.12",
"@mate-academy/stylelint-config": "latest",
"backstopjs": "6.3.23",
"jest": "^29.7.0",
Expand Down
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://PedroWeb10.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://Pedroweb10.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: 99 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,116 @@
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
content="width=device-width, initial-scale=1.0"
/>
<meta
http-equiv="X-UA-Compatible"
content="ie=edge"
/>
<link
rel="preconnect"
href="https://fonts.googleapis.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
href="#"
class="logo"
>
<img
src="./images/logo.png"
alt="logo MOYO"
class="image"
/>
</a>

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

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

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

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

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

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

<li class="nav__item">
<a
href="#photo-products"
class="nav nav__link"
>
Photo
</a>
</li>

<li class="nav__item">
<a
href="#video-products"
class="nav__link"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
85 changes: 85 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,88 @@
/* stylelint-disable import-notation */
@import url('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');

body {
margin: 0;
font-family: Roboto, Arial, sans-serif;
color: black;
display: flex;
align-items: center;
height: 60px;
font-size: 12px;
font-weight: 500;
}

.header {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 50px;
background: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.logo {
display: block;
height: 40px;
width: 40px;
}

.image {
height: 100%;
width: 100%;
}

.nav {
display: inline-block;
}

.nav__list {
display: flex;
padding: 0;
margin: 0;
list-style: none;
}

.nav__item:first-child {
margin-left: 0;
}

.nav__link.is-active {
color: #00acdc;
}

/* stylelint-disable-next-line no-descending-specificity */
.nav__item {
margin-left: 20px;
}

.nav__link {
position: relative;
display: flex;
align-items: center;
height: 60px;
text-decoration: none;
text-transform: uppercase;
color: #000;
transition: color 0.3s;
}

.nav__link.is-active::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 4px;
border-radius: 2px;
background-color: #00acdc;
}

.nav [data-qa='hover']:hover {
color: #00acdc;
}

.nav .nav__list .nav__item .nav__link:hover {
color: #00acdc;
}
Loading