Refactors event rendering and display
Improves event rendering by introducing dedicated event renderers and streamlining event display logic. - Adds a base event renderer and specialized date and resource-based renderers to handle event display logic. - Renders all-day events within a dedicated container in the calendar header. - Removes the direct filtering of all-day events from the `GridManager`. - Fixes an issue where the 'Summer Festival' event started on the wrong date. The changes enhance the flexibility and maintainability of the calendar, provide dedicated containers and styling for allday events and fix date issues related to certain events
This commit is contained in:
parent
25522bfe17
commit
9c65143df2
11 changed files with 190 additions and 121 deletions
|
|
@ -266,10 +266,20 @@ swp-day-header[data-today="true"] swp-day-date {
|
|||
}
|
||||
|
||||
|
||||
/* All-day events in row 2 */
|
||||
/* All-day event container - spans columns as needed */
|
||||
swp-allday-container {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr; /* Single column for now, can expand later */
|
||||
grid-auto-rows: min-content;
|
||||
gap: 2px;
|
||||
padding: 2px;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* All-day events in containers */
|
||||
swp-allday-event {
|
||||
grid-row: 2; /* Row 2 only */
|
||||
height: calc(var(--all-day-row-height) - 3px); /* Dynamic height minus margin */
|
||||
height: 22px; /* Fixed height for consistent stacking */
|
||||
background: #ff9800; /* Default orange background */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
@ -277,16 +287,15 @@ swp-allday-event {
|
|||
color: #fff;
|
||||
font-size: 0.75rem;
|
||||
padding: 2px 4px;
|
||||
margin: 1px;
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.1);
|
||||
border-left: 3px solid rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
swp-allday-event:last-child {
|
||||
border-right: none; /* Remove border from last all-day event */
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* Scrollable content */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue