From 97b121b2148d03d2e3b85fbcac85248e4eb6be16 Mon Sep 17 00:00:00 2001 From: Dmy0 Date: Fri, 20 Dec 2024 16:48:55 +0200 Subject: [PATCH 1/2] add task solution --- readme.md | 5 ++-- src/index.html | 50 +++++++++++++++++++++++++++++++++++- src/style.css | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index e72b8051e7..4c0edb0ff1 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,5 @@ # Moyo header + Create HTML page with the header using `flexbox` based on the [Figma Mockup](https://www.figma.com/file/1sog2rmfyCjnVxkeZ3ptnc/MOYO-%2F-Header?node-id=0%3A1&mode=dev). The page should match the design Pixel Perfect: all the sizes, colors and distanced MUST be the same as on the design. @@ -27,8 +28,8 @@ The page should match the design Pixel Perfect: all the sizes, colors and distan ❗️ Replace `` with your Github username and copy the links to `Pull Request` description: -- [DEMO LINK](https://.github.io/layout_moyo-header/) -- [TEST REPORT LINK](https://.github.io/layout_moyo-header/report/html_report/) +- [DEMO LINK](https://Dmy0.github.io/layout_moyo-header/) +- [TEST REPORT LINK](https://Dmy0.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. diff --git a/src/index.html b/src/index.html index b39fe97123..60d283d551 100644 --- a/src/index.html +++ b/src/index.html @@ -15,8 +15,56 @@ rel="stylesheet" href="./style.css" /> + + + -

Moyo header

+
+ + +
diff --git a/src/style.css b/src/style.css index 293d3b1f13..8c8c34e645 100644 --- a/src/style.css +++ b/src/style.css @@ -1,3 +1,72 @@ +:root { + --link-color: #00acdc; +} + body { + font-family: Roboto, sans-serif; margin: 0; + line-height: 1; +} + +header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 50px; +} + +.logo { + display: flex; + align-items: center; +} + +.logo img { + width: 100%; + height: auto; +} + +a { + text-transform: uppercase; + color: #000; + display: flex; + align-items: center; + justify-content: center; + height: 60px; + font-size: 12px; + font-weight: 500; + text-decoration: none; +} + +a:hover, +a.is-active { + color: var(--link-color); +} + +ul { + list-style: none; + display: flex; + position: relative; + margin: 0; + padding: 0; +} + +li { + margin: 0 10px; + position: relative; +} + +ul li:last-child { + margin-left: 0; +} + +a.is-active::after { + content: ''; + background-color: var(--link-color); + border-radius: 4px; + width: 100%; + height: 4px; + display: block; + position: absolute; + bottom: 0; + left: 0; } From 6cc2bceca5a354a7c7258cea4954c6b1ba8ae053 Mon Sep 17 00:00:00 2001 From: Dmy0 Date: Fri, 20 Dec 2024 18:48:47 +0200 Subject: [PATCH 2/2] add task solution --- src/style.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/style.css b/src/style.css index 8c8c34e645..4af25224a2 100644 --- a/src/style.css +++ b/src/style.css @@ -55,10 +55,14 @@ li { position: relative; } -ul li:last-child { +ul li:first-child { margin-left: 0; } +ul li:last-child { + margin-right: 0; +} + a.is-active::after { content: ''; background-color: var(--link-color);