Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #4385

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Develop #4385

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions backstop_data/engine_scripts/cookies.json

This file was deleted.

39 changes: 0 additions & 39 deletions backstop_data/engine_scripts/puppet/clickAndHoverHelper.js

This file was deleted.

29 changes: 0 additions & 29 deletions backstop_data/engine_scripts/puppet/loadCookies.js

This file was deleted.

3 changes: 0 additions & 3 deletions backstop_data/engine_scripts/puppet/onBefore.js

This file was deleted.

6 changes: 0 additions & 6 deletions backstop_data/engine_scripts/puppet/onReady.js

This file was deleted.

12 changes: 9 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 `<your_account>` with your Github username and copy the links to `Pull Request` description:

- [DEMO LINK](https://<your_account>.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://<your_account>.github.io/layout_search-bar-airbnb/report/html_report/)
- [DEMO LINK](https://vanvalera.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://vanvalera.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.

Expand Down
38 changes: 27 additions & 11 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,32 @@
/>
</head>
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<div class="search-bar">
<form
class="search-form search-form__big"
data-qa="big"
>
<label class="search-form__label search-form__label_big">
<input
type="text"
placeholder="Try “Los Angeles”"
class="search-form__input search-form__input_big"
data-qa="keypress"
/>
</label>
</form>
<form
class="search-form search-form_small"
data-qa="small"
>
<label class="search-form__label search-form__label_small">
<input
type="text"
placeholder="Try “Los Angeles”"
class="search-form__input search-form__input_small"
/>
</label>
</form>
</div>
</body>
</html>
121 changes: 120 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,120 @@
/* add styles here */
* {
padding: 0;
box-sizing: border-box;
}

@font-face {
font-family: Avenir;
font-weight: 300;
font-style: normal;
src: url('./fonts/Avenir-Book.ttf') format('truetype');
}

@font-face {
font-family: Avenir;
font-weight: 600;
font-style: normal;
src: url('./fonts/Avenir-Heavy.ttf') format('truetype');
}

body {
font-family: Avenir, sans-serif;
font-size: 16px;
}

.search-form {
display: flex;
justify-content: center;
margin: 20px auto 0;
}

.search-form__big {
width: 100%;
height: 70px;
}

.search-form_small {
width: 100%;
height: 42px;
}

.search-form__label {
position: relative;
display: block;
width: 100%;
}

.search-form__label::after {
position: absolute;
content: '';
display: block;
}

.search-form__label_big::after {
background-image: url('./images/Search.svg');
background-repeat: no-repeat;
background-size: contain;
width: 19px;
height: 19px;
top: calc(50% - 9.5px);
left: 26px;
}

.search-form__label_small::after {
background-image: url('./images/Search.svg');
background-repeat: no-repeat;
background-size: contain;
width: 11px;
height: 11px;
top: calc(50% - 5.5px);
left: 13px;
}

.search-form__input {
width: 100%;
height: 100%;
border: 1px solid #e1e7ed;
border-radius: 4px;
color: #3d4e61;
font-weight: 300;
font-family: inherit;
box-shadow: 0 1px 8px rgba(61, 78, 97, 0.1);
outline: none;
}

.search-form__input:hover {
box-shadow: 0 3px 8px rgba(61, 78, 97, 0.2);
}

.search-form__input_big {
padding-left: 62px;
font-size: 16px;
line-height: 22px;
}

.search-form__input_small {
padding-left: 33px;
font-size: 14px;
line-height: 19px;
}

.search-form__input::placeholder {
color: inherit;
font-weight: 300;
}

.search-form__input_big::placeholder {
font-size: 16px;
line-height: 22px;
}

.search-form__input_small::placeholder {
font-size: 14px;
line-height: 22px;
}

.search-form__input:focus {
background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%);
border-radius: 3px;
font-weight: 600;
}
Loading