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

make a deploy #4502

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
12 changes: 6 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ ___

❗️ 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://romka12254.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://romka12254.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.

- [ ] Icon implemented using background-image CSS property
- [ ] Inputs are written inside of 'form' tag with correctly passed attributes
- [ ] All `Typical Mistakes` from `BEM` lesson theory are checked.
- [ ] Code follows all the [Code Style Rules ❗️](./checklist.md)
- [x] Icon implemented using background-image CSS property
- [x] Inputs are written inside of 'form' tag with correctly passed attributes
- [x] All `Typical Mistakes` from `BEM` lesson theory are checked.
- [x] Code follows all the [Code Style Rules ❗️](./checklist.md)
53 changes: 42 additions & 11 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,54 @@
http-equiv="X-UA-Compatible"
content="ie=edge"
/>
<title>Document</title>
<title>Airbnb Search Bar</title>
<link
rel="stylesheet"
href="style.css"
Comment on lines 14 to 16

Choose a reason for hiding this comment

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

Keep your attributes correctly formatted. The attributes of the link tag should start on new lines with proper indentation to improve readability.

/>
</head>
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<div class="search__container">

Choose a reason for hiding this comment

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

The indentation is not consistent. Child elements should be indented by 2 spaces relative to their parent element.

Choose a reason for hiding this comment

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

Add empty lines between multiline sibling blocks of HTML. There should be an empty line before this div to separate it from the previous form for better readability.


<form
action="/"
method="get"
class="search-bar"
data-qa="big"
Comment on lines +23 to +27

Choose a reason for hiding this comment

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

Keep your attributes correctly formatted. The attributes of the form tag should start on new lines with proper indentation to improve readability.

>

Choose a reason for hiding this comment

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

The attributes of the form element are not correctly formatted. Each attribute should start on a new line with a 2-space indentation.


<div class="icon-big">

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

Choose a reason for hiding this comment

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

The attributes of the input element are not correctly formatted. Each attribute should start on a new line with a 2-space indentation.

Comment on lines +32 to +36

Choose a reason for hiding this comment

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

Keep your attributes correctly formatted. The attributes of the input tag should start on new lines with proper indentation to improve readability.

/>

</div>

</form>

<form

Choose a reason for hiding this comment

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

Add empty lines between multiline sibling blocks of HTML. There should be an empty line before this form to separate it from the previous div for better readability.

action="/"
method="get"
class="search-bar"
data-qa="small"
Comment on lines +43 to +47

Choose a reason for hiding this comment

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

Keep your attributes correctly formatted. The attributes of the form tag should start on new lines with proper indentation to improve readability.

>

Choose a reason for hiding this comment

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

The attributes of the form element are not correctly formatted. Each attribute should start on a new line with a 2-space indentation.


<div class="icon-small">

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
class="search__input small"

Choose a reason for hiding this comment

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

The attributes of the input element are not correctly formatted. Each attribute should start on a new line with a 2-space indentation.

Comment on lines +52 to +56

Choose a reason for hiding this comment

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

Keep your attributes correctly formatted. The attributes of the input tag should start on new lines with proper indentation to improve readability.

/>

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

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

* {
box-sizing: border-box;
}

Comment on lines +13 to +15

Choose a reason for hiding this comment

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

Don't use * selector as it impacts performance. Set styles only for elements that require them.

Comment on lines +13 to +15

Choose a reason for hiding this comment

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

Avoid using the universal selector '*' for setting box-sizing as it impacts performance. Apply box-sizing to specific elements as needed.

body {
margin-top: 0;
font-family: Avenir, Arial, sans-serif;

Choose a reason for hiding this comment

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

Be consistent with your margins. Add only top or bottom, but not both, to avoid potential margin collapse. In this case, since you only have a top margin, it is fine.

}

Choose a reason for hiding this comment

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

Remember to use fallback fonts - alternative font-family in case the main one doesn't work. For example, font-family: Avenir, Arial, sans-serif; should include a generic family as a fallback, which you have done correctly here.

Choose a reason for hiding this comment

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

Include a fallback font-family in case the main one doesn't work, for example: 'font-family: Avenir, Arial, sans-serif;'. This is a good practice for ensuring text remains readable if the custom font fails to load.

Comment on lines +17 to +19

Choose a reason for hiding this comment

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

Be consistent with your margins. You've added only a top margin here, which is good, but ensure that this approach is consistent across your CSS to avoid potential margin collapse issues.


.search__container {
display: flex;
flex-direction: column;
align-items: stretch;
width: 100%;
}

.search__input {
color: #3d4e61;
width: 100%;
border: 1px solid #e1e7ed;
border-radius: 4px;
font-weight: 300;
transition: border-color 0.3s;
box-shadow: 0 0 7px rgb(232, 230, 230);
font-family: inherit;
position: relative;
}

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

.big {
height: 70px;
font-size: 16px;
padding-left: 62px;
}

.small {
height: 42px;
font-size: 14px;
box-shadow: 0 0 7px rgb(229, 228, 228);
padding-left: 33px;
}

.search__input:hover {
border-color: #e1e7ed;
box-shadow: 0 3px 5px rgb(153, 153, 153);
}

.search__input:focus {
background:
linear-gradient(#ffff, #f6f6f7),
url(./images/Search.svg) no-repeat 30px;
color: #3d4e61;
font-weight: 600;
font-family: inherit;
outline: none;
}

form {
position: relative;
margin-top: 20px;
}

.icon-big::before {
content: url(./images/Search.svg);
position: absolute;
top: 35px;
z-index: 10;
transform: translateY(-50%);
left: 25px;
height: 19px;
width: 19px;
}

.icon-small::before {
content: '';
z-index: 10;
background-size: 11px;
width: 11px;
height: 11px;
position: absolute;
top: 20px;
left: 13px;
transform: translateY(-50%);
background-image: url(./images/Search.svg);
}

.big:focus {
text-shadow: 0 3px 3px #bbbec2;
}

.small:hover {
box-shadow: 0 3px 5px rgb(206, 206, 206);
text-shadow: none;
}

.small:focus {
box-shadow: none;
text-shadow: none;
}
Loading