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

'commit' #580

Open
wants to merge 2 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
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,11 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm install
- run: npm start & sleep 5 && npm test
- name: Upload HTML report(backstop data)
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: report
path: backstop_data
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ node_modules
# Generated files
backstop_data
dist
.cache
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/bemlint": "^0.1.1",
"@mate-academy/eslint-config": "*",
"@mate-academy/linthtml-config": "0.0.1",
"@mate-academy/scripts": "^0.2.0",
"@mate-academy/scripts": "^0.8.4",
"@mate-academy/stylelint-config": "*",
"backstopjs": "^5.0.1",
"eslint": "^5.16.0",
Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Moyo header
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://ViPiven.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://ViPiven.github.io/layout_moyo-header/report/html_report/)

> Follow [this instructions](https://github.com/mate-academy/layout_task-guideline#how-to-solve-the-layout-tasks-on-github)
___
Expand All @@ -24,7 +24,7 @@ Create HTML page with the header using `flexbox` basing on [this mockup](https:/
- change links styles on `:hover`
- follow styles from the mock
- the link with `blue` color and line below is an active link. It should have `class="is-active"` and relevant styles.
- the link with only `blue` color is an example of `:hover` styles. Every link in the row should have `blue` color on `:hover`.
- the link with only `blue` color is an example of `:hover` styles. Every link in the row should have `blue` color on `:hover`.
- add `data-qa="hover"` attribute to the 4th link for testing (`Ноутбуки и компьютеры`)
---

Expand Down
64 changes: 53 additions & 11 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,56 @@
<!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>
<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">

Choose a reason for hiding this comment

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

Suggested change
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<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">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet">
</head>
<body>
<header class="header">
<a href="#"
class="header__logo"
>
<img src="images/logo.png"
alt="Moyo-logo"
>

Choose a reason for hiding this comment

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

Suggested change
<img src="images/logo.png"
alt="Moyo-logo"
>
<img src="images/logo.png" alt="Moyo-logo">

</a>
<nav class="nav">
<ul class="nav__list">
<li class="nav__link">
<a href="#" class="nav__item is-active">Apple</a>
</li>
<li class="nav__link">
<a href="#" class="nav__item">Samsung</a>
</li>
<li class="nav__link">
<a href="#" class="nav__item">Смартфоны и телефоны</a>
</li>
<li class="nav__link">
<a href="#"
class="nav__item"
data-qa="hover"
>

Choose a reason for hiding this comment

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

Suggested change
<a href="#"
class="nav__item"
data-qa="hover"
>
<a
href="#"
class="nav__item"
data-qa="hover"
>

ноутбуки и компьютеры
</a>
</li>
<li class="nav__link">
<a href="#" class="nav__item">гаджеты</a>
</li>
<li class="nav__link"><a href="#" class="nav__item">планшеты</a>
</li>
<li class="nav__link">
<a href="#" class="nav__item">фото</a>
</li>
<li class="nav__link">
<a href="#" class="nav__item">видео</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
80 changes: 80 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
* {
box-sizing: border-box;
}

body {
margin: 0;
font-family: "Roboto", sans-serif;
font-weight: 500;
}

.header {
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);
}

.header__logo {
width: 40px;
height: 40px;
align-self: center;
}

.nav__list {
display: flex;
justify-content: space-between;
margin: 0;
padding: 0;
flex-direction: row;
list-style: none;
}

.nav__link {
margin-right: 20px;
}

.nav__item {
position: relative;
display: flex;
height: 60px;
line-height: 60px;
white-space: nowrap;
font-family: Roboto, sans-serif;
font-weight: 500;
font-size: 12px;
text-decoration: none;
text-transform: uppercase;
color: #000;
}

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

.nav__link:last-child,
.nav__link:last-child .nav__item {
margin-right: 0;
}

Choose a reason for hiding this comment

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

Suggested change
.nav__link:last-child,
.nav__link:last-child .nav__item {
margin-right: 0;
}
.nav__link:last-child {
margin-right: 0;
}


.nav__item:after {
content: "";
position: absolute;
right: 0;
bottom: 0;
left: 0;
height: 4px;
background-color: #00acdc;
border-radius: 8px;
opacity: 0;
}

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

Choose a reason for hiding this comment

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

Suggested change
.nav__item.is-active {
color: #00acdc;
}
.nav__item.is-active,
.nav__item:hover {
color: #00acdc;
}

Don't repeat yourself


.nav__item.is-active:after {
opacity: 1;

Choose a reason for hiding this comment

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

why do you need this?

}