diff --git a/readme.md b/readme.md index b635aa290b..2c93f50647 100644 --- a/readme.md +++ b/readme.md @@ -1,13 +1,17 @@ # Search bar for Airbnb + > Here are the [Layout Tasks Instructions](https://mate-academy.github.io/layout_task-guideline/#how-to-solve-the-layout-tasks-on-github) -___ + +--- ## The task + > Create HTML page with two search bars as designed in [the mockup](https://www.figma.com/file/kf3AWulK9elrNk34wtpjPw/Airbnb-Search-bar?node-id=0%3A1). This search bar will be part of big project. ![screenshot](./references/search-bar-example.png) ### Requirements: + - use images from [src/images](src/images) - there must be two search bars - search bar must stretch the full width @@ -20,13 +24,15 @@ ___ - use `@font-face` for fonts - add attribute `data-qa="big"` for big search form, and `data-qa="small"` for small - add attribute `data-qa="keypress"` to input in big search form + --- + ## Checklist ❗️ 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://labelsavchuk.github.io/layout_search-bar-airbnb/) +- [TEST REPORT LINK](https://labelsavchuk.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/index.html b/src/index.html index abe507e10c..bd4050e60b 100644 --- a/src/index.html +++ b/src/index.html @@ -1,5 +1,8 @@ - + - +
+ +
- +
+ +
diff --git a/src/style.css b/src/style.css index a63fa10d43..72dc3bb332 100644 --- a/src/style.css +++ b/src/style.css @@ -1 +1,82 @@ -/* 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__search { + margin-top: 20px; + + --back-color-focus: linear-gradient(180deg, #fff 0%, #f6f6f7 100%); +} + +.search-bar { + box-sizing: border-box; + position: relative; + display: flex; + width: 100%; + height: 70px; +} + +.search-bar::after { + position: absolute; + display: block; + background-image: url(./images/Search.svg); + background-size: contain; + background-repeat: no-repeat; + background-position: center; + top: 25px; + left: 26px; + width: 19px; + height: 19px; + content: ''; +} + +.search-bar--small { + height: 42px; +} + +.search-bar--small::after { + top: 15px; + left: 13px; + width: 11px; + height: 11px; +} + +.search-bar__input { + flex: 1; + box-sizing: border-box; + border: 1px solid #e1e7ed; + border-radius: 4px; + box-shadow: 0 1px 8px 0 #3d4e611a; + padding: 0; + outline: none; + + color: #3d4e61; + font-family: Avenir, sans-serif; + font-size: 16px; + line-height: 22px; + + padding-left: 62px; +} + +.search-bar__input--small { + padding-left: 33px; + font-size: 14px; + font-weight: 400; + line-height: 19.12px; +} + +.search-bar:hover { + box-shadow: 0 3px 8px 0 #3d4e6133; +} + +.search-bar__input:focus { + background-color: var(--back-color-focus); + box-shadow: 0 4px 4px 0 var(--shadow-focus-color); +}