From f74273ef23d740c88f1bfde70a330f47fd51fa5c Mon Sep 17 00:00:00 2001 From: MichaelK-jpg Date: Thu, 24 Oct 2024 14:35:00 +0200 Subject: [PATCH 1/2] initial task solution --- readme.md | 4 ++-- src/blocks/big-search.css | 45 +++++++++++++++++++++++++++++++++++++ src/blocks/small-search.css | 45 +++++++++++++++++++++++++++++++++++++ src/index.html | 34 +++++++++++++++++++--------- src/style.css | 22 ++++++++++++++++++ 5 files changed, 138 insertions(+), 12 deletions(-) create mode 100644 src/blocks/big-search.css create mode 100644 src/blocks/small-search.css diff --git a/readme.md b/readme.md index b635aa290b..f2041063bc 100644 --- a/readme.md +++ b/readme.md @@ -25,8 +25,8 @@ ___ ❗️ 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://MichaelK-jpg.github.io/layout_search-bar-airbnb/) +- [TEST REPORT LINK](https://MichaelK-jpg.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. diff --git a/src/blocks/big-search.css b/src/blocks/big-search.css new file mode 100644 index 0000000000..421a86d4e9 --- /dev/null +++ b/src/blocks/big-search.css @@ -0,0 +1,45 @@ +.big-search__input { + font-size: 16px; + margin: 0 auto; + width: 100%; + text-indent: 62px; + border: none; + background-image: url(../images/Search.svg); + background-repeat: no-repeat; + background-size: 19; + background-position: 26 24; +} + +.main__big-search { + display: flex; + box-sizing: border-box; + border-radius: 4px; + margin: 20px 8px 0; + height: 70px; + background: #fff; + border: 1px solid #e1e7ed; + box-shadow: 0 1px 8px 0 #3d4e611a; +} + +.main__big-search:hover { + background: #fff; + border: 1px solid #e1e7ed; + border-radius: 4px; + box-shadow: 0 3px 8px 0 #3d4e6133; +} + +.main__big-search:focus { + background: linear-gradient(180deg, #fff 100%, #f6f6f7 100%); +} + +.big-search__input:focus { + outline: none; + border-radius: 3px; + box-shadow: 1px 4px 4px #00000040; + border: 1px solid #e1e7ed; + background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%); + background-image: url(../images/Search.svg); + background-repeat: no-repeat; + background-size: 19; + background-position: 26 24; +} diff --git a/src/blocks/small-search.css b/src/blocks/small-search.css new file mode 100644 index 0000000000..2754b601a3 --- /dev/null +++ b/src/blocks/small-search.css @@ -0,0 +1,45 @@ +.small-search__input { + font-weight: 400; + font-size: 14px; + margin: 0 auto; + width: 100%; + text-indent: 33px; + border: none; + background-image: url(../images/Search.svg); + background-repeat: no-repeat; + background-size: 11; + background-position: 13 14; +} + +.main__small-search { + display: flex; + box-sizing: border-box; + margin: 20px 8px 0; + height: 42px; + background: #fff; + border: 1px solid #e1e7ed; + border-radius: 4px; + box-shadow: 0 1px 8px 0 #3d4e611a; +} + +.small-search__input:hover { + background: #fff; + border: 1px solid #e1e7ed; + border-radius: 4px; + box-shadow: 0 3px 8px 0 #3d4e6133; + background-image: url(../images/Search.svg); + background-repeat: no-repeat; + background-size: 11; + background-position: 13 14; +} + +.small-search__input:focus { + outline: none; + background: linear-gradient(180deg, #fff 100%, #f6f6f7 100%); + border: 1px solid #e1e7ed; + border-radius: 3px; + background-image: url(../images/Search.svg); + background-repeat: no-repeat; + background-size: 11; + background-position: 13 14; +} diff --git a/src/index.html b/src/index.html index abe507e10c..1024448fe4 100644 --- a/src/index.html +++ b/src/index.html @@ -17,16 +17,30 @@ /> - +
+ - + +
diff --git a/src/style.css b/src/style.css index a63fa10d43..f59c9cd24d 100644 --- a/src/style.css +++ b/src/style.css @@ -1 +1,23 @@ /* add styles here */ + +@import './blocks/big-search.css'; +@import './blocks/small-search.css'; + +* { + margin: 0; + padding: 0; + font-family: Avenir, system-ui; +} + +@font-face { + font-family: Avenir; + src: url(./fonts/Avenir-Book.ttf), url(./fonts/Avenir-Heavy.ttf), + url(./fonts/Avenir.ttc); + font-weight: 300; + font-style: normal; +} + +.main { + display: flex; + flex-direction: column; +} From 2b09abcbc755387b84c303816e803d7da5f77171 Mon Sep 17 00:00:00 2001 From: MichaelK-jpg Date: Thu, 24 Oct 2024 15:33:44 +0200 Subject: [PATCH 2/2] initial solution --- src/blocks/big-search.css | 8 ++++---- src/blocks/small-search.css | 8 ++++---- src/style.css | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/blocks/big-search.css b/src/blocks/big-search.css index 421a86d4e9..6e70d46691 100644 --- a/src/blocks/big-search.css +++ b/src/blocks/big-search.css @@ -6,8 +6,8 @@ border: none; background-image: url(../images/Search.svg); background-repeat: no-repeat; - background-size: 19; - background-position: 26 24; + background-size: 19px; + background-position: 26px 24px; } .main__big-search { @@ -40,6 +40,6 @@ background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%); background-image: url(../images/Search.svg); background-repeat: no-repeat; - background-size: 19; - background-position: 26 24; + background-size: 19px; + background-position: 26px 24px; } diff --git a/src/blocks/small-search.css b/src/blocks/small-search.css index 2754b601a3..fbec84550b 100644 --- a/src/blocks/small-search.css +++ b/src/blocks/small-search.css @@ -29,8 +29,8 @@ box-shadow: 0 3px 8px 0 #3d4e6133; background-image: url(../images/Search.svg); background-repeat: no-repeat; - background-size: 11; - background-position: 13 14; + background-size: 11px; + background-position: 13px 14px; } .small-search__input:focus { @@ -40,6 +40,6 @@ border-radius: 3px; background-image: url(../images/Search.svg); background-repeat: no-repeat; - background-size: 11; - background-position: 13 14; + background-size: 11px; + background-position: 13px 14px; } diff --git a/src/style.css b/src/style.css index f59c9cd24d..d37cfd73d2 100644 --- a/src/style.css +++ b/src/style.css @@ -7,16 +7,16 @@ margin: 0; padding: 0; font-family: Avenir, system-ui; + font-weight: 300; } @font-face { font-family: Avenir; src: url(./fonts/Avenir-Book.ttf), url(./fonts/Avenir-Heavy.ttf), url(./fonts/Avenir.ttc); - font-weight: 300; - font-style: normal; } + .main { display: flex; flex-direction: column;