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 task solution #4547

Closed
wants to merge 2 commits 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://Pagnarith.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://Pagnarith.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
44 changes: 32 additions & 12 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<!doctype html>
<html lang="en">
<html
lang="en"
class="page"
>
<head>
<meta charset="UTF-8" />
<meta
Expand All @@ -16,17 +19,34 @@
href="style.css"
/>
</head>
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<body class="page__body">
<form
class="search-bar search-bar-big"
data-qa="big"
>
<label class="search-bar__label search-bar__label-big">
<input
data-qa="keypress"
class="search-bar__input search-bar__input-big"
type="text"
placeholder="Try “Los Angeles“"
/>
</label>
</form>

<form
class="search-bar search-bar-small"
data-qa="small"
>
<label class="search-bar__label search-bar__label-small">
<input
data-qa="hover"
class="search-bar__input search-bar__input-small"
type="text"
placeholder="Try “Los Angeles“"
/>
</label>
</form>
</body>
</html>
124 changes: 124 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,125 @@
/* 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');
}

.page__body {
font-family: Avenir, 'Helvetica Neue', Arial, sans-serif;
font-size: 16px;
}

.search-bar {
display: flex;
justify-content: center;
gap: 20px;
margin-top: 20px;
margin-left: auto;
margin-right: auto;
}

.search-bar-big {
width: 100%;
min-height: 70px;
}

.search-bar-small {
width: 100%;
min-height: 42px;
}

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

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

.search-bar__label-big::after {
background-image: url(./images/Search.svg);
background-repeat: no-repeat;
background-size: contain;
width: 19px;
height: 19px;
top: 25px;
left: 26px;
}

.search-bar__label-small::after {
background-image: url(./images/Search.svg);
background-repeat: no-repeat;
background-size: contain;
width: 11px;
height: 11px;
top: 15px;
left: 13px;
}

.search-bar__input {
width: 100%;
height: 100%;
border: 1px solid #e1e7ed;
font-family: inherit;
border-radius: 4px;
font-weight: 300;
color: #3d4e61;
box-shadow: 0 1px 8px 0 #3d4e6133;
outline: none;
}

.search-bar__input:hover {
box-shadow: 0 3px 8px 0 #3d4e6133;
}

.search-bar__input:focus {
border: 1px solid #e1e7ed;
background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%);
font-weight: 600;
color: #3d4e61;
}

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

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

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

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

.search-bar__input-small::placeholder {
font-size: 14px;
line-height: 22px;
}
Loading