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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Develop #5338

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
29 changes: 29 additions & 0 deletions .github/workflows/test.yml-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test

on:
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
- name: Upload HTML report(backstop data)
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: report
path: backstop_data
16 changes: 9 additions & 7 deletions package-lock.json

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

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.8.6",
"@mate-academy/scripts": "^1.9.12",
"@mate-academy/stylelint-config": "latest",
"backstopjs": "6.3.23",
"jest": "^29.7.0",
Expand Down
99 changes: 96 additions & 3 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,112 @@
<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,
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="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"
/>
<link
rel="stylesheet"
href="./style.css"
href="style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a
href="index.html"
class="logo__link"
>
<img
src="./images/logo.png"
alt="MOYO logo"
class="logo"
/>
</a>

<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
<a
href="##"
class="nav__link is-active"
>
Apple
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
>
Samsung
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
>
Smartphones
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
data-qa="hover"
>
Laptops & Computers
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
>
Gadgets
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
>
Tablets
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
>
Photo
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
>
Video
</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
98 changes: 98 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,101 @@
body {
margin: 0;
}

:root {
--color-hover: #00acdc;
--color-default: #000;
}

.header {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 12px;
font-family: Roboto, serif;
font-weight: 500;
padding: 0 50px;
}

.logo__link {
width: 40px;
height: 40px;
line-height: 60px;
}

.nav {
display: inline-block;
text-transform: uppercase;
}

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

.nav__item {
position: relative;
}

.nav__link {
display: flex;
text-decoration: none;
height: 60px;
line-height: 60px;
padding: auto 0;
}

.nav__link.is-active {
text-decoration: none;
height: 60px;
line-height: 60px;
}

.nav__link.is-active:link {
color: var(--color-hover);
}

.nav__link.is-active::after {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 4px;
content: '';
background-color: var(--color-hover);
border-radius: 2px;
}

.nav__link.is-active:active {
color: var(--color-hover);
}

.nav__link:link {
color: var(--color-default);
}

.nav__link:visited {
color: var(--color-default);
}

.nav__link:hover {
color: var(--color-hover);
}

.nav__link:active {
color: var(--color-hover);
}
Comment on lines +72 to +90

Choose a reason for hiding this comment

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

combine it all with comma

.nav__link:link,
.nav__link:visited,
........................


.nav__link:active::after {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 4px;
content: '';
background-color: var(--color-hover);
border-radius: 2px;
}
Loading