-
Notifications
You must be signed in to change notification settings - Fork 4k
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 #4486
base: master
Are you sure you want to change the base?
add task solution #4486
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install | ||
- run: npm test | ||
- name: Upload HTML report(backstop data) | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: report | ||
path: backstop_data |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,16 +17,38 @@ | |
/> | ||
</head> | ||
<body> | ||
<input | ||
type="text" | ||
data-qa="keypress" | ||
placeholder="Try “Los Angeles“" | ||
/> | ||
<div class="search__container"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding an empty line before this multiline sibling block for better readability, as per the checklist. |
||
<form | ||
action="/" | ||
method="get" | ||
class="search-bar" | ||
data-qa="big" | ||
Comment on lines
+21
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The attributes of the form tag should start on a new line with 2-space indentation related to the tag, and the tag’s closing bracket should be on the same level as the opening one. |
||
> | ||
<div class="icon-big"> | ||
<input | ||
type="text" | ||
data-qa="keypress" | ||
placeholder="Try "Los Angeles"" | ||
class="search__input big" | ||
Comment on lines
+27
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The attributes of the input tag should start on a new line with 2-space indentation related to the tag, and the tag’s closing bracket should be on the same level as the opening one. |
||
/> | ||
</div> | ||
</form> | ||
|
||
<input | ||
type="text" | ||
data-qa="hover" | ||
placeholder="Try “Los Angeles“" | ||
/> | ||
<form | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add an empty line before this multiline sibling block to improve readability, according to the checklist. |
||
action="/" | ||
method="get" | ||
class="search-bar" | ||
data-qa="small" | ||
Comment on lines
+37
to
+41
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The attributes of the form tag should start on a new line with 2-space indentation related to the tag, and the tag’s closing bracket should be on the same level as the opening one. |
||
> | ||
<div class="icon-small"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Class names should represent the meaning of the content, not the styles or tag names. The class 'icon-small' could be more descriptive. |
||
<input | ||
type="text" | ||
data-qa="hover" | ||
placeholder="Try "Los Angeles"" | ||
class="search__input small" | ||
Comment on lines
+43
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The attributes of the input tag should start on a new line with 2-space indentation related to the tag, and the tag’s closing bracket should be on the same level as the opening one. |
||
/> | ||
</div> | ||
</form> | ||
</div> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,115 @@ | ||
/* 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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't use the |
||
body { | ||
margin-top: 0; | ||
font-family: Avenir, Arial, sans-serif; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Be consistent with your margins. Add only top or bottom margins, but not both, to avoid potential margin collapse. Since you're setting |
||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to the checklist, you should provide a fallback font. Here, you have Arial as a fallback for Avenir, which is good, but it's recommended to include a generic family name as well, like 'sans-serif'.
Comment on lines
+17
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. Although you have a fallback font here, it's good practice to include a generic font family as well, such as 'serif' or 'sans-serif'. |
||
|
||
.search__container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: stretch; | ||
width: 100%; | ||
} | ||
|
||
Comment on lines
+22
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't fix container size (if there is no such a requirement). Let the content size dictate it. If 'width: 100%' is not a requirement, consider removing it to allow the content to determine the size of the container. |
||
.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(../src/images/Search.svg) no-repeat 30px; | ||
color: #3d4e61; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The URL for the background image in the .search-input:focus selector should be relative to the CSS file. If the images folder is on the same level as the src folder, the correct path would be './images/Search.svg'. |
||
font-weight: 600; | ||
font-family: inherit; | ||
outline: none; | ||
} | ||
|
||
form { | ||
position: relative; | ||
margin-top: 20px; | ||
} | ||
|
||
.icon-big::before { | ||
/* background: url(../src/images/Search.svg) no-repeat; */ | ||
content: url(/src/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(/src/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; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use semantic tags where possible. For example, the search container could be a