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

add task solution #4542

Open
wants to merge 2 commits 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://pogorielova.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://pogorielova.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
27 changes: 17 additions & 10 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,23 @@
/>
</head>
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
<form
action="submit"
class="form"
>
Comment on lines +20 to +23

Choose a reason for hiding this comment

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

The action attribute of the form tag is supposed to contain the URL where the form data is sent to. In your case, submit is not a valid URL. If you don't have a specific URL to send the form data to, you can just leave this attribute out.

<input
type="text"
data-qa="big"
placeholder="Try “Los Angeles“"
class="form__input form__input_big"

Choose a reason for hiding this comment

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

The alt attribute is missing in your input tags. Although it's not mandatory, it's a good practice to include it as it improves accessibility. The alt attribute provides alternative information for an image if a user for some reason cannot view it (because of slow connection, an error in the src attribute, or if the user uses a screen reader).

/>
Comment on lines +24 to +29

Choose a reason for hiding this comment

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

The data-qa attribute is used for testing purposes. If you're not using it for testing, it's better to remove it.


<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<input
type="text"
data-qa="small"
placeholder="Try “Los Angeles“"
class="form__input form__input_small"

Choose a reason for hiding this comment

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

The alt attribute is missing in your input tags. It's a good practice to include it as it improves accessibility. The alt attribute provides alternative information for an image if a user for some reason cannot view it.

/>
Comment on lines +31 to +36

Choose a reason for hiding this comment

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

The value of the placeholder attribute is the same for both inputs. It's better to use different placeholders for different inputs to avoid confusion for the users.

</form>
Comment on lines +20 to +37

Choose a reason for hiding this comment

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

Your form lacks a submit button. Even though it's not explicitly stated in the task, it's a good practice to include one in your form. Without it, users won't be able to submit the form.

</body>
</html>
69 changes: 68 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,68 @@
/* add styles here */
@font-face {
font-family: Avenir;
src:
url('fonts/Avenir.ttc') format('truetype'),
url('fonts/Avenir-Book.ttf') format('truetype'),
url('fonts/Avenir-Heavy.ttf') format('truetype');
}

body {
padding: 0;
margin: 0;

font-family: Avenir, Arial, Helvetica, sans-serif;
font-weight: 300;
color: #3d4e61;
}

.form {
padding: 20px 8px;
}

.form__input {
display: block;
box-sizing: border-box;
width: 100%;
font-family: inherit;
background-image: url(images/Search.svg);
background-repeat: no-repeat;
border: 1px solid #e1e7ed;
border-radius: 5px;
box-shadow: 0 1px 8px 0 #3d4e611a;
}

.form__input:hover {
border: 1px solid #e1e7ed;
box-shadow: 0 3px 8px 0 #3d4e6133;
}

.form__input:focus {
outline: none;
box-shadow: none;
}

.form__input:active {
box-shadow: none;
}

.form__input_big {
height: 70px;
margin-bottom: 20px;
font-size: 16px;
background-position: 25px;
background-size: 19px 19px;
padding-left: 62px;
}

.form__input_small {
height: 42px;
font-size: 14px;
background-position: 13px;
background-size: 11px 11px;
padding-left: 33px;
}

.form__input::placeholder {
font-family: Avenir, Arial, Helvetica, sans-serif;
font-weight: 400;
}
Loading