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

add resolve for search bar #3444

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
@@ -1,7 +1,7 @@
# Search bar for Airbnb
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://Anton201220.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://Anton201220.github.io/layout_search-bar-airbnb/report/html_report/)

> Follow [this instructions](https://mate-academy.github.io/layout_task-guideline/#how-to-solve-the-layout-tasks-on-github)

Expand Down
38 changes: 36 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,47 @@
<meta charset="UTF-8">
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
content="width=device-width,
user-scalable=no,
initial-scale=1.0,
maximum-scale=1.0,
minimum-scale=1.0"
>
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Search bar airbnb</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<h1>Search bar airbnb</h1>

<form
action="#"
method="post"
data-qa="big"
class="search-form"
>
<input
type="text"
name="searchBig"
class="input"
data-qa="keypress"
placeholder="Try &quot;Los Angeles&quot;"
>
</form>

<form
action="#"
method="post"
data-qa="small"
class="search-form search-form--sm"
>
<input
type="text"
name="searchSmall"
class="input input--sm"
placeholder="Try &quot;Los Angeles&quot;"
>
</form>

</body>
Comment on lines +46 to 48

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
</form>
</body>
</form>
</body>

don't add spaces between child and parent elements

</html>

85 changes: 85 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
@font-face {
font-family: "Avenir";
src: url(./fonts/Avenir-Book.ttf);
font-weight: 300;
}
@font-face {
font-family: "Avenir";
src: url(./fonts/Avenir-Heavy.ttf);
font-weight: 700;
}

html {
--border-color: #e1e7ed;
--background-color: #fff;
--font-color: #3d4e61;
font-family: "Avenir", Arial, sans-serif;
font-weight: 300;
font-size: 16px;
}

.search-form {
margin-top: 20px;
position: relative;
}

.search-form::before {
content: "";
position: absolute;
background-image: url("./images/Search.svg");
background-position: center;
background-size: cover;
background-repeat: no-repeat;
height: 19px;
width: 19px;
top: 25px;
left: 26px;
}

.search-form--sm::before {
width: 11px;
height: 11px;
top: 15px;
left: 13px;
}

.input {
width: 100%;
box-sizing: border-box;
font-family: "Avenir", Arial, sans-serif;
font-weight: 700;

border-radius: 4px;
border: 1px solid var(--border-color);
background: var(--background-color);
box-shadow: 0 1px 8px 0 rgba(61, 78, 97, 0.1);

height: 70px;
padding-left: 62px;
font-size: 16px;
}

.input--sm {
height: 42px;
font-size: 14px;
padding-left: 33px;
}

.input::placeholder {
font-family: "Avenir", Arial, sans-serif;
font-weight: 300;
color: var(--font-color);

}

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

}

.input:focus {
outline: none;
border-radius: 3px;
background: linear-gradient(180deg, var(--background-color) 0%, #f6f6f7 100%);
color: var(--font-color);
}
Loading