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

Created header #4917

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@mate-academy/backstop-config": "latest",
"@mate-academy/bemlint": "latest",
"@mate-academy/linthtml-config": "latest",
"@mate-academy/scripts": "^1.7.3",
"@mate-academy/scripts": "^1.8.1",
"@mate-academy/stylelint-config": "latest",
"backstopjs": "6.2.2",
"jest": "^29.7.0",
Expand Down
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://Mijomeis.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://Mijomeister.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)
108 changes: 100 additions & 8 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,114 @@
<!doctype html>
<html lang="en">
<head>
<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"
/>
<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"
/>
<meta
http-equiv="X-UA-Compatible"
content="ie=edge"
content="width=device-width, initial-scale=1.0"
/>
<title>Moyo header</title>
<title>Document</title>
<link
rel="stylesheet"
href="./style.css"
href="style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a href="#link-0">
<div class="logo">
<img
src="https://s3-alpha-sig.figma.com/img/833f/9aab/47d660efd384318772b6b8040db831aa?Expires=1715558400&Key-Pair-Id=APKAQ4GOSFWCVNEHN3O4&Signature=IeI5VLwaCRBGI9mZTqEVPjJBQg5JW5NArUpF5mv7jTetxc5xh0hzQ2ZQ8PqPAb3dlZxW5Jjm5GvIK~331JImiSkB81jJ8wLgrDCksYwCh3ZDtYGEDKYaSP-HAd6mbMJu-GqUFAcKU3RyAhlbn4aazhEEOR9Qk5tEExvh69eunqSQdFPrNLkefx0Qu-SWEgYx~KnNMWBZuAVD4y0diX008eVKHOlYipMlGBAAnddSguaRxx4p~RHXwIuBC4fh50Ypq0qezyhXGQRPgHqnS5D85797Xce6d5oDcH2xlQhOrh3f-h5c0OnEY94DCCLjHkcyEfkpBZIGH6vI5ZNqYb-Nxg__"
alt="logo-1"
/>
</div>
</a>

<nav class="nav">
<input
type="checkbox"
class="nav__toggler"
/>

<ul class="nav__list">
<li class="nav__item">
<a
class="nav__link is-active"
href="#link-1"
>
APPLE
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#link-2"
>
SAMSUNG
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#link-3"
>
SMARTPHONES
</a>
</li>
<li class="nav__item">
<a
data-qa="hover"
class="nav__link"
href="#link-4"
>
LAPTOPS & COMPUTERS
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#link-5"
>
GADGETS
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#link-6"
>
TABLETS
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#link-7"
>
PHOTO
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#link-8"
>
VIDEO
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
76 changes: 76 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,79 @@
html {
font-family: Roboto, sans-serif;

font-size: 12px;
font-weight: 500;
line-height: 1.4;
color: #000;
background-color: rgba(22, 22, 23, 0.8);

--header-height: 60px;
}

body {
margin: 0;
}

.header {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
padding-inline: 50px;

backdrop-filter: saturate(1.8) blur(20px);
background-color: #fff;
}

.logo {
img {
width: 40;
}

height: 40;
}

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

display: flex;
}

.nav__toggler {
display: none;
}

.nav__link {
display: flex;
align-items: center;
box-sizing: border-box;
min-height: var(--header-height);
color: inherit;
text-decoration: none;
}

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

.nav__link:hover {
color: #00acdc;
}

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

.is-active::after {
border-radius: 8px;
content: '';
background-color: #00acdc;
height: 4px;
width: 37px;
position: absolute;
left: 0;
bottom: 0;
}
Loading