Skip to content

Commit

Permalink
add task solution
Browse files Browse the repository at this point in the history
  • Loading branch information
OlhaLishenko committed Oct 5, 2024
1 parent b64f3c5 commit c9a598a
Show file tree
Hide file tree
Showing 3 changed files with 133 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://OlhaLishenko.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://OlhaLishenko.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
36 changes: 26 additions & 10 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- #region head -->
<!doctype html>
<html lang="en">
<head>
Expand All @@ -16,17 +17,32 @@
href="style.css"
/>
</head>
<!-- #endregion -->
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
<form
class="form-search-bar form-search-bar--big"
data-qa="big"
>
<input
class="input-bar input-bar--big"
id="input-icon-big"
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles”"
/>
</form>

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<form
class="form-search-bar form-search-bar--small"
data-qa="small"
>
<input
class="input-bar input-bar--small"
id="input-icon-small"
type="text"
data-qa="hover small"
placeholder="Try “Los Angeles”"
/>
</form>
</body>
</html>
106 changes: 105 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,105 @@
/* add styles here */
@font-face {
font-family: Avenir-Book;
src: url('./fonts/Avenir-Book.ttf');
font-weight: 300;
font-style: normal;
}

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

* {
box-sizing: border-box;
}

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

body {
box-sizing: border-box;

--main-color: #e1e7ed;
--text-color: #3d4e61;
}

/* #region forms */

.form-search-bar {
display: flex;
flex-direction: row;
margin: 20px 0 0;
}

.form-search-bar--big {
height: 70px;
}

.form-search-bar--small {
height: 42px;
}

/* #endregion */

/* #region input-bar */

.input-bar {
box-sizing: border-box;
background-image: url(images/Search.svg);
background-color: white;
background-repeat: no-repeat;
width: 100%;
display: flex;
flex-direction: row;
border: 1px solid #e1e7ed;
border-radius: 4px;
box-shadow: 0 1px 8px 0 #3d4e611a;
color: var(--text-color);
}

.input-bar--big {
padding-inline: 62px;
background-position: left 25px top 24px;
background-size: 18px 18px;

font-size: 16px;
font-weight: 300;
line-height: 19px;
font-family: Avenir-Book, sans-serif;
}

.input-bar--small {
padding-inline: 33px;
background-position: left 12px bottom 14px;
background-size: 12px 12px;

font-size: 14px;
font-weight: 400;
line-height: 19px;
font-family: Avenir-Book, sans-serif;
}

.input-bar::placeholder {
font-family: Avenir-Book, sans-serif;
color: var(--text-color);
text-shadow: none;
}

.input-bar:hover {
box-shadow: 0 4px 4px 0 #00000040;
}

.input-bar:focus {
background-color: linear-gradient(180deg, #ffff 0%, #f6f6f7 100%);
outline: none;

text-shadow: 0 4px 4px 0 #00000040;
font-family: Avenir-Heavy, sans-serif;
font-weight: 600;
}

/* #endregion */

0 comments on commit c9a598a

Please sign in to comment.