-
Notifications
You must be signed in to change notification settings - Fork 6k
added header with navigation #7271
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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" | ||
| crossorigin="anonymous" | ||
| /> | ||
| <link | ||
| href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" | ||
| rel="stylesheet" | ||
| /> | ||
| </head> | ||
| <body> | ||
| <h1>Moyo header</h1> | ||
| <header class="header"> | ||
| <a href="#home-page"> | ||
| <img | ||
| class="logo" | ||
| src="/src/images/logo.png" | ||
| alt="logo" | ||
|
||
| /> | ||
| </a> | ||
|
|
||
| <nav class="nav"> | ||
| <ul class="nav-list"> | ||
| <li class="nav-item"> | ||
| <a | ||
| class="nav-link is-active" | ||
| href="#apple" | ||
| > | ||
| Apple | ||
| </a> | ||
| </li> | ||
| <li class="nav-item"> | ||
| <a | ||
| class="nav-link" | ||
| href="#samsung" | ||
| > | ||
| Samsung | ||
| </a> | ||
| </li> | ||
| <li class="nav-item"> | ||
| <a | ||
| class="nav-link" | ||
| href="#smartphones" | ||
| > | ||
| Smartphones | ||
| </a> | ||
| </li> | ||
| <li class="nav-item"> | ||
| <a | ||
| class="nav-link" | ||
| data-qa="hover" | ||
| href="#laptops-&-computers" | ||
| > | ||
| Laptops & Computers | ||
| </a> | ||
| </li> | ||
| <li class="nav-item"> | ||
| <a | ||
| class="nav-link" | ||
| href="#gadgets" | ||
| > | ||
| Gadgets | ||
| </a> | ||
| </li> | ||
| <li class="nav-item"> | ||
| <a | ||
| class="nav-link" | ||
| href="#tablets" | ||
| > | ||
| Tablets | ||
| </a> | ||
| </li> | ||
| <li class="nav-item"> | ||
| <a | ||
| class="nav-link" | ||
| href="#photo" | ||
| > | ||
| Photo | ||
| </a> | ||
| </li> | ||
| <li class="nav-item"> | ||
| <a | ||
| class="nav-link" | ||
| href="#video" | ||
| > | ||
| Video | ||
| </a> | ||
| </li> | ||
| </ul> | ||
| </nav> | ||
| </header> | ||
| </body> | ||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,83 @@ | ||
| :root { | ||
| --color: #00acdc; | ||
| } | ||
|
|
||
| html { | ||
| font-family: Roboto, sans-serif; | ||
| font-weight: 500; | ||
| font-size: 12px; | ||
| text-transform: uppercase; | ||
| } | ||
|
|
||
| body { | ||
| margin: 0; | ||
| padding: 0; | ||
| } | ||
|
|
||
| .header { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| align-items: center; | ||
| padding: 0 50px; | ||
| } | ||
|
|
||
| .logo { | ||
| padding: 0; | ||
| height: 40px; | ||
| width: 40px; | ||
| display: block; | ||
| } | ||
|
|
||
| .nav-list { | ||
| display: flex; | ||
| margin: 0; | ||
| padding: 0; | ||
| } | ||
|
|
||
| .nav-list:first-child { | ||
| margin-left: 0; | ||
| } | ||
|
||
|
|
||
| .nav-item { | ||
| display: flex; | ||
| list-style: none; | ||
| } | ||
|
|
||
| .nav-item + .nav-item { | ||
| margin-left: 20px; | ||
| } | ||
|
|
||
| .nav-link { | ||
| display: flex; | ||
| text-decoration: none; | ||
| position: relative; | ||
| align-items: center; | ||
| height: 60px; | ||
| color: black; | ||
|
Comment on lines
46
to
53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| } | ||
|
|
||
| .nav-link:hover { | ||
| color: var(--color); | ||
| } | ||
|
|
||
| .is-active { | ||
| color: var(--color); | ||
| } | ||
|
|
||
| .nav-link.is-active::after { | ||
| position: absolute; | ||
| left: 0; | ||
| right: 0; | ||
| bottom: 0; | ||
| width: 100%; | ||
| content: ''; | ||
| height: 4px; | ||
| border-radius: 8px; | ||
| background-color: var(--color); | ||
| } | ||
|
|
||
| @media (max-width: 1024px) { | ||
| .nav__item { | ||
| margin-right: 20px; | ||
| } | ||
|
Comment on lines
76
to
79
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a class-name typo that breaks responsive rules and violates the checklist item: "Code follows all the Code Style Rules ❗️ (./checklist.md)" — the media query targets |
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line exceeds the 80-character limit specified in the code style requirements. While long URLs can sometimes be an exception, it's a good practice to be mindful of this rule.