Skip to content

Commit

Permalink
My solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Karanelus committed May 26, 2024
1 parent afacaf6 commit dc02e4d
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@mate-academy/backstop-config": "latest",
"@mate-academy/bemlint": "latest",
"@mate-academy/linthtml-config": "latest",
"@mate-academy/scripts": "^1.7.3",
"@mate-academy/scripts": "^1.8.1",
"@mate-academy/stylelint-config": "latest",
"backstopjs": "6.2.2",
"jest": "^29.7.0",
Expand Down
12 changes: 9 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Search bar for Airbnb

> Here are the [Layout Tasks Instructions](https://mate-academy.github.io/layout_task-guideline/#how-to-solve-the-layout-tasks-on-github)
___
---

## The task

> Create HTML page with two search bars as designed in [the mockup](https://www.figma.com/file/kf3AWulK9elrNk34wtpjPw/Airbnb-Search-bar?node-id=0%3A1). This search bar will be part of big project.
![screenshot](./references/search-bar-example.png)

### Requirements:

- use images from [src/images](src/images)
- there must be two search bars
- search bar must stretch the full width
Expand All @@ -20,13 +24,15 @@ ___
- use `@font-face` for fonts
- add attribute `data-qa="big"` for big search form, and `data-qa="small"` for small
- add attribute `data-qa="keypress"` to input in big search form

---

## Checklist

❗️ 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://Karanelus.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://Karanelus.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
32 changes: 21 additions & 11 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,26 @@
/>
</head>
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>

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

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

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

.form {
margin-top: 20px;
}

.search-bar {
background-image: url('./images/Search.svg');
background-repeat: no-repeat;
border: 1px solid #e1e7ed;
border-radius: 4px;
box-sizing: border-box;
box-shadow: 0 1px 8px 0 #3d4e611a;
color: #3d4e61;
font-family: inherit;
width: 100%;
}

.search-bar--big {
background-position: 26px;
background-size: 19px;
font-size: 16px;
height: 70px;
padding-left: 62px;
}

.search-bar--small {
background-position: 13px;
background-size: 11px;
color: #3d4e61;
font-size: 14px;
height: 42px;
line-height: 20px;
padding-left: 33px;
}

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

.search-bar:focus {
border-radius: 3px;
box-shadow: 0 4px 4px 0 #00000040;
text-shadow: 0 4px 4px #00000040;
font-weight: 800;
outline: none;
}

.search-bar::placeholder {
color: #3d4e61;
font-family: inherit;
font-size: 16px;
font-weight: 300;
text-shadow: none;
}

.search-bar--small::placeholder {
color: #3d4e61;
font-family: inherit;
font-size: 14px;
font-weight: 300;
text-shadow: none;
}

0 comments on commit dc02e4d

Please sign in to comment.