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

Created search bars #3771

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ ___

❗️ 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://OstTomash.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://OstTomash.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
33 changes: 32 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,37 @@
<link rel="stylesheet" href="./style.css">
</head>
<body>
<h1>Search bar airbnb</h1>
<form
action="/"
method="GET"
data-qa="big"
class="form"
>
<label class="form__label">
<input
type="text"
name="bigSearch"
class="form__input"
data-qa="keypress"
placeholder="Try &quot;Los Angeles&quot;"
>
</label>
</form>

<form
action="/"
method="GET"
data-qa="small"
class="form form__small"
>
<label class="form__label label_small">
<input
type="text"
name="lessSearch"
class="form__input form__input--small"
placeholder="Try &quot;Los Angeles&quot;"
>
</label>
</form>
</body>
</html>
95 changes: 95 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
* {
box-sizing: border-box;
padding: 0;
}

@font-face {
font-family: "Avenir";
src: url("./fonts/Avenir-Book.ttf");
}

@font-face {
font-family: "AvenirHeavy";
src: url("./fonts/Avenir-Heavy.ttf");
}

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

.form {
margin: 20px auto;
display: flex;
justify-content: center;
width: 100%;
height: 70px;
}

.form__small {
height: 42px;
}

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

.form__label:after {
position: absolute;
content: "";
display: block;
background-image: url("./images/Search.svg");
background-repeat: no-repeat;
background-size: contain;
width: 20px;
height: 20px;
top: 25px;
left: 25px;
}

.label_small:after {
width: 10px;
height: 10px;
top: 15px;
left: 15px;
}

.form__input {
font-family: "Avenir", sans-serif;
width: 100%;
height: 100%;
border: 1px solid #e1e7ed;
border-radius: 5px;
color: #3d4e61;
font-weight: 300;
box-shadow: 0 1px 8px rgba(61, 78, 97, 0.1);
padding-left: 62px;
font-size: 16px;
line-height: 22px;
outline: none;
}

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

.form__input::placeholder {
font-family: "Avenir", sans-serif;
color: inherit;
font-weight: 300;
}

.form__input:focus {
background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%);
font-weight: 700;
border: 1px solid #e1e7ed;
}

.form__input--small {
padding-left: 33px;
font-size: 14px;
line-height: 19px;
}
Loading