Skip to content

Commit 022b049

Browse files
committed
add task solution
1 parent f2d4745 commit 022b049

File tree

3 files changed

+162
-3
lines changed

3 files changed

+162
-3
lines changed

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ The page should match the design Pixel Perfect: all the sizes, colors and distan
2727

2828
❗️ Replace `<your_account>` with your Github username and copy the links to `Pull Request` description:
2929

30-
- [DEMO LINK](https://<your_account>.github.io/layout_moyo-header/)
31-
- [TEST REPORT LINK](https://<your_account>.github.io/layout_moyo-header/report/html_report/)
30+
- [DEMO LINK](https://annazavarova.github.io/layout_moyo-header/)
31+
- [TEST REPORT LINK](https://annazavarova.github.io/layout_moyo-header/report/html_report/)
3232

3333
❗️ Copy this `Checklist` to the `Pull Request` description after links, and put `- [x]` before each point after you checked it.
3434

src/index.html

Lines changed: 91 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,98 @@
1515
rel="stylesheet"
1616
href="./style.css"
1717
/>
18+
19+
<link
20+
rel="preconnect"
21+
href="https://fonts.googleapis.com"
22+
/>
23+
24+
<link
25+
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"
26+
rel="stylesheet"
27+
/>
1828
</head>
1929
<body>
20-
<h1>Moyo header</h1>
30+
<header class="header">
31+
<a
32+
href="#"
33+
class="logo"
34+
>
35+
<img
36+
src="images/logo.png"
37+
alt="logo"
38+
/>
39+
</a>
40+
41+
<nav class="nav">
42+
<ul class="nav__list">
43+
<li class="nav__item">
44+
<a
45+
href="#"
46+
class="nav__link is-active"
47+
>
48+
Apple
49+
</a>
50+
</li>
51+
<li class="nav__item">
52+
<a
53+
href="#"
54+
class="nav__link"
55+
>
56+
Samsung
57+
</a>
58+
</li>
59+
<li class="nav__item">
60+
<a
61+
href="#"
62+
class="nav__link"
63+
>
64+
Smartphones
65+
</a>
66+
</li>
67+
<li class="nav__item">
68+
<a
69+
href="#"
70+
class="nav__link"
71+
data-qa="hover"
72+
>
73+
Laptops & Computers
74+
</a>
75+
</li>
76+
<li class="nav__item">
77+
<a
78+
href="#"
79+
class="nav__link"
80+
>
81+
Gadgets
82+
</a>
83+
</li>
84+
<li class="nav__item">
85+
<a
86+
href="#"
87+
class="nav__link"
88+
>
89+
Tablets
90+
</a>
91+
</li>
92+
<li class="nav__item">
93+
<a
94+
href="#"
95+
class="nav__link"
96+
>
97+
Photo
98+
</a>
99+
</li>
100+
<li class="nav__item">
101+
<a
102+
href="#"
103+
class="nav__link"
104+
>
105+
Video
106+
</a>
107+
</li>
108+
</ul>
109+
</nav>
110+
</header>
21111
</body>
22112
</html>

src/style.css

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,72 @@
1+
:root {
2+
--main-color: #00acdc;
3+
}
4+
15
body {
26
margin: 0;
7+
box-sizing: border-box;
8+
}
9+
10+
.header {
11+
display: flex;
12+
background-color: #fff;
13+
justify-content: space-between;
14+
align-items: center;
15+
padding: 0 50px;
16+
}
17+
18+
.logo {
19+
width: 40px;
20+
height: 40px;
21+
}
22+
23+
.nav__list {
24+
display: flex;
25+
list-style-type: none;
26+
margin: 0;
27+
padding: 0;
28+
}
29+
30+
.nav__item:not(:last-child) {
31+
margin-right: 20px;
32+
}
33+
34+
.nav__link {
35+
height: 60px;
36+
line-height: 60px;
37+
font-family: Roboto, sans-serif;
38+
font-weight: 500;
39+
font-size: 12px;
40+
text-align: center;
41+
text-transform: uppercase;
42+
color: #000;
43+
text-underline-position: from-font;
44+
text-decoration-skip-ink: none;
45+
text-decoration: none;
46+
display: inline-block;
47+
transition:
48+
color 0.5s,
49+
border-color 0.5s;
50+
}
51+
52+
.nav__link:hover {
53+
color: var(--main-color);
54+
}
55+
56+
a.is-active {
57+
position: relative;
58+
color: var(--main-color);
59+
}
60+
61+
.is-active::after {
62+
content: '';
63+
display: block;
64+
width: 100%;
65+
height: 4px;
66+
background-color: var(--main-color);
67+
position: absolute;
68+
top: 56px;
69+
bottom: 0;
70+
left: 0;
71+
border-radius: 8px;
372
}

0 commit comments

Comments
 (0)