291 lines
4.9 KiB
CSS
291 lines
4.9 KiB
CSS
.calendar {
|
|
max-width: 920px;
|
|
margin: 0 auto;
|
|
padding: 16px;
|
|
}
|
|
|
|
.calendar__header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.calendar__header button {
|
|
min-width: 36px;
|
|
min-height: 36px;
|
|
padding: 8px 12px;
|
|
background: none;
|
|
border: 1px solid #d0d0d0;
|
|
border-radius: 4px;
|
|
font-size: 18px;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.calendar__header button:hover {
|
|
background-color: #f0f0f0;
|
|
}
|
|
|
|
.calendar__header h2 {
|
|
margin: 0;
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
color: #333;
|
|
}
|
|
|
|
.calendar__grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(7, 1fr);
|
|
gap: 8px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.calendar__weekday {
|
|
padding: 12px 8px;
|
|
text-align: center;
|
|
font-weight: 600;
|
|
font-size: 13px;
|
|
color: #666;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.calendar-day {
|
|
min-height: 84px;
|
|
padding: 8px;
|
|
border: 1px solid #e0e0e0;
|
|
border-radius: 4px;
|
|
background-color: #fff;
|
|
cursor: pointer;
|
|
display: flex;
|
|
flex-direction: column;
|
|
transition: all 0.2s;
|
|
position: relative;
|
|
user-select: none;
|
|
-webkit-user-select: none; /* Safari */
|
|
}
|
|
|
|
.calendar-day:hover {
|
|
border-color: #0066cc;
|
|
box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
|
|
background-color: #f9fbff;
|
|
}
|
|
|
|
.calendar-day:focus-visible {
|
|
outline: 2px solid #0066cc;
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.calendar-day--disabled {
|
|
background-color: #fafafa;
|
|
color: #999;
|
|
cursor: default;
|
|
}
|
|
|
|
.calendar-day--disabled:hover {
|
|
border-color: #e0e0e0;
|
|
box-shadow: none;
|
|
background-color: #fafafa;
|
|
}
|
|
|
|
.calendar-day--has-events {
|
|
background-color: #fafbff;
|
|
}
|
|
|
|
.calendar-day__number {
|
|
font-weight: 600;
|
|
font-size: 14px;
|
|
color: #333;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.calendar-day--disabled .calendar-day__number {
|
|
color: #bbb;
|
|
}
|
|
|
|
.calendar-day--today .calendar-day__number {
|
|
background-color: #0066cc;
|
|
color: #fff;
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.calendar-day--selected {
|
|
background-color: #f9fbff;
|
|
border-color: #0066cc;
|
|
box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
|
|
}
|
|
|
|
.calendar-day--selected:hover {
|
|
background-color: #f0f8ff;
|
|
}
|
|
|
|
.calendar-day__events {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 4px;
|
|
margin-top: auto;
|
|
}
|
|
|
|
.calendar-day__event {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.calendar-week {
|
|
position: relative;
|
|
}
|
|
|
|
.calendar-week__day-cell {
|
|
display: flex;
|
|
flex-direction: column;
|
|
position: relative;
|
|
}
|
|
|
|
.calendar-week__days-grid {
|
|
display: contents;
|
|
}
|
|
|
|
.calendar-week__day-bars {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
padding: 0 2px;
|
|
}
|
|
|
|
.calendar-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 4px 8px;
|
|
border-radius: 3px;
|
|
font-size: 12px;
|
|
color: #fff;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.calendar-event {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
width: 100%;
|
|
background: none !important;
|
|
}
|
|
|
|
.calendar-event__label {
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
color: inherit;
|
|
}
|
|
|
|
.calendar-event__badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: 18px;
|
|
height: 18px;
|
|
padding: 0 3px;
|
|
background-color: rgba(255, 255, 255, 0.3);
|
|
border-radius: 2px;
|
|
font-size: 10px;
|
|
font-weight: bold;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.calendar__legend {
|
|
padding: 16px;
|
|
background-color: #f9f9f9;
|
|
border: 1px solid #e0e0e0;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.calendar__legend h3 {
|
|
margin: 0 0 12px 0;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: #333;
|
|
}
|
|
|
|
.calendar__legend-items {
|
|
display: flex;
|
|
gap: 24px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.calendar__legend-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 13px;
|
|
color: #666;
|
|
}
|
|
|
|
.calendar__legend-swatch {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 16px;
|
|
height: 16px;
|
|
border-radius: 2px;
|
|
flex-shrink: 0;
|
|
font-size: 11px;
|
|
font-weight: bold;
|
|
color: #fff;
|
|
}
|
|
|
|
.calendar__legend-swatch--dubbeldag {
|
|
background-color: rgba(0, 0, 0, 0.2);
|
|
border: 1px solid #999;
|
|
color: #333;
|
|
}
|
|
|
|
.calendar__grid--with-week-numbers {
|
|
grid-template-columns: 50px repeat(7, 1fr);
|
|
}
|
|
|
|
.calendar__week-number-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 12px 8px;
|
|
font-weight: 600;
|
|
font-size: 12px;
|
|
color: #999;
|
|
background-color: #fafafa;
|
|
border-right: 1px solid #d0d0d0;
|
|
pointer-events: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.calendar__week-number {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 8px;
|
|
font-weight: 600;
|
|
font-size: 11px;
|
|
color: #999;
|
|
border-right: 1px solid #d0d0d0;
|
|
background-color: #fafafa;
|
|
pointer-events: none;
|
|
user-select: none;
|
|
min-height: 84px;
|
|
}
|
|
|
|
.calendar__week-number-text {
|
|
display: block;
|
|
}
|