Improves calendar event rendering and data
Updates mock event data to reflect a more recent week and includes events spanning early/late hours. Enhances event rendering by adjusting the top and height styles for better visual appearance. Refactors CSS to improve grid line display and event hover effects, and moves hour marker styles to a more appropriate CSS file. Provides default fallback values for time boundaries using CSS variables.
This commit is contained in:
parent
28ed131b9e
commit
5a686da7f5
8 changed files with 74 additions and 61 deletions
|
|
@ -16,7 +16,7 @@
|
|||
--day-column-min-width: 250px;
|
||||
--week-days: 7;
|
||||
|
||||
/* Time boundaries */
|
||||
/* Time boundaries - Default fallback values */
|
||||
--day-start-hour: 0;
|
||||
--day-end-hour: 24;
|
||||
--work-start-hour: 8;
|
||||
|
|
@ -32,6 +32,7 @@
|
|||
/* Grid colors */
|
||||
--color-grid-line: #e0e0e0;
|
||||
--color-grid-line-light: rgba(0, 0, 0, 0.05);
|
||||
--color-hour-line: #b0b0b0;
|
||||
--color-work-hours: rgba(0, 100, 0, 0.06);
|
||||
--color-current-time: #ff0000;
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ swp-event {
|
|||
|
||||
swp-event:hover {
|
||||
box-shadow: var(--shadow-md);
|
||||
transform: scale(1.02);
|
||||
filter: brightness(0.95);
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ swp-time-axis {
|
|||
left: 0;
|
||||
z-index: 3; /* Lower than header elements so it scrolls behind them */
|
||||
width: 60px;
|
||||
overflow: hidden;
|
||||
overflow: visible;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
|
@ -206,8 +206,8 @@ swp-hour-marker::after {
|
|||
top: 0;
|
||||
left: 100%;
|
||||
width: 100vw;
|
||||
height: 2px;
|
||||
background: var(--color-grid-line);
|
||||
height: 1px;
|
||||
background: #d0d0d0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
|
@ -303,7 +303,7 @@ swp-time-grid::before {
|
|||
/* Grid lines */
|
||||
swp-grid-lines {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
top: 1px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
|
|
|
|||
|
|
@ -215,26 +215,7 @@ swp-time-axis {
|
|||
z-index: 4;
|
||||
}
|
||||
|
||||
swp-hour-marker {
|
||||
height: var(--hour-height);
|
||||
padding: 0 8px 8px 8px;
|
||||
font-size: 0.75rem;
|
||||
color: var(--color-text-secondary);
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
swp-hour-marker::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 100%;
|
||||
width: 100vw;
|
||||
height: 1px;
|
||||
background: var(--color-grid-line);
|
||||
pointer-events: none;
|
||||
}
|
||||
/* swp-hour-marker styles moved to calendar-layout-css.css */
|
||||
|
||||
/* Week header */
|
||||
swp-week-header {
|
||||
|
|
@ -379,7 +360,7 @@ swp-event[data-type="work"] {
|
|||
|
||||
swp-event:hover {
|
||||
box-shadow: var(--shadow-md);
|
||||
transform: scale(1.02);
|
||||
filter: brightness(0.95);
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<div class="calendar-wrapper">
|
||||
<swp-calendar data-view="week" data-week-days="7" data-snap-interval="15">
|
||||
<swp-calendar data-view="week" data-week-days="7" data-snap-interval="15" data-day-start-hour="6" data-day-end-hour="22" data-hour-height="80">
|
||||
<!-- Navigation Bar -->
|
||||
<swp-calendar-nav>
|
||||
<swp-nav-group>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue