Skip to content

Commit

Permalink
add search-bar
Browse files Browse the repository at this point in the history
  • Loading branch information
SerhiyPaziyc committed Sep 11, 2024
1 parent e404e31 commit 366b6d0
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 13 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://<SerhiyPaziyc.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://SerhiyPaziyc.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
47 changes: 37 additions & 10 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,43 @@
/>
</head>
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
<div
class="search"
data-qa="big"
>
<button class="search--button">
<img
class="search_img search--img--big"
src="/src/images/Search.svg"
alt="button"
/>
</button>
<input
class="search_txt search--big"
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
</div>

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<div
class="search"
data-qa="small"
>
<button class="search--button">
<img
class="search_img search--img--small"
src="/src/images/Search.svg"
alt="button"
/>
</button>
<input
class="search_txt search--small"
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
src="/src/images/Search.svg"
/>
</div>
</body>
</html>
82 changes: 81 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,81 @@
/* add styles here */
@font-face {
font-family: Avenir;
src: url(/src/fonts/Avenir.ttc);
}

body {
font-family: Avenir, Arial, Helvetica, sans-serif;
}

.search {
display: flex;
align-items: center;
justify-content: center;
margin-top: 20px;
border-radius: 4px;
border: 1px solid #e1e7ed;
box-shadow: 0 1px 8px 0 #3d4e611a;
transition: box-shadow 0.3s ease;
}

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

.search_txt {
padding: 0;
border: none;
outline: none;
color: #3d4e61;
width: 100%;
font-size: 16px;
}

.search_txt:focus {
font-weight: bold;
}

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

.search--big::placeholder,
.search--small::placeholder {
font-family: Avenir, serif;
color: #3d4e61;
}

.search--big {
height: 68px;
font-size: 16px;
}

.search--small {
height: 40px;
font-size: 14px;
}

.search--button {
border: none;
background-color: #fff;
padding: 0;
}

.search_img {
display: flex;
align-items: center;
justify-content: center;
}

.search--img--big {
width: 19px;
height: 19px;
margin: 0 17px 0 26px;
}

.search--img--small {
width: 11px;
height: 11px;
margin: 0 9px 0 13px;
}

0 comments on commit 366b6d0

Please sign in to comment.