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

Search bar add task solution #4774

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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://aholubko.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://aholubko.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
34 changes: 24 additions & 10 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,30 @@
/>
</head>
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
<div class="search">
<form
class="search__form search__form--big"
data-qa="big"
>
<input
class="search__input search__input--big"
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
</form>

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<form
class="search__form search__form--small"
data-qa="small"
>
<input
class="search__input search__input--small"
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
Comment on lines +29 to +41

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The placeholder text for both input fields is the same: 'Try “Los Angeles“'. Consider differentiating the placeholder text for each form to provide a clearer distinction between the 'big' and 'small' search forms, enhancing user experience.

/>
</form>
</div>
</body>
</html>
74 changes: 74 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,75 @@
/* add styles here */
@font-face {
font-family: Avenir;
src:
url(./fonts/Avenir-Book.ttf) format('truetype'),
url(./fonts/Avenir-Heavy.ttf) format('truetype');
font-weight: 300;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The font-weight is set to 300, which typically corresponds to a 'light' font weight. However, the src includes 'Avenir-Heavy.ttf', which suggests a heavier font weight. Ensure that the font-weight matches the actual font file being used. If 'Avenir-Heavy.ttf' is intended to be used, consider adjusting the font-weight to a heavier value, such as 700 or 800.

font-style: normal;
}

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

.search {
display: flex;
flex-direction: column;
align-items: center;
font-family: Avenir, sans-serif;
margin: 0 auto;
padding: 0 48px;
}

.search__form {
width: 100%;
display: flex;
align-items: center;
position: relative;
}

.search__input {
width: 100%;
border: 1px solid #e1e7ed;
position: relative;
}

.search__form--big {
margin-top: 20px;
height: 70px;
}

.search__form--small {
margin-top: 20px;
height: 42px;
}

.search__input--big {
font-size: 16px;
padding: 26px 62px;
background-image: url(./images/Search.svg);
background-position: 26px center;
background-repeat: no-repeat;
background-size: 19px;
}

.search__input--small {
font-size: 14px;
padding: 10px 33px;
background-image: url(./images/Search.svg);
background-position: 13px center;
background-repeat: no-repeat;
background-size: 11px;
}

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

.search__input:focus {
box-shadow: 0 4px 4px 0 #00000040;
text-shadow: 0 4px 4px 0 #00000040;
outline: none;
}
Loading