-
Notifications
You must be signed in to change notification settings - Fork 5k
Tasks solved #5475
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?
Tasks solved #5475
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 |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| <!-- #region head --> | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <html | ||
| lang="en" | ||
| class="page" | ||
| > | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta | ||
|
|
@@ -9,10 +13,43 @@ | |
| <title>Calendar</title> | ||
| <link | ||
| rel="stylesheet" | ||
| href="styles/index.scss" | ||
| href="./styles/main.scss" | ||
| /> | ||
| </head> | ||
| <body> | ||
| <h1>Calendar</h1> | ||
| <!-- #endregion head --> | ||
| <body class="page__body"> | ||
| <div class="calendar calendar--start-day-sun calendar--month-length-31"> | ||
|
Comment on lines
14
to
+21
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 the description requirement that "Set calendar to start from Sunday by default" and that "The month should start at the correct column (Monday is the 1st, Friday is the 5th)" when counting from Sunday. Currently
Comment on lines
14
to
+21
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 checklist item #1: "Changing 'month-lengh' and 'start-day' modifier in the code element reflects in changing calendar layout" together with the description rule "Set calendar to start from Sunday by default". Your |
||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
|
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. You set only |
||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| <div class="calendar__day"></div> | ||
| </div> | ||
| </body> | ||
| </html> | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| @use './utils/variables.scss' as *; | ||
|
|
||
| .page { | ||
| margin: 0; | ||
| min-height: 100vh; | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| background-color: #f5f5f5; | ||
| } | ||
|
|
||
| .calendar { | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| width: $calendar-width; | ||
|
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 calendar width variable currently only accounts for 7 day cells and gaps, but the task requires the width to be "exactly 7 columns + 10px paddings"; update |
||
| box-sizing: border-box; | ||
| padding: $calendar-padding; | ||
| gap: $calendar-gap; | ||
|
|
||
| @for $length from 28 through 31 { | ||
|
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 |
||
| &--month-length-#{$length} { | ||
|
Comment on lines
+14
to
+21
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 the requirement and checklist item #1: Changing 'month-lengh' and 'start-day' modifier in the code element reflects in changing calendar layout because your 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 still violates the Sunday-first requirement tied to checklist item #1: "Changing 'month-lengh' and 'start-day' modifier in the code element reflects in changing calendar layout" and the description statement "Set calendar to start from Sunday by default in your HTML". Your |
||
| .calendar__day:nth-child(n + #{$length + 1}) { | ||
| display: none; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @each $day, $offset in $week-days { | ||
| &--start-day-#{$day} { | ||
| .calendar__day:first-child { | ||
| margin-left: calc(#{$offset} * (#{$day-size} + #{$calendar-gap})); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| &__day { | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
|
|
||
| box-sizing: border-box; | ||
| border: $day-border; | ||
| background-color: $day-bg-color; | ||
| width: $day-size; | ||
| height: $day-size; | ||
|
|
||
| cursor: pointer; | ||
| transition: | ||
| background-color $anim-duration, | ||
| transform $anim-duration; | ||
|
|
||
| &::before { | ||
| font-family: $font-family; | ||
| font-size: $font-size; | ||
| } | ||
|
|
||
| &:hover { | ||
| background-color: $day-hover-color; | ||
| transform: $day-hover-transform; | ||
| } | ||
|
|
||
| @for $i from 1 through 31 { | ||
| &:nth-child(#{$i}) { | ||
| &::before { | ||
| content: '#{$i}'; | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| $day-size: 100px; | ||
| $day-bg-color: #eee; | ||
| $day-border: 1px solid #000; | ||
|
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 description requires the calendar to be centered in the middle of the screen both horizontally and vertically using the |
||
| $font-family: Arial, sans-serif; | ||
| $font-size: 30px; | ||
| $calendar-gap: 1px; | ||
| $calendar-padding: 10px; | ||
| $day-hover-color: #ffbfcb; | ||
| $day-hover-transform: translateY(-20px); | ||
| $anim-duration: 0.5s; | ||
| $calendar-width: calc( | ||
| 7 * #{$day-size} + 6 * #{$calendar-gap} + 2 * #{$calendar-padding} | ||
| ); | ||
| $week-days: ( | ||
| mon: 0, | ||
| tue: 1, | ||
| wed: 2, | ||
| thu: 3, | ||
| fri: 4, | ||
| sat: 5, | ||
| sun: 6, | ||
|
Comment on lines
+14
to
+21
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 checklist item #1: "Changing 'month-lengh' and 'start-day' modifier in the code element reflects in changing calendar layout" – your |
||
| ); | ||
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 current
$calendar-widthonly accounts for 7 day squares and 6 gaps, but ignores the horizontal padding applied on.calendar. The task requires limiting the width to exactly 7 columns plus 10px paddings, so you should include$calendar-paddingin the width calculation to match the total layout width requirement.