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

Remarks are taken into account #636

Open
wants to merge 5 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
16 changes: 16 additions & 0 deletions .bemlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"elementDivider": "__",
"modifierDivider": "--",
"ignore": [
"node_modules",
"dist"
],
"rules": {
"one-block": true,
"one-element": true,
"element-inside-parent-block": true,
"no-double-element": true,
"no-neighbour-parent-block": true,
"modifiable-class": true
}
}
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm start & sleep 5 && npm test
- name: Upload HTML report(backstop data)
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: report
path: backstop_data
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Search bar for Airbnb
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://RomanProkopiv.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://RomanProkopiv.github.io/layout_search-bar-airbnb/report/html_report/)
Comment on lines +3 to +4

Choose a reason for hiding this comment

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

Ссылки не рабочие, выполни пунтк 15 отсюда


> Follow [this instructions](https://github.com/mate-academy/layout_task-guideline#how-to-solve-the-layout-tasks-on-github)
___
Expand Down
28 changes: 27 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,32 @@
<link rel="stylesheet" href="./style.css">
</head>
<body>
<h1>Search bar airbnb</h1>
<div class="container">
<form action=""
method="POST"
data-qa="big"
class="big">
<input type="text"
name="search1"
class="search field1"
id="search1"
data-qa="keypress"
placeholder="Try &quot; Los Angeles&quot;">
</form>

<form action=""
method="POST"
data-qa="small"
class="small">
<input type="text"
name="search2"
class="search field2"
id="search2"
data-qa="keypress"
placeholder="Try &quot; Los Angeles&quot;">
</form>

</div>

</body>
</html>
68 changes: 68 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
@font-face {
font-family: Avenir;
src: url(./fonts/avenir.ttc);
}

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

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

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

.container {
font-weight: 300;
padding: 0 9px;
}

.field1 {
height: 70px;
font-size: 15px;
background: url(./images/Search.svg) no-repeat scroll left center;
background-position-x: 23px;
padding-left: 60px;
width: 100%;
}

.field2 {
height: 40px;
font-size: 13px;
background: url(./images/Search.svg) no-repeat scroll left center;
background-size: 12px;
background-position-x: 11px;
padding-left: 30px;
width: 100%;
}
Comment on lines +29 to +46

Choose a reason for hiding this comment

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

У нас є search та search--small (--small - модифікатор). Тому всі стилі які прописані для “великого” інпуту ми задаємо для всіх інпутів в цілому, а за допомогою модифіктора small міняємо тільки потрібні значення, щоб наш інпут став малим.

field1 и field2 очень непонятные классы


.search {
display: block;
box-sizing: border-box;
margin-top: 20px;
border: 1px outset #5555;
}

.search:default {
font-weight: 300;
}
Comment on lines +55 to +57

Choose a reason for hiding this comment

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

Думаю это можно прописать просто в .search


.search:hover {
font-weight: bold;
box-shadow: -2px 2px 2px rgba(0,0,0,0.4);
}

.search:focus {
font-weight: bold;
background: url(./images/Search.svg) no-repeat scroll left center, linear-gradient(to top, rgba(241, 240, 240, 0.96), #fff);
background-position-x: 22px;
}