Add event colors (Catppuccin Mocha) and read-only week view for users
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 20s

Admins can now pick a color per event from a Catppuccin Mocha palette;
existing events default to blue. Colors flow through to both the admin
timeline and the new "Неделя" tab in the user view, which reuses the
admin's weekly grid in a read-only mode. Also reworks event blocks to
show a single-line "start–end title" so short events no longer overflow,
tidies the admin toolbar, and expands mobile responsiveness across both
frontends.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
vrubel 2026-07-12 18:03:21 +00:00
parent fc66954c03
commit c40a6569b4
10 changed files with 685 additions and 64 deletions

View file

@ -65,12 +65,45 @@ body {
line-height: 1.4;
}
.view-tabs {
display: flex;
gap: 10px;
margin-bottom: 20px;
}
.view-tab {
border: 1px solid rgba(123, 92, 62, 0.18);
background: rgba(255, 251, 246, 0.75);
color: var(--muted);
border-radius: 999px;
padding: 10px 20px;
font-size: 15px;
font-family: inherit;
cursor: pointer;
transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.view-tab:hover {
transform: translateY(-1px);
}
.view-tab.is-active {
background: linear-gradient(135deg, #d97706 0%, #9a3412 100%);
color: white;
border-color: transparent;
}
.days-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 20px;
}
.days-grid[hidden],
.week-view[hidden] {
display: none;
}
.day-panel {
border-radius: 28px;
padding: 28px;
@ -115,23 +148,188 @@ body {
display: grid;
grid-template-columns: 160px 1fr;
gap: 14px;
background: rgba(15, 118, 110, 0.08);
border: 1px solid rgba(15, 118, 110, 0.14);
background: color-mix(in srgb, var(--event-color, #89b4fa) 16%, white);
border: 1px solid var(--event-color, #89b4fa);
border-left: 8px solid var(--event-color, #89b4fa);
font-size: 28px;
align-items: start;
}
.event-time {
color: var(--event);
color: #1f2937;
font-weight: 700;
}
.event-title {
color: #1f2937;
}
.empty-message {
color: var(--muted);
border: 1px dashed var(--line);
font-size: 24px;
}
.week-view {
background: var(--panel);
border: 1px solid rgba(255, 255, 255, 0.6);
box-shadow: 0 18px 45px rgba(101, 67, 33, 0.12);
backdrop-filter: blur(14px);
border-radius: 28px;
padding: 24px;
margin-top: 20px;
}
.week-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin-bottom: 18px;
flex-wrap: wrap;
}
.nav-btn {
border: 1px solid rgba(123, 92, 62, 0.18);
background: rgba(255, 251, 246, 0.9);
color: var(--text);
border-radius: 999px;
padding: 10px 16px;
font-size: 14px;
font-family: inherit;
cursor: pointer;
transition: transform 0.18s ease;
}
.nav-btn:hover {
transform: translateY(-1px);
}
.range-title {
font-size: 18px;
font-weight: 700;
text-align: center;
}
.week-scroll {
overflow-x: auto;
padding-bottom: 8px;
scrollbar-width: thin;
}
.week-grid {
display: grid;
grid-template-columns: repeat(7, minmax(200px, 1fr));
gap: 14px;
min-width: 1500px;
}
.week-day-card {
border-radius: 22px;
padding: 14px;
background: rgba(255, 255, 255, 0.5);
border: 1px solid var(--line);
}
.week-day-card.is-today {
outline: 2px solid rgba(217, 119, 6, 0.28);
}
.week-day-header {
font-size: 15px;
font-weight: 700;
margin-bottom: 10px;
min-height: 2.4em;
line-height: 1.2;
}
.week-task-list {
display: flex;
flex-direction: column;
gap: 6px;
margin-bottom: 12px;
}
.week-task-item {
background: rgba(22, 101, 52, 0.08);
border: 1px solid rgba(22, 101, 52, 0.14);
border-radius: 12px;
padding: 8px 10px;
font-size: 13px;
}
.timeline {
position: relative;
height: 576px;
border-radius: 18px;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(252, 246, 238, 0.95) 100%);
border: 1px solid var(--line);
overflow: hidden;
}
.timeline-hour {
position: absolute;
left: 0;
right: 0;
height: 48px;
border-top: 1px solid rgba(123, 92, 62, 0.12);
}
.timeline-hour-label {
position: absolute;
top: -8px;
left: 8px;
font-size: 10px;
color: var(--muted);
background: rgba(255, 250, 242, 0.9);
padding: 0 4px;
}
.event-block {
position: absolute;
left: 8px;
right: 8px;
border-radius: 14px;
padding: 6px 10px;
display: flex;
align-items: center;
background: var(--event-color, #89b4fa);
color: #1e1e2e;
box-shadow: 0 10px 20px rgba(30, 30, 46, 0.2);
overflow: hidden;
}
.event-block.recurring {
outline: 2px solid rgba(30, 30, 46, 0.35);
}
.event-block .event-line {
display: flex;
align-items: baseline;
gap: 6px;
min-width: 0;
width: 100%;
}
.event-block .event-time {
font-size: 11px;
opacity: 0.75;
flex-shrink: 0;
white-space: nowrap;
color: #1e1e2e;
}
.event-block .event-title {
font-size: 12px;
font-weight: 700;
line-height: 1.2;
color: #1e1e2e;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
}
@media (max-width: 900px) {
.days-grid {
grid-template-columns: 1fr;
@ -151,3 +349,80 @@ body {
grid-template-columns: 1fr;
}
}
@media (max-width: 640px) {
body {
padding: 14px;
}
.board-hero {
padding: 20px;
border-radius: 22px;
}
.board-hero h1 {
font-size: clamp(26px, 8vw, 38px);
}
.board-label {
font-size: 11px;
}
.board-copy {
font-size: 16px;
}
.view-tabs {
gap: 8px;
}
.view-tab {
flex: 1;
padding: 10px 12px;
font-size: 14px;
text-align: center;
}
.day-panel {
padding: 18px;
border-radius: 20px;
}
.day-title {
font-size: 22px;
}
.task-item,
.event-item {
font-size: 16px;
padding: 12px 14px;
}
.event-item {
gap: 6px;
}
.week-view {
padding: 16px;
border-radius: 20px;
}
.week-toolbar {
justify-content: center;
text-align: center;
}
.range-title {
width: 100%;
order: -1;
margin-bottom: 4px;
}
.timeline {
height: 480px;
}
.week-day-card {
padding: 10px;
}
}