-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
calendar #4013
base: master
Are you sure you want to change the base?
calendar #4013
Changes from 1 commit
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 |
---|---|---|
|
@@ -12,7 +12,41 @@ | |
href="styles/index.scss" | ||
/> | ||
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 |
||
</head> | ||
<body> | ||
<h1>Calendar</h1> | ||
<body class="page"> | ||
|
||
<ul class="calendar calendar__start-day--sun calendar__month-length--31"> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
<li class="calendar__day"></li> | ||
</ul> | ||
|
||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
.page { | ||
margin: 0; | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
} | ||
|
||
.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. Ensure that the variable 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 variable |
||
padding: 0; | ||
margin: auto; | ||
gap: $gap; | ||
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. Ensure that the variable 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 variable |
||
|
||
&__day { | ||
box-sizing: border-box; | ||
width: $day-size; | ||
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. Ensure that the variable 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 variable |
||
height: $day-size; | ||
background-color: $day-color; | ||
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. Ensure that the variable 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 variable |
||
border: $day-border; | ||
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. Ensure that the variable 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 variable |
||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
font-family: Arial, sans-serif; | ||
font-size: $font-size; | ||
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. Ensure that the variable 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 variable |
||
position: relative; | ||
|
||
&:hover { | ||
background-color: #FFBFCB; | ||
transform: translate(0, -20px); | ||
} | ||
|
||
@for $i from 1 through 31 { | ||
&:nth-child(#{$i}) { | ||
&::before { | ||
content: "#{$i}"; | ||
} | ||
} | ||
} | ||
} | ||
|
||
@each $day, $number in $weekdays { | ||
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. Ensure that the variable 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 variable |
||
&__start-day--#{$day}> :first-child { | ||
margin-left: (($number - 1) * $day-size) + ($number - 1) * $gap; | ||
|
||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
$day-size: 100px; | ||
$day-color: #eee; | ||
$day-border: 1px solid #000; | ||
$font-size: 30px; | ||
$gap: 1px; | ||
$calendar-width: 7 * $day-size + 6 * $gap; | ||
$weekdays: ( | ||
'mon' 1, | ||
'tue' 2, | ||
'wed' 3, | ||
'thu' 4, | ||
'fri' 5, | ||
'sat' 6, | ||
'sun' 7 | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
body { | ||
margin: 0; | ||
} | ||
@import './blocks/variables.scss'; | ||
@import './blocks/calendar.scss'; |
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
href
attribute is linking to a SCSS file (styles/index.scss
). Browsers cannot directly interpret SCSS files. You need to compile the SCSS into a CSS file and link to the resulting CSS file instead.