-
Notifications
You must be signed in to change notification settings - Fork 5k
deploy commit for question #5480
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
base: master
Are you sure you want to change the base?
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 |
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 |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| @import 'utils/variables'; | ||
|
|
||
| .calendar { | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| gap: $day-gap; | ||
| width: $day-size * 7 + $day-gap * 6 + 20px; | ||
| padding: 10px; | ||
|
|
||
| &__day { | ||
| width: $day-size; | ||
| height: $day-size; | ||
| background-color: #eee; | ||
| border: 1px solid #000; | ||
|
|
||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| position: relative; | ||
| cursor: pointer; | ||
| transition-duration: 0.5s; | ||
|
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. Checklist item: "All hover-related changes should be animated with the duration of 0.5s". Currently only |
||
|
|
||
| &:hover { | ||
| background-color: #ffbfcb; | ||
|
|
||
| // transition-duration: 1s; | ||
| transform: translateY(-20px); | ||
| } | ||
|
|
||
| &::before { | ||
| font-family: Arial, sans-serif; | ||
| font-size: 30px; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @each $day, $offset in $days { | ||
| .calendar--start-day-#{$day} .calendar__day:first-child { | ||
| margin-left: $offset * ($day-size + $day-gap); | ||
| } | ||
| } | ||
|
|
||
| @for $i from 1 through 31 { | ||
| .calendar__day:nth-child(#{$i})::before { | ||
| content: '#{$i}'; | ||
| } | ||
| } | ||
|
|
||
| @for $length from 28 through 31 { | ||
| .calendar--month-length-#{$length} | ||
| .calendar__day:nth-child(n + #{$length + 1}) { | ||
| display: none; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,14 @@ | ||
| body { | ||
| * { | ||
| margin: 0; | ||
| padding: 0; | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| body { | ||
|
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 width calculation partially hardcodes |
||
| min-height: 100vh; | ||
|
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.
|
||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| } | ||
|
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 task requires: "Write styles in |
||
|
|
||
| @import 'calendar'; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| $day-size: 100px; | ||
| $day-gap: 1px; | ||
| $days: ( | ||
| 'mon': 0, | ||
| 'tue': 1, | ||
| 'wed': 2, | ||
| 'thu': 3, | ||
|
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. Your width calculation |
||
| 'fri': 4, | ||
| 'sat': 5, | ||
| 'sun': 6, | ||
| ); | ||
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.
This violates the requirement "Don't use hardcoded
pxvalues if they are used several times" and "Use properly named variables to make all the calculations more clear". Here20pxand10pxare hardcoded; consider defining padding and total width using variables (e.g.$calendar-padding, computed width using$day-size,$day-gap, and$calendar-padding) instead of literalpxvalues.