- Added support for fetching and parsing external ICS calendars, allowing events to be displayed on the duty grid. - Introduced a new API endpoint `/api/calendar-events` to retrieve calendar events within a specified date range. - Updated configuration to include `EXTERNAL_CALENDAR_ICS_URL` for specifying the ICS calendar URL. - Enhanced the web application to visually indicate days with events and provide event summaries on hover. - Improved documentation in the README to include details about the new calendar integration and configuration options. - Updated tests to cover the new calendar functionality and ensure proper integration.
228 lines
3.5 KiB
CSS
228 lines
3.5 KiB
CSS
:root {
|
|
--bg: #1a1b26;
|
|
--surface: #24283b;
|
|
--text: #c0caf5;
|
|
--muted: #565f89;
|
|
--accent: #7aa2f7;
|
|
--duty: #9ece6a;
|
|
--today: #bb9af7;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
font-family: system-ui, -apple-system, sans-serif;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
min-height: 100vh;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
.container {
|
|
max-width: 420px;
|
|
margin: 0 auto;
|
|
padding: 12px;
|
|
padding-bottom: env(safe-area-inset-bottom, 12px);
|
|
}
|
|
|
|
.header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.header[hidden],
|
|
.weekdays[hidden] {
|
|
display: none !important;
|
|
}
|
|
|
|
.nav {
|
|
width: 40px;
|
|
height: 40px;
|
|
border: none;
|
|
border-radius: 10px;
|
|
background: var(--surface);
|
|
color: var(--accent);
|
|
font-size: 24px;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.nav:active {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.title {
|
|
margin: 0;
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.weekdays {
|
|
display: grid;
|
|
grid-template-columns: repeat(7, 1fr);
|
|
gap: 2px;
|
|
margin-bottom: 6px;
|
|
font-size: 0.75rem;
|
|
color: var(--muted);
|
|
text-align: center;
|
|
}
|
|
|
|
.calendar {
|
|
display: grid;
|
|
grid-template-columns: repeat(7, 1fr);
|
|
gap: 4px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.day {
|
|
aspect-ratio: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
padding: 4px;
|
|
border-radius: 8px;
|
|
font-size: 0.85rem;
|
|
background: var(--surface);
|
|
}
|
|
|
|
.day.other-month {
|
|
opacity: 0.4;
|
|
}
|
|
|
|
.day.today {
|
|
background: var(--today);
|
|
color: var(--bg);
|
|
}
|
|
|
|
.day.has-duty .num {
|
|
font-weight: 700;
|
|
}
|
|
|
|
.day.holiday {
|
|
background: linear-gradient(135deg, var(--surface) 0%, rgba(187, 154, 247, 0.15) 100%);
|
|
border: 1px solid rgba(187, 154, 247, 0.35);
|
|
}
|
|
|
|
.day {
|
|
position: relative;
|
|
}
|
|
|
|
.info-btn {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
width: 22px;
|
|
height: 22px;
|
|
padding: 0;
|
|
border: none;
|
|
background: var(--accent);
|
|
color: var(--bg);
|
|
font-size: 0.7rem;
|
|
font-weight: 700;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
display: inline-flex;
|
|
align-items: flex-start;
|
|
justify-content: flex-end;
|
|
flex-shrink: 0;
|
|
clip-path: path("M 0 0 L 14 0 Q 22 0 22 8 L 22 22 Z");
|
|
padding: 2px 3px 0 0;
|
|
}
|
|
|
|
.info-btn:active {
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.calendar-event-hint {
|
|
position: fixed;
|
|
z-index: 1000;
|
|
max-width: 280px;
|
|
padding: 8px 12px;
|
|
background: var(--surface);
|
|
color: var(--text);
|
|
border-radius: 8px;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
|
|
font-size: 0.85rem;
|
|
line-height: 1.4;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
transform: translateY(-100%);
|
|
}
|
|
|
|
.day-duties {
|
|
font-size: 0.6rem;
|
|
color: var(--duty);
|
|
margin-top: 2px;
|
|
max-width: 100%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.duty-list {
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.duty-list h2 {
|
|
font-size: 0.85rem;
|
|
color: var(--muted);
|
|
margin: 0 0 8px 0;
|
|
}
|
|
|
|
.duty-item {
|
|
padding: 8px 10px;
|
|
margin-bottom: 6px;
|
|
border-radius: 8px;
|
|
background: var(--surface);
|
|
border-left: 3px solid var(--duty);
|
|
}
|
|
|
|
.duty-item .name {
|
|
font-weight: 600;
|
|
}
|
|
|
|
.duty-item .time {
|
|
font-size: 0.8rem;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.loading, .error {
|
|
text-align: center;
|
|
padding: 12px;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.error {
|
|
color: #f7768e;
|
|
}
|
|
|
|
.error[hidden], .loading.hidden {
|
|
display: none !important;
|
|
}
|
|
|
|
.access-denied {
|
|
text-align: center;
|
|
padding: 24px 12px;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.access-denied p {
|
|
margin: 0 0 8px 0;
|
|
}
|
|
|
|
.access-denied p:first-child {
|
|
color: #f7768e;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.access-denied[hidden] {
|
|
display: none !important;
|
|
}
|