-
Notifications
You must be signed in to change notification settings - Fork 5k
add solution #5468
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?
add solution #5468
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,55 @@ | ||
| .calendar { | ||
|
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. This violates BEM and checklist item #3 ("All |
||
| display: flex; | ||
| flex-wrap: wrap; | ||
| gap: $gap; | ||
| padding: $padding; | ||
| box-sizing: border-box; | ||
| width: ($column * $cell-size) + (($column - 1) * $gap) + (2 * $padding); | ||
|
|
||
| &__day { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| background-color: #eee; | ||
| width: $cell-size; | ||
| height: $cell-size; | ||
| border: 1px solid black; | ||
| box-sizing: border-box; | ||
| font-family: Arial, sans-serif; | ||
| font-size: 30px; | ||
| transition: | ||
| background-color 500ms, | ||
| transform 500ms; | ||
|
|
||
| &:hover { | ||
| cursor: pointer; | ||
| background-color: #ffbfcb; | ||
| transform: translateY(-20px); | ||
| } | ||
| } | ||
|
|
||
| @for $i from 1 through 31 { | ||
| &__day:nth-child(#{$i})::before { | ||
| content: '#{$i}'; | ||
| color: black; | ||
| } | ||
| } | ||
|
|
||
| @for $length from 28 through 31 { | ||
| &--month-length-#{$length} { | ||
| .calendar__day:nth-child(n + #{$length + 1}) { | ||
| display: none; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @each $day in $days-of-week { | ||
| $index: index($days-of-week, $day); | ||
|
|
||
| &--start-day-#{$day} { | ||
| .calendar__day:first-child { | ||
| margin-left: ($index - 1) * ($cell-size + $gap); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| 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 |
||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| min-height: 100vh; | ||
| margin: 0; | ||
| } | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| @import './variables'; | ||
|
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. This selector should target the BEM block class |
||
| @import './blocks/calendar'; | ||
| @import './blocks/page'; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| $column: 7; | ||
|
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 |
||
| $cell-size: 100px; | ||
| $gap: 1px; | ||
| $padding: 10px; | ||
| $days-of-week: (mon, tue, wed, thu, fri, sat, sun); | ||
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.
The HTML uses
class="page"on thebody, but the SCSS defines styles forbodydirectly, not for a.pageblock. Since the task mentions using BEM and apageblock file exists, consider applying the centering styles to.pageinstead ofbodyto align with the intended BEM structure.