From 153026e3e603dbd3ac0f6a662da46a1578ece3a7 Mon Sep 17 00:00:00 2001 From: Bilokon Yaroslav Date: Tue, 7 Jan 2025 20:58:44 +0200 Subject: [PATCH 1/2] make searc-bar --- readme.md | 12 ++--- src/images/search-small.svg | 3 ++ src/index.html | 38 +++++++++++----- src/style.css | 89 +++++++++++++++++++++++++++++++++++++ 4 files changed, 125 insertions(+), 17 deletions(-) create mode 100644 src/images/search-small.svg diff --git a/readme.md b/readme.md index b635aa290b..0a1b88d4aa 100644 --- a/readme.md +++ b/readme.md @@ -25,12 +25,12 @@ ___ ❗️ Replace `` with your Github username and copy the links to `Pull Request` description: -- [DEMO LINK](https://.github.io/layout_search-bar-airbnb/) -- [TEST REPORT LINK](https://.github.io/layout_search-bar-airbnb/report/html_report/) +- [DEMO LINK](https://kepchuk1234.github.io/layout_search-bar-airbnb/) +- [TEST REPORT LINK](https://kepchuk1234.github.io/layout_search-bar-airbnb/report/html_report/) ❗️ Copy this `Checklist` to the `Pull Request` description after links, and put `- [x]` before each point after you checked it. -- [ ] Icon implemented using background-image CSS property -- [ ] Inputs are written inside of 'form' tag with correctly passed attributes -- [ ] All `Typical Mistakes` from `BEM` lesson theory are checked. -- [ ] Code follows all the [Code Style Rules ❗️](./checklist.md) +- [x] Icon implemented using background-image CSS property +- [x] Inputs are written inside of 'form' tag with correctly passed attributes +- [x] All `Typical Mistakes` from `BEM` lesson theory are checked. +- [x] Code follows all the [Code Style Rules ❗️](./checklist.md) diff --git a/src/images/search-small.svg b/src/images/search-small.svg new file mode 100644 index 0000000000..47fc3c9964 --- /dev/null +++ b/src/images/search-small.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/index.html b/src/index.html index abe507e10c..fbb0958c22 100644 --- a/src/index.html +++ b/src/index.html @@ -16,17 +16,33 @@ href="style.css" /> - - + +
+ +
- +
+ +
diff --git a/src/style.css b/src/style.css index a63fa10d43..8ee0061a67 100644 --- a/src/style.css +++ b/src/style.css @@ -1 +1,90 @@ /* add styles here */ +@font-face { + font-family: Avenir; + src: url(./fonts/Avenir-Book.ttf); +} + +@font-face { + font-family: Avenir; + src: url(./fonts/Avenir-Heavy.ttf); + font-weight: bold; +} + +.page { + margin-top: 0; + color: #3d4e61; +} + +.form { + display: flex; + flex-direction: column; + margin-top: 20px; + padding: 0; +} + +.form__searc { + display: flex; + box-sizing: border-box; + padding-left: 62px; + height: 70px; + border: 1px solid #e1e7ed; + border-radius: 4px; + box-shadow: 0 1px 8px 0 #3d4e611a; + + background-image: url(./images/Search.svg); + background-repeat: no-repeat; + background-position: 25px 24px; + + font-family: Avenir, sans-serif; +} + +.form__searc:hover { + box-shadow: 0 3px 8px 0 #3d4e6133; +} + +.form__searc:focus { + box-shadow: 0 4px 4px 0 #00000040; + outline: none; + + font-weight: bold; + color: #3d4e61; + text-shadow: 0 4px 4px 0 #00000040; +} + +.form__searc::placeholder { + position: absolute; + top: 50%; + transform: translateY(-50%); + font-weight: normal; + text-shadow: none; + font-size: 16px; + line-height: 22px; + color: #3d4e61; + font-family: Avenir, sans-serif; +} + +.form__searc--small { + height: 42px; + padding-left: 33px; + + background-image: url(./images/search-small.svg); + background-repeat: no-repeat; + background-position: 12px 14px; + + font-size: 14px; +} + +.form__searc--small::placeholder { + /* text-shadow: 0 4px 4px 0 #00000040; */ + font-size: 14px; +} + +.form__searc--small:hover::placeholder { + text-shadow: none; + font-size: 14px; +} + +.form__searc--small:focus { + text-shadow: none; + font-size: 14px; +} From 7ba5226c77261e0c648997357bf676562b0ec8a9 Mon Sep 17 00:00:00 2001 From: Bilokon Yaroslav Date: Tue, 7 Jan 2025 21:07:21 +0200 Subject: [PATCH 2/2] fix class name --- src/index.html | 4 ++-- src/style.css | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/index.html b/src/index.html index fbb0958c22..898823263e 100644 --- a/src/index.html +++ b/src/index.html @@ -24,7 +24,7 @@ data-qa="big" >