scinote-web/app/assets/stylesheets/dashboard/calendar.scss

137 lines
2.8 KiB
SCSS
Raw Normal View History

2020-02-19 22:57:06 +08:00
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
2020-04-02 20:50:48 +08:00
2020-02-13 20:50:29 +08:00
.dashboard-container .calendar-widget {
2020-04-02 20:50:48 +08:00
--calendar-day-size: 32px;
2020-02-19 22:57:06 +08:00
.dashboard-calendar {
height: 100%;
2020-03-25 01:44:09 +08:00
position: absolute;
2020-02-19 22:57:06 +08:00
width: 100%;
}
.clndr {
display: flex;
flex-direction: column;
height: 100%;
.controls {
border-bottom: $border-default;
display: flex;
flex-basis: 42px;
2020-03-25 01:44:09 +08:00
flex-shrink: 0;
2020-02-19 22:57:06 +08:00
padding: 3px;
.clndr-title {
@include font-h3;
align-items: center;
display: flex;
flex-grow: 1;
justify-content: center;
}
}
.days-container {
align-items: center;
display: grid;
2020-03-25 01:44:09 +08:00
flex-basis: calc(100% - 42px);
2020-02-19 22:57:06 +08:00
flex-grow: 1;
grid-column-gap: 6px;
2021-02-15 19:40:26 +08:00
grid-row-gap: 2px;
2020-02-19 22:57:06 +08:00
grid-template-columns: repeat(7, 1fr);
2021-02-15 19:40:26 +08:00
grid-template-rows: repeat(auto-fit, minmax(1em, 1fr));
2020-02-19 22:57:06 +08:00
justify-items: center;
padding: 6px;
.day-header {
@include font-button;
color: $color-silver-chalice;
font-weight: bold;
}
.day {
@include font-button;
align-items: center;
2020-02-21 00:02:38 +08:00
animation-timing-function: $timing-function-sharp;
border-radius: 50%;
2020-02-19 22:57:06 +08:00
display: flex;
2020-04-02 20:50:48 +08:00
height: var(--calendar-day-size);
2020-02-19 22:57:06 +08:00
justify-content: center;
2020-02-21 00:02:38 +08:00
position: relative;
transition: .3s;
2020-02-19 22:57:06 +08:00
user-select: none;
2020-04-02 20:50:48 +08:00
width: var(--calendar-day-size);
2020-02-19 22:57:06 +08:00
&.adjacent-month {
color: $color-alto;
}
2020-02-21 00:02:38 +08:00
&.event {
.event-day {
align-items: center;
border-radius: 50%;
cursor: pointer;
display: flex;
2020-04-02 20:50:48 +08:00
height: calc(var(--calendar-day-size) - 2px);
2020-02-21 00:02:38 +08:00
justify-content: center;
2020-04-02 20:50:48 +08:00
width: calc(var(--calendar-day-size) - 2px);
2020-02-21 00:02:38 +08:00
&:hover {
background: $color-concrete;
2020-02-21 00:02:38 +08:00
color: inherit;
}
}
&::after {
@include red-dot;
right: calc((var(--calendar-day-size) / 2) - 4px);
top: calc((var(--calendar-day-size) / 2) + 6px);
2020-02-21 00:02:38 +08:00
}
}
&.today {
border: $border-primary;
&.event {
&::after {
left: 12px;
top: 21px;
}
}
}
2020-02-21 00:02:38 +08:00
.events-container {
color: $color-black;
padding: 8px;
width: 280px;
.title {
@include font-h3;
margin-bottom: 8px;
}
2020-02-19 22:57:06 +08:00
}
}
}
}
}
2020-10-02 20:49:08 +08:00
@media (max-width: 1600px) {
2020-02-19 22:57:06 +08:00
.dashboard-container .calendar-widget {
2020-02-21 00:02:38 +08:00
.clndr {
.events-container {
left: 0;
right: auto;
}
}
2020-02-13 20:50:29 +08:00
}
}
2020-04-02 20:50:48 +08:00
@media (max-width: 700px) {
.dashboard-container .calendar-widget {
--calendar-day-size: 28px;
}
}