Feature: Implement 2-column grid layout for current events
- Removed display limits on current events to show all active notifications - Implemented responsive 2-column grid layout (single column for 1 event, 2 columns for 2+) - Added min-height to event-header for consistent spacing with/without ticket badges - Fixed padding inconsistency between events with and without ticket numbers - Maintained 2-event limit for upcoming events to preserve screen space - Scaled proportionally for 4K displays (90px min-height, 24px margin) This allows the dashboard to display all current events efficiently without vertical overflow, addressing user feedback about event count limitations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -123,6 +123,22 @@
|
|||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.events-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
gap: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Single event - full width */
|
||||||
|
.events-grid.single {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 3 or more events - use 2 columns */
|
||||||
|
.events-grid.multi {
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
.section-title {
|
.section-title {
|
||||||
font-size: 36px;
|
font-size: 36px;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
@@ -199,6 +215,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
|
min-height: 45px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.event-title {
|
.event-title {
|
||||||
@@ -338,12 +355,21 @@
|
|||||||
padding: 24px 50px;
|
padding: 24px 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.events-grid {
|
||||||
|
gap: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
.event-card {
|
.event-card {
|
||||||
padding: 60px 80px;
|
padding: 60px 80px;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 0;
|
||||||
border-left: 100px solid;
|
border-left: 100px solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.event-header {
|
||||||
|
min-height: 90px;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
.event-title {
|
.event-title {
|
||||||
font-size: 64px;
|
font-size: 64px;
|
||||||
}
|
}
|
||||||
@@ -463,12 +489,11 @@
|
|||||||
let html = '';
|
let html = '';
|
||||||
|
|
||||||
// Limit display to fit on TV screen without scrolling
|
// Limit display to fit on TV screen without scrolling
|
||||||
// 1080p: 2+2 = 4 events max
|
// Current events: no limit, use grid layout for space efficiency
|
||||||
// 4K: Will scale up automatically via CSS
|
// Upcoming events: limit to 2 to save space
|
||||||
const MAX_CURRENT = 2;
|
|
||||||
const MAX_UPCOMING = 2;
|
const MAX_UPCOMING = 2;
|
||||||
|
|
||||||
// Current Events (limit to MAX_CURRENT)
|
// Current Events - show all in grid layout
|
||||||
if (data.current && data.current.length > 0) {
|
if (data.current && data.current.length > 0) {
|
||||||
// Determine badge color based on highest severity
|
// Determine badge color based on highest severity
|
||||||
const severity = getHighestSeverity(data.current);
|
const severity = getHighestSeverity(data.current);
|
||||||
@@ -476,8 +501,11 @@
|
|||||||
html += '<div class="events-section">';
|
html += '<div class="events-section">';
|
||||||
html += `<div class="section-title current severity-${severity}">CURRENT EVENTS</div>`;
|
html += `<div class="section-title current severity-${severity}">CURRENT EVENTS</div>`;
|
||||||
|
|
||||||
const currentToShow = data.current.slice(0, MAX_CURRENT);
|
// Determine grid class based on number of events
|
||||||
currentToShow.forEach(event => {
|
const gridClass = data.current.length === 1 ? 'single' : 'multi';
|
||||||
|
html += `<div class="events-grid ${gridClass}">`;
|
||||||
|
|
||||||
|
data.current.forEach(event => {
|
||||||
const borderColor = getColorFromType(event.typecolor);
|
const borderColor = getColorFromType(event.typecolor);
|
||||||
html += `
|
html += `
|
||||||
<div class="event-card current" style="border-left-color: ${borderColor};">
|
<div class="event-card current" style="border-left-color: ${borderColor};">
|
||||||
@@ -493,12 +521,8 @@
|
|||||||
`;
|
`;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Show indicator if there are more events
|
html += '</div>'; // Close grid
|
||||||
if (data.current.length > MAX_CURRENT) {
|
html += '</div>'; // Close section
|
||||||
html += `<div class="more-events">+ ${data.current.length - MAX_CURRENT} more current event(s)</div>`;
|
|
||||||
}
|
|
||||||
|
|
||||||
html += '</div>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Upcoming Events (limit to MAX_UPCOMING)
|
// Upcoming Events (limit to MAX_UPCOMING)
|
||||||
|
|||||||
Reference in New Issue
Block a user