Skip to content
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

Develop #3981

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Develop #3981

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/test.yml-template
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ This is possible because [we use the Parcel library](https://en.parceljs.org/scs

❗️ Replace `<your_account>` with your Github username and copy the links to `Pull Request` description:

- [DEMO LINK](https://<your_account>.github.io/layout_calendar/)
- [TEST REPORT LINK](https://<your_account>.github.io/layout_calendar/report/html_report/)
- [DEMO LINK](https://tatanalevockina.github.io/layout_calendar/)
- [TEST REPORT LINK](https://tatanalevockina.github.io/layout_calendar/report/html_report/)

❗️ Copy this `Checklist` to the `Pull Request` description after links, and put `- [x]` before each point after you checked it.

Expand Down
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@mate-academy/backstop-config": "latest",
"@mate-academy/bemlint": "latest",
"@mate-academy/linthtml-config": "latest",
"@mate-academy/scripts": "^1.8.6",
"@mate-academy/scripts": "^1.9.12",
"@mate-academy/stylelint-config": "latest",
"@parcel/transformer-sass": "^2.12.0",
"backstopjs": "6.3.23",
Expand Down
36 changes: 34 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,42 @@
<title>Calendar</title>
<link
rel="stylesheet"
href="styles/index.scss"
href="styles/main.scss"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stylesheet link references a .scss file. SCSS files need to be compiled to CSS before they can be used in an HTML document. Consider compiling styles/main.scss to styles/main.css and updating the link accordingly.

/>
</head>
<body>
<h1>Calendar</h1>
<div class="calendar calendar--start-sun calendar--month-length-29">
<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>
<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>
3 changes: 0 additions & 3 deletions src/styles/index.scss

This file was deleted.

80 changes: 80 additions & 0 deletions src/styles/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
$day-size: 100px;
$day-border: 1px;
$day-gap: 1px;
$day-color: #eee;
$hover-color: #ffbfcb;
$font-size: 30px;
$font-family: Arial, sans-serif;

body {
margin: 0;
}

* {
box-sizing: border-box;
}

.calendar {
display: flex;
flex-wrap: wrap;
gap: $day-gap;
width: calc($day-size * 7 + $day-gap * 6 + 10px * 2);
padding: 10px;

&__day {
width: $day-size;
height: $day-size;
background-color: $day-color;
border: $day-border solid black;
display: flex;
justify-content: center;
align-items: center;
position: relative;
cursor: pointer;
transition: all 0.5s ease;

&::before {
content: '';
position: absolute;
font-size: $font-size;
font-family: $font-family;
}

&:hover {
background-color: $hover-color;
transform: translateY(-20px);
}
}

@for $i from 1 through 31 {
&__day:nth-child(#{$i})::before {
content: '#{$i}';
}
}

@each $day, $index in (mon: 0, tue: 1, wed: 2, thu: 3, fri: 4, sat: 5, sun: 6)
{
&--start-#{$day} &__day:nth-child(1) {
margin-left: calc(($day-size + $day-gap) * $index);
}
}

@for $length from 28 through 31 {
&--month-length-#{$length} &__day:nth-child(n + #{$length + 1}) {
display: none;
}
}
}

// .btn {
// background-color: aquamarine;
// color: white;
// padding: 10px 20px;
// // transition: background-color 0.5s ease;
// // transition: all 0.5s ease-in;
// }

// .btn:hover {
// background-color: aqua;
// padding: 20px 30px;
// }
Loading