-
Notifications
You must be signed in to change notification settings - Fork 6.3k
done header #7746
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?
done header #7746
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 |
|---|---|---|
| @@ -1,22 +1,39 @@ | ||
| <!doctype html> | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <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" | ||
| /> | ||
| <title>Moyo header</title> | ||
| <link | ||
| rel="stylesheet" | ||
| href="./style.css" | ||
| /> | ||
| </head> | ||
| <body> | ||
| <h1>Moyo header</h1> | ||
| </body> | ||
| </html> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <title>Moyo Header</title> | ||
|
|
||
| <!-- Подключение CSS --> | ||
| <link rel="stylesheet" href="style.css"> | ||
|
|
||
| <!-- Google Font --> | ||
| <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet"> | ||
| </head> | ||
| <body> | ||
|
|
||
| <header class="header"> | ||
| <a href="#" class="logo"> | ||
| <img src="./images/logo.png" alt="Moyo logo"> | ||
| </a> | ||
|
|
||
| <nav class="nav"> | ||
|
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. You set a height on |
||
| <ul class="nav__list"> | ||
| <li><a href="#" class="nav__link is-active">Apple</a></li> | ||
| <li><a href="#" class="nav__link">Samsung</a></li> | ||
| <li><a href="#" class="nav__link">Smartphones</a></li> | ||
| <li> | ||
| <a href="#" class="nav__link" data-qa="hover"> | ||
| Laptops & computers | ||
| </a> | ||
| </li> | ||
| <li><a href="#" class="nav__link">Gadgets</a></li> | ||
|
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. Selector |
||
| <li><a href="#" class="nav__link">Tablets</a></li> | ||
| <li><a href="#" class="nav__link">Photo</a></li> | ||
| <li><a href="#" class="nav__link">Video</a></li> | ||
| </ul> | ||
| </nav> | ||
| </header> | ||
|
|
||
| </body> | ||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,70 @@ | ||
| body { | ||
| /* Сброс */ | ||
| * { | ||
| margin: 0; | ||
| padding: 0; | ||
| box-sizing: border-box; | ||
| } | ||
|
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 violates checklist item #16: "Do not use the universal |
||
|
|
||
| /* Переменная цвета */ | ||
| :root { | ||
| --blue: #00acdc; | ||
| } | ||
|
|
||
| /* Шрифт */ | ||
| body { | ||
| font-family: 'Roboto', sans-serif; | ||
| } | ||
|
|
||
| /* HEADER */ | ||
| .header { | ||
| height: 60px; /* важно — в одном месте */ | ||
| display: flex; | ||
| justify-content: space-between; | ||
| align-items: center; | ||
| padding: 0 50px; | ||
|
Comment on lines
+14
to
+18
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 violates checklist item #4: "The height must be set for the nav links (not for the header), and this height must be taken from the design." You set |
||
| } | ||
|
|
||
| /* ЛОГО */ | ||
| .logo img { | ||
| height: 40px; | ||
| display: block; | ||
|
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 violates checklist item #17: "Do not use tag names for styling in CSS (except |
||
| } | ||
|
|
||
| /* СПИСОК */ | ||
| .nav__list { | ||
| display: flex; | ||
| list-style: none; | ||
| } | ||
|
|
||
| /* ССЫЛКИ */ | ||
| .nav__link { | ||
| display: flex; | ||
| align-items: center; | ||
| height: 60px; | ||
|
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 violates checklist item #30: "Header height must be set in exactly one place (for the links)." Height is currently defined on both |
||
| margin-left: 20px; | ||
|
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 violates checklist item #28: "There must not be margins before the first and after the last list items in the navigation list." You apply |
||
| text-decoration: none; | ||
| color: #000; | ||
| text-transform: uppercase; | ||
| position: relative; | ||
| } | ||
|
|
||
| /* HOVER */ | ||
| .nav__link:hover { | ||
| color: var(--blue); | ||
| } | ||
|
|
||
| /* АКТИВНЫЙ */ | ||
| .is-active { | ||
| color: var(--blue); | ||
| } | ||
|
|
||
| /* ЛИНИЯ ПОД АКТИВНЫМ */ | ||
| .is-active::after { | ||
| content: ""; | ||
| position: absolute; | ||
| left: 0; | ||
| bottom: 0; | ||
| width: 100%; | ||
| height: 4px; | ||
| background-color: var(--blue); | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.