Skip to content

Commit

Permalink
add task solution
Browse files Browse the repository at this point in the history
  • Loading branch information
LX-y-ka committed Aug 29, 2024
1 parent afacaf6 commit 4832869
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 5 deletions.
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://LX-y-ka.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://LX-y-ka.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
8 changes: 5 additions & 3 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@
</head>
<body>
<input
type="text"
data-qa="keypress"
class="search-bar search-bar--big"
type="search"
data-qa="big"
placeholder="Try “Los Angeles“"
/>

<input
class="search-bar search-bar--small"
type="text"
data-qa="hover"
data-qa="small"
placeholder="Try “Los Angeles“"
/>
</body>
Expand Down
106 changes: 106 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,107 @@
/* add styles here */
@font-face {
font-family: Avenir-Book;
src: url('fonts/Avenir-Book.ttf');
}

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

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
padding-left: 8px;
padding-right: 8px;
}

.search-bar--big {
height: 70px;
width: 100%;
padding: 25px 25px 25px 62px;
margin-top: 20px;

font-family: Avenir-Book, sans-serif;
color: #3d4e61;
font-weight: 300;
font-size: 16px;

background-image: url(images/Search.svg);
background-position: 26px center;
background-size: 19px 19px;
background-repeat: no-repeat;

border: 1px solid #e1e7ed;
border-radius: 4px;
box-shadow: 0 1px 8px rgba(61, 78, 97, 0.1);
}

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

.search-bar--big:focus {
background: url(images/Search.svg),
linear-gradient(180deg, #fff 0%, #f6f6f7 100%);
background-position: 26px center;
background-size: 19px 19px;
background-repeat: no-repeat;
outline: 1px solid #e1e7ed;
font-family: Avenir-Heavy, sans-serif;
}

.search-bar--big::placeholder {
font-family: Avenir-Book, sans-serif;
color: #3d4e61;
font-weight: 300;
font-size: 16px;
}

.search-bar--small {
margin-top: 20px;
height: 42px;
width: 100%;
padding: 10px 10px 10px 33px;

font-family: Avenir-Book, sans-serif;
color: #3d4e61;
font-weight: 300;
font-size: 14px;

background-image: url(images/Search.svg);
background-position: 13px center;
background-size: 11px 11px;
background-repeat: no-repeat;

border: 1px solid #e1e7ed;
box-shadow: 0 1px 8px rgba(61, 78, 97, 0.1);
border-radius: 4px;
}

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

.search-bar--small:focus {
background: url(images/Search.svg),
linear-gradient(180deg, #fff 0%, #f6f6f7 100%);
background-position: 13px center;
background-size:
11px 11px,
auto;
background-repeat: no-repeat;
outline: 1px solid #e1e7ed;
font-family: Avenir-Heavy, sans-serif;
}

.search-bar--small::placeholder {
font-family: Avenir-Book, sans-serif;
color: #3d4e61;
font-weight: 300;
font-size: 14px;
}

0 comments on commit 4832869

Please sign in to comment.