Skip to content
Open

Develop #5729

Show file tree
Hide file tree
Changes from 4 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
9 changes: 5 additions & 4 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
"keywords": [],
"author": "Mate Academy",
"license": "GPL-3.0",
"dependencies": {},
"devDependencies": {
"@linthtml/linthtml": "^0.9.6",
"@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
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ 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://Oksana-24.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://Oksana-24.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.

Expand Down
99 changes: 98 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,105 @@
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@400;500;700&display=swap"
rel="stylesheet"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<div class="container">
<a
href="./index.html"
class="logo"
>
<img
class="logo__item"
src="./images/logo.png"
alt="Logo"
width="40px"
height="40px"
/>
</a>
<nav class="header__nav">
<ul class="main-nav">
<li class="main-nav__item">
<a
class="main-nav__link is-active"
href="./index.html"
>
APPLE
</a>
</li>
<li class="main-nav__item">
<a
class="main-nav__link"
href="#"
>
SAMSUNG
</a>
</li>
<li class="main-nav__item">
<a
class="main-nav__link"
href="#"
>
SMARTPHONES
</a>
</li>
<li class="main-nav__item">
<a
class="main-nav__link"
href="#"
data-qa="hover"
>
LAPTOPS & COMPUTERS
</a>
</li>
<li class="main-nav__item">
<a
class="main-nav__link"
href="#"
>
GADGETS
</a>
</li>
<li class="main-nav__item">
<a
class="main-nav__link"
href="#"
>
TABLETS
</a>
</li>
<li class="main-nav__item">
<a
class="main-nav__link"
href="#"
>
PHOTO
</a>
</li>
<li class="main-nav__item">
<a
class="main-nav__link"
href="#"
>
VIDEO
</a>
</li>
</ul>
</nav>
</div>
</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 @@
html {
font-family: Roboto, Arial, Helvetica, sans-serif;
font-weight: 500;
font-style: normal;
}

body {
box-sizing: border-box;
margin: 0;
padding: 0;
}

ul {
padding: 0;
margin: 0;
}

li {
list-style: none;
}

/* Menu 1200px */

.container {
display: flex;
align-items: center;
justify-content: center;
padding-left: 50px;
padding-right: 50px;
}

.header {
margin: 0;
height: 60px;
background-color: #fff;
}

.logo {
display: flex;
margin: 0 auto 0 0;
height: 40px;
width: min-content;
}

.main-nav {
display: flex;
height: 60px;
}

.main-nav__link {
position: relative;
display: flex;
justify-content: center;
align-items: center;
font-size: 12px;
line-height: 14px;
height: 100%;
text-decoration: none;
color: #000;
}

.main-nav__item {
height: 100%;
}

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

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

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

.main-nav__link:active {
color: #00acdc;
}

a[data-qa='hover'] {
color: #00acdc;
}

Choose a reason for hiding this comment

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

why do you need it? styles for hover already settled above


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

@media (min-width: 1024px) and (max-width: 1200px) {
a[data-qa='hover'] {
color: #000;

Choose a reason for hiding this comment

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

redundant styles.

}
}
Loading