mirror of
https://github.com/Alvin-Zilverstand/narrow_casting_system.git
synced 2026-03-06 11:07:14 +01:00
✅ Full-stack narrowcasting platform implementation ✅ Real-time WebSocket communication for instant updates ✅ Zone-specific content distribution (reception, restaurant, skislope, lockers, shop) ✅ Professional admin dashboard with content management interface ✅ Beautiful client display with winter/snow theme matching SnowWorld branding ✅ Comprehensive technical documentation and test suite ✅ Docker deployment support with CI/CD pipeline ✅ All system tests passing successfully 🏗️ Technical Implementation: - Backend: Node.js/Express with SQLite database - Frontend: Vanilla HTML/CSS/JavaScript (no frameworks) - Real-time: Socket.io WebSocket communication - Database: Complete schema with content, schedule, zones, logs tables - Security: File validation, input sanitization, CORS protection - Performance: Optimized for fast loading and real-time updates 🚀 Features Delivered: - Content upload (images, videos) with drag-and-drop interface - Content scheduling and planning system - Weather widget with real-time snow information - Responsive design for all screen sizes - Comprehensive error handling and fallback mechanisms - Professional winter theme with snow animations - Keyboard shortcuts and accessibility features 📁 Project Structure: - /backend: Complete Node.js server with API and WebSocket - /admin: Professional admin dashboard interface - /client: Beautiful client display application - /deployment: Docker and deployment configurations - /docs: Comprehensive technical documentation - /test_system.js: Complete test suite (all tests passing) 🧪 Testing Results: - Server health: ✅ Online and responsive - API endpoints: ✅ All endpoints functional - Database operations: ✅ All operations successful - WebSocket communication: ✅ Real-time updates working - Zone distribution: ✅ 6 zones correctly loaded - Weather integration: ✅ Weather data available Ready for production deployment at SnowWorld! 🎿❄️
658 lines
12 KiB
CSS
658 lines
12 KiB
CSS
/* SnowWorld Client Display Styles */
|
|
:root {
|
|
--primary-color: #0066cc;
|
|
--secondary-color: #e6f3ff;
|
|
--accent-color: #00a8ff;
|
|
--success-color: #28a745;
|
|
--warning-color: #ffc107;
|
|
--danger-color: #dc3545;
|
|
--dark-color: #2c3e50;
|
|
--light-color: #f8f9fa;
|
|
--white: #ffffff;
|
|
--text-primary: #212529;
|
|
--text-secondary: #6c757d;
|
|
--shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
|
--border-radius: 12px;
|
|
--transition: all 0.3s ease;
|
|
}
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
color: var(--white);
|
|
}
|
|
|
|
/* Main Display Container */
|
|
.display-container {
|
|
position: relative;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
|
|
}
|
|
|
|
/* Loading Screen */
|
|
.loading-screen {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 1000;
|
|
transition: opacity 0.5s ease, visibility 0.5s ease;
|
|
}
|
|
|
|
.loading-screen.hidden {
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
}
|
|
|
|
.loading-content {
|
|
text-align: center;
|
|
color: var(--white);
|
|
}
|
|
|
|
.snowflake-loader {
|
|
font-size: 4rem;
|
|
margin-bottom: 2rem;
|
|
animation: snowflake-spin 2s linear infinite;
|
|
}
|
|
|
|
@keyframes snowflake-spin {
|
|
0% { transform: rotate(0deg) scale(1); }
|
|
50% { transform: rotate(180deg) scale(1.1); }
|
|
100% { transform: rotate(360deg) scale(1); }
|
|
}
|
|
|
|
.loading-content h2 {
|
|
font-size: 2.5rem;
|
|
font-weight: 300;
|
|
margin-bottom: 0.5rem;
|
|
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.loading-content p {
|
|
font-size: 1.2rem;
|
|
margin-bottom: 2rem;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.loading-bar {
|
|
width: 200px;
|
|
height: 4px;
|
|
background: rgba(255, 255, 255, 0.3);
|
|
border-radius: 2px;
|
|
overflow: hidden;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.loading-progress {
|
|
height: 100%;
|
|
background: var(--white);
|
|
border-radius: 2px;
|
|
animation: loading-progress 3s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes loading-progress {
|
|
0% { width: 0%; }
|
|
50% { width: 70%; }
|
|
100% { width: 100%; }
|
|
}
|
|
|
|
/* Content Display */
|
|
.content-display {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 1;
|
|
}
|
|
|
|
.content-item {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
opacity: 0;
|
|
transition: opacity 1s ease-in-out;
|
|
}
|
|
|
|
.content-item.active {
|
|
opacity: 1;
|
|
}
|
|
|
|
.content-item img {
|
|
max-width: 100%;
|
|
max-height: 100%;
|
|
object-fit: contain;
|
|
border-radius: var(--border-radius);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.content-item video {
|
|
max-width: 100%;
|
|
max-height: 100%;
|
|
border-radius: var(--border-radius);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.content-item .content-placeholder {
|
|
text-align: center;
|
|
padding: 2rem;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border-radius: var(--border-radius);
|
|
backdrop-filter: blur(10px);
|
|
}
|
|
|
|
.content-placeholder i {
|
|
font-size: 6rem;
|
|
margin-bottom: 1rem;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.content-placeholder h3 {
|
|
font-size: 2rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.content-placeholder p {
|
|
font-size: 1.2rem;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
/* Weather Widget */
|
|
.weather-widget {
|
|
position: absolute;
|
|
top: 2rem;
|
|
right: 2rem;
|
|
background: rgba(255, 255, 255, 0.15);
|
|
backdrop-filter: blur(10px);
|
|
border-radius: var(--border-radius);
|
|
padding: 1.5rem;
|
|
box-shadow: var(--shadow);
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
z-index: 10;
|
|
min-width: 200px;
|
|
}
|
|
|
|
.weather-content {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.weather-temp {
|
|
font-size: 2.5rem;
|
|
font-weight: 300;
|
|
color: var(--white);
|
|
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.weather-info {
|
|
flex: 1;
|
|
}
|
|
|
|
.weather-condition {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
margin-bottom: 0.5rem;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.weather-condition i {
|
|
color: var(--accent-color);
|
|
}
|
|
|
|
.weather-details {
|
|
font-size: 0.9rem;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
/* Zone Indicator */
|
|
.zone-indicator {
|
|
position: absolute;
|
|
top: 2rem;
|
|
left: 2rem;
|
|
background: rgba(255, 255, 255, 0.15);
|
|
backdrop-filter: blur(10px);
|
|
border-radius: var(--border-radius);
|
|
padding: 1rem 1.5rem;
|
|
box-shadow: var(--shadow);
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
z-index: 10;
|
|
}
|
|
|
|
.zone-info {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
font-size: 1.2rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.zone-info i {
|
|
color: var(--accent-color);
|
|
}
|
|
|
|
/* Time Display */
|
|
.time-display {
|
|
position: absolute;
|
|
bottom: 2rem;
|
|
right: 2rem;
|
|
background: rgba(255, 255, 255, 0.15);
|
|
backdrop-filter: blur(10px);
|
|
border-radius: var(--border-radius);
|
|
padding: 1.5rem;
|
|
box-shadow: var(--shadow);
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
z-index: 10;
|
|
text-align: center;
|
|
}
|
|
|
|
.current-time {
|
|
font-size: 3rem;
|
|
font-weight: 300;
|
|
color: var(--white);
|
|
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.current-date {
|
|
font-size: 1rem;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
/* Snow Animation */
|
|
.snow-animation {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
pointer-events: none;
|
|
z-index: 0;
|
|
}
|
|
|
|
.snowflake {
|
|
position: absolute;
|
|
color: rgba(255, 255, 255, 0.8);
|
|
font-size: 1rem;
|
|
animation: snowfall linear infinite;
|
|
}
|
|
|
|
.snowflake:nth-child(1) {
|
|
left: 10%;
|
|
animation-duration: 10s;
|
|
animation-delay: 0s;
|
|
}
|
|
|
|
.snowflake:nth-child(2) {
|
|
left: 20%;
|
|
animation-duration: 12s;
|
|
animation-delay: 1s;
|
|
}
|
|
|
|
.snowflake:nth-child(3) {
|
|
left: 30%;
|
|
animation-duration: 8s;
|
|
animation-delay: 2s;
|
|
}
|
|
|
|
.snowflake:nth-child(4) {
|
|
left: 40%;
|
|
animation-duration: 14s;
|
|
animation-delay: 0.5s;
|
|
}
|
|
|
|
.snowflake:nth-child(5) {
|
|
left: 50%;
|
|
animation-duration: 9s;
|
|
animation-delay: 1.5s;
|
|
}
|
|
|
|
.snowflake:nth-child(6) {
|
|
left: 60%;
|
|
animation-duration: 11s;
|
|
animation-delay: 3s;
|
|
}
|
|
|
|
.snowflake:nth-child(7) {
|
|
left: 70%;
|
|
animation-duration: 13s;
|
|
animation-delay: 2.5s;
|
|
}
|
|
|
|
.snowflake:nth-child(8) {
|
|
left: 80%;
|
|
animation-duration: 15s;
|
|
animation-delay: 4s;
|
|
}
|
|
|
|
@keyframes snowfall {
|
|
0% {
|
|
transform: translateY(-100vh) rotate(0deg);
|
|
opacity: 1;
|
|
}
|
|
100% {
|
|
transform: translateY(100vh) rotate(360deg);
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
/* Connection Status */
|
|
.connection-status {
|
|
position: absolute;
|
|
bottom: 2rem;
|
|
left: 2rem;
|
|
background: rgba(255, 255, 255, 0.15);
|
|
backdrop-filter: blur(10px);
|
|
border-radius: var(--border-radius);
|
|
padding: 0.75rem 1rem;
|
|
box-shadow: var(--shadow);
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
z-index: 10;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.status-indicator {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: var(--success-color);
|
|
animation: pulse 2s infinite;
|
|
}
|
|
|
|
.status-dot.disconnected {
|
|
background: var(--danger-color);
|
|
animation: none;
|
|
}
|
|
|
|
.status-dot.connecting {
|
|
background: var(--warning-color);
|
|
animation: pulse 1s infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.5; }
|
|
}
|
|
|
|
/* Error Overlay */
|
|
.error-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.8);
|
|
display: none;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 2000;
|
|
}
|
|
|
|
.error-overlay.active {
|
|
display: flex;
|
|
}
|
|
|
|
.error-content {
|
|
background: var(--white);
|
|
color: var(--text-primary);
|
|
padding: 3rem;
|
|
border-radius: var(--border-radius);
|
|
text-align: center;
|
|
box-shadow: var(--shadow);
|
|
max-width: 400px;
|
|
}
|
|
|
|
.error-icon {
|
|
font-size: 4rem;
|
|
color: var(--danger-color);
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.error-content h3 {
|
|
margin-bottom: 1rem;
|
|
color: var(--danger-color);
|
|
}
|
|
|
|
.error-content p {
|
|
margin-bottom: 2rem;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.retry-button {
|
|
background: var(--primary-color);
|
|
color: var(--white);
|
|
border: none;
|
|
padding: 0.75rem 1.5rem;
|
|
border-radius: var(--border-radius);
|
|
cursor: pointer;
|
|
font-size: 1rem;
|
|
transition: var(--transition);
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.retry-button:hover {
|
|
background: #0052a3;
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
/* Zone Selection Modal */
|
|
.zone-modal {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.9);
|
|
display: none;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 3000;
|
|
}
|
|
|
|
.zone-modal.active {
|
|
display: flex;
|
|
}
|
|
|
|
.zone-modal-content {
|
|
background: var(--white);
|
|
color: var(--text-primary);
|
|
padding: 3rem;
|
|
border-radius: var(--border-radius);
|
|
text-align: center;
|
|
box-shadow: var(--shadow);
|
|
max-width: 600px;
|
|
width: 90%;
|
|
}
|
|
|
|
.zone-modal-content h2 {
|
|
margin-bottom: 1rem;
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.zone-modal-content p {
|
|
margin-bottom: 2rem;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.zone-options {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 1rem;
|
|
}
|
|
|
|
.zone-option {
|
|
background: var(--light-color);
|
|
border: 2px solid transparent;
|
|
border-radius: var(--border-radius);
|
|
padding: 1.5rem;
|
|
cursor: pointer;
|
|
transition: var(--transition);
|
|
text-align: center;
|
|
}
|
|
|
|
.zone-option:hover {
|
|
border-color: var(--primary-color);
|
|
transform: translateY(-2px);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.zone-option.selected {
|
|
border-color: var(--primary-color);
|
|
background: var(--secondary-color);
|
|
}
|
|
|
|
.zone-option-icon {
|
|
font-size: 2rem;
|
|
color: var(--primary-color);
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.zone-option-name {
|
|
font-weight: 600;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.zone-option-description {
|
|
font-size: 0.9rem;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
/* Content Transitions */
|
|
.content-fade-in {
|
|
animation: contentFadeIn 1s ease-in-out;
|
|
}
|
|
|
|
@keyframes contentFadeIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: scale(0.9);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
.content-fade-out {
|
|
animation: contentFadeOut 1s ease-in-out;
|
|
}
|
|
|
|
@keyframes contentFadeOut {
|
|
from {
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
transform: scale(1.1);
|
|
}
|
|
}
|
|
|
|
/* Responsive Design */
|
|
@media (max-width: 768px) {
|
|
.weather-widget {
|
|
top: 1rem;
|
|
right: 1rem;
|
|
padding: 1rem;
|
|
min-width: 150px;
|
|
}
|
|
|
|
.weather-temp {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
.zone-indicator {
|
|
top: 1rem;
|
|
left: 1rem;
|
|
padding: 0.75rem 1rem;
|
|
}
|
|
|
|
.time-display {
|
|
bottom: 1rem;
|
|
right: 1rem;
|
|
padding: 1rem;
|
|
}
|
|
|
|
.current-time {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
.connection-status {
|
|
bottom: 1rem;
|
|
left: 1rem;
|
|
padding: 0.5rem 0.75rem;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.zone-options {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
/* High contrast mode support */
|
|
@media (prefers-contrast: high) {
|
|
.weather-widget,
|
|
.zone-indicator,
|
|
.time-display,
|
|
.connection-status {
|
|
background: rgba(0, 0, 0, 0.8);
|
|
color: white;
|
|
border: 2px solid white;
|
|
}
|
|
}
|
|
|
|
/* Reduced motion support */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.snowflake-loader {
|
|
animation: none;
|
|
}
|
|
|
|
.loading-progress {
|
|
animation: none;
|
|
width: 100%;
|
|
}
|
|
|
|
.snowflake {
|
|
animation: none;
|
|
}
|
|
|
|
* {
|
|
animation-duration: 0.01ms !important;
|
|
animation-iteration-count: 1 !important;
|
|
transition-duration: 0.01ms !important;
|
|
}
|
|
} |