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 two search bar #3782

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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://OleksiiHolodok.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://OleksiiHolodok.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
48 changes: 46 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html lang="en" class="page">
<head>
<meta charset="UTF-8">
<meta
Expand All @@ -11,6 +11,50 @@
<link rel="stylesheet" href="./style.css">
</head>
<body>
<h1>Search bar airbnb</h1>

<form
class="search__form"
method="post"
data-qa="big"
>
<img
src="./images/Search.svg"
alt="search"
class="icon">

Choose a reason for hiding this comment

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

Suggested change
<img
src="./images/Search.svg"
alt="search"
class="icon">
<img
src="./images/Search.svg"
alt="search"
class="icon"
>

<label
for="biginput"
>
<input
class="search__input"
type="text"
id="biginput"
name="biginput"
data-qa="keypress"
placeholder="Try &quot;Los Angeles&quot;"
>
</label>
</form>

<form
class="search__form search__form--small"
method="post"
data-qa="small"
>
<img
src="./images/Search.svg"
alt="search"
class="icon icon--small">
<label
for="smallinput"
>
<input
class="search__input search__input--small"
type="text"
id="smallinput"
name="smallinput"
placeholder="Try &quot;Los Angeles&quot;"
>
</label>
</form>
</body>
</html>
77 changes: 77 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
@font-face {
font-family: Avenir;
src: url(./fonts/Avenir.ttc);
}

html {
font-family: "Avenir", sans-serif;
}

.search__form {
position: relative;
color: #3d4e61;
margin-top: 20px;
}

.search__input {
box-sizing: border-box;
width: 100%;
padding: 24px 0 22px 62px;
font-size: 16px;
font-family: inherit;
outline: none;
border: 1px solid #e1e7ed;
border-radius: 4px;
box-shadow: 0 1px 8px 0 rgba(61, 78, 97, 0.1);
background: #fff;
}

.search__input--small {
width: 100%;
font-size: 14px;
padding: 11px 0 9px 33px;
}

.icon {
position: absolute;
height: 19px;
width: 19px;
top: 25px;
left: 26px;
}

.icon--small {
height: 11px;
width: 11px;
top: 15px;
left: 13px;
}

.search__input::placeholder {
color: #3d4e61;
}

.search__input:focus::placeholder {
font-style: normal;

Choose a reason for hiding this comment

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

Remove redundant default value

Suggested change
font-style: normal;

font-weight: 300;
text-shadow: none;
}

.search__input:hover {
box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
}

.search__input:focus {
font-weight: 400;
text-shadow: 0 3px 3px rgba(0, 0, 0, 0.25);
background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%);
}

.search__input--small:hover,
.search__input--small:focus {
text-shadow: none;
}

.search__input--small:focus {
font-weight: 900;
}