From 18f0356a0e41c8356486e55c3c4e573bd37a9a85 Mon Sep 17 00:00:00 2001 From: Nikol Nuzhna Date: Fri, 27 Dec 2024 23:48:21 +0100 Subject: [PATCH 1/2] add task solution --- readme.md | 4 +-- src/index.html | 92 +++++++++++++++++++++++++++++++++++++++++++++++++- src/style.css | 68 +++++++++++++++++++++++++++++++++++++ 3 files changed, 161 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index e72b8051e7..27a18156a6 100644 --- a/readme.md +++ b/readme.md @@ -27,8 +27,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://nikol-nuzhna.github.io/layout_moyo-header/) +- [TEST REPORT LINK](https://nikol-nuzhna.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..4a94de39d1 100644 --- a/src/index.html +++ b/src/index.html @@ -10,6 +10,14 @@ http-equiv="X-UA-Compatible" content="ie=edge" /> + + Moyo header -

Moyo header

+ diff --git a/src/style.css b/src/style.css index 293d3b1f13..64c13039ef 100644 --- a/src/style.css +++ b/src/style.css @@ -1,3 +1,71 @@ +a { + text-decoration: none; + color: inherit; +} + +ul, +li { + list-style: none; + margin: 0; + padding: 0; +} + +/* ------------- */ + body { margin: 0; + font-family: Roboto, sans-serif; + font-size: 12px; + background-color: #eee; + font-weight: 500; +} + +.header { + display: flex; + justify-content: space-between; + padding: 0 50px; + background-color: #fff; +} + +.logo { + display: flex; + align-items: center; +} + +.nav { + text-transform: uppercase; +} + +.nav__list { + display: flex; +} + +.nav__item:not(:first-child) { + margin-left: 20px; +} + +.nav__link { + display: flex; + align-items: center; + height: 60px; +} + +.nav__link:hover { + color: #00acdc; +} + +.is-active { + color: #00acdc; + position: relative; +} + +.is-active::after { + content: ''; + bottom: 0; + left: 0; + position: absolute; + height: 4px; + width: 100%; + background-color: #00acdc; + border-radius: 8px; } From cf5b1fa99fe7b8e37d0dba515b236529f0677213 Mon Sep 17 00:00:00 2001 From: Nikol Nuzhna Date: Fri, 27 Dec 2024 23:51:41 +0100 Subject: [PATCH 2/2] create a variable for blue --- src/style.css | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/style.css b/src/style.css index 64c13039ef..b89cd3c67b 100644 --- a/src/style.css +++ b/src/style.css @@ -12,6 +12,10 @@ li { /* ------------- */ +html { + --blue: #00acdc; +} + body { margin: 0; font-family: Roboto, sans-serif; @@ -51,11 +55,11 @@ body { } .nav__link:hover { - color: #00acdc; + color: var(--blue); } .is-active { - color: #00acdc; + color: var(--blue); position: relative; } @@ -66,6 +70,6 @@ body { position: absolute; height: 4px; width: 100%; - background-color: #00acdc; + background-color: var(--blue); border-radius: 8px; }