"Refactor database connections and templates for better performance (feat)"
This commit is contained in:
@@ -17,17 +17,31 @@
|
||||
background: rgba(15, 23, 42, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
.premium-gradient {
|
||||
|
||||
/* Light Mode Professional Gradient */
|
||||
.professional-gradient {
|
||||
background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #cbd5e1 50%, #94a3b8 75%, #64748b 100%);
|
||||
}
|
||||
|
||||
/* Dark Mode Professional Gradient */
|
||||
.dark .professional-gradient {
|
||||
background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #475569 75%, #64748b 100%);
|
||||
}
|
||||
|
||||
.mercedes-pattern {
|
||||
background-image: radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 2px, transparent 2px),
|
||||
radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 2px, transparent 2px);
|
||||
background-size: 60px 60px;
|
||||
}
|
||||
.premium-shadow {
|
||||
|
||||
.professional-shadow {
|
||||
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.dark .professional-shadow {
|
||||
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.calendar-container {
|
||||
border-radius: 24px;
|
||||
overflow: hidden;
|
||||
@@ -43,26 +57,26 @@
|
||||
{% block content %}
|
||||
<div class="min-h-screen bg-gradient-to-br from-slate-100 via-blue-50 to-indigo-100 dark:from-slate-900 dark:via-slate-800 dark:to-slate-900">
|
||||
|
||||
<!-- Premium Header mit Mercedes-Stern -->
|
||||
<div class="relative overflow-hidden premium-gradient mercedes-pattern rounded-3xl mx-4 lg:mx-8 mt-6 mb-8">
|
||||
<div class="absolute inset-0 bg-black/30"></div>
|
||||
<!-- Professional Header -->
|
||||
<div class="relative overflow-hidden professional-gradient mercedes-pattern rounded-3xl mx-4 lg:mx-8 mt-6 mb-8">
|
||||
<div class="absolute inset-0 bg-black/20 dark:bg-black/40"></div>
|
||||
<div class="absolute inset-0 bg-gradient-to-r from-transparent via-white/5 to-transparent"></div>
|
||||
|
||||
<!-- Live Status Indicator -->
|
||||
<!-- Status Indicator -->
|
||||
<div class="absolute top-6 right-6 flex items-center space-x-3">
|
||||
<div class="flex items-center space-x-2 mercedes-glass rounded-full px-4 py-2">
|
||||
<div class="w-2 h-2 bg-green-400 rounded-full animate-pulse"></div>
|
||||
<span class="text-sm font-medium text-white">Live</span>
|
||||
<span class="text-sm font-medium text-white dark:text-slate-200">Live</span>
|
||||
</div>
|
||||
<div class="mercedes-glass rounded-full px-4 py-2">
|
||||
<span id="live-time" class="text-sm font-medium text-white"></span>
|
||||
<span id="live-time" class="text-sm font-medium text-white dark:text-slate-200"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="relative max-w-7xl mx-auto px-6 lg:px-8 py-16">
|
||||
<div class="text-center">
|
||||
<!-- Mercedes-Benz Logo -->
|
||||
<div class="inline-flex items-center justify-center w-24 h-24 mercedes-glass rounded-full mb-8 premium-shadow">
|
||||
<div class="inline-flex items-center justify-center w-24 h-24 mercedes-glass rounded-full mb-8 professional-shadow">
|
||||
<svg class="w-12 h-12 text-white" viewBox="0 0 80 80" fill="currentColor">
|
||||
<path d="M58.6,4.5C53,1.6,46.7,0,40,0c-6.7,0-13,1.6-18.6,4.5v0C8.7,11.2,0,24.6,0,40c0,15.4,8.7,28.8,21.5,35.5
|
||||
C27,78.3,33.3,80,40,80c6.7,0,12.9-1.7,18.5-4.6C71.3,68.8,80,55.4,80,40C80,24.6,71.3,11.2,58.6,4.5z M4,40
|
||||
@@ -73,20 +87,20 @@
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<h1 class="text-5xl md:text-6xl font-bold mb-6 text-white tracking-tight">
|
||||
<span class="bg-gradient-to-r from-white to-blue-200 bg-clip-text text-transparent">
|
||||
<h1 class="text-5xl md:text-6xl font-bold mb-6 text-white dark:text-slate-100 tracking-tight">
|
||||
<span class="bg-gradient-to-r from-white to-blue-200 dark:from-slate-100 dark:to-slate-300 bg-clip-text text-transparent">
|
||||
Intelligenter Schichtplan
|
||||
</span>
|
||||
</h1>
|
||||
<p class="text-xl md:text-2xl text-blue-100 max-w-4xl mx-auto leading-relaxed mb-8">
|
||||
<p class="text-xl md:text-2xl text-blue-100 dark:text-slate-300 max-w-4xl mx-auto leading-relaxed mb-8">
|
||||
Fortschrittliche Planung und Überwachung Ihrer 3D-Druckprozesse mit Mercedes-Benz Präzision
|
||||
</p>
|
||||
|
||||
<!-- Premium Action Buttons -->
|
||||
<!-- Action Buttons -->
|
||||
<div class="flex flex-wrap justify-center gap-4">
|
||||
{% if can_edit %}
|
||||
<button onclick="openCreateEventModal()"
|
||||
class="group inline-flex items-center px-8 py-4 mercedes-glass rounded-2xl text-white hover:bg-white/20 transition-all duration-500 hover:scale-105 premium-shadow">
|
||||
class="group inline-flex items-center px-8 py-4 mercedes-glass rounded-2xl text-white dark:text-slate-200 hover:bg-white/20 dark:hover:bg-white/10 transition-all duration-500 hover:scale-105 professional-shadow">
|
||||
<svg class="w-6 h-6 mr-3 group-hover:rotate-90 transition-transform duration-300" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path>
|
||||
</svg>
|
||||
@@ -94,14 +108,14 @@
|
||||
</button>
|
||||
{% endif %}
|
||||
<button onclick="refreshCalendar()"
|
||||
class="group inline-flex items-center px-8 py-4 mercedes-glass rounded-2xl text-white hover:bg-white/20 transition-all duration-500 hover:scale-105 premium-shadow">
|
||||
class="group inline-flex items-center px-8 py-4 mercedes-glass rounded-2xl text-white dark:text-slate-200 hover:bg-white/20 dark:hover:bg-white/10 transition-all duration-500 hover:scale-105 professional-shadow">
|
||||
<svg class="w-6 h-6 mr-3 group-hover:rotate-180 transition-transform duration-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path>
|
||||
</svg>
|
||||
<span class="font-medium">Aktualisieren</span>
|
||||
</button>
|
||||
<button onclick="exportCalendar()"
|
||||
class="group inline-flex items-center px-8 py-4 mercedes-glass rounded-2xl text-white hover:bg-white/20 transition-all duration-500 hover:scale-105 premium-shadow">
|
||||
class="group inline-flex items-center px-8 py-4 mercedes-glass rounded-2xl text-white dark:text-slate-200 hover:bg-white/20 dark:hover:bg-white/10 transition-all duration-500 hover:scale-105 professional-shadow">
|
||||
<svg class="w-6 h-6 mr-3 group-hover:scale-110 transition-transform duration-300" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
|
||||
</svg>
|
||||
@@ -114,21 +128,21 @@
|
||||
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 -mt-8 relative z-10">
|
||||
|
||||
<!-- Premium Filter Section -->
|
||||
<div class="mercedes-glass rounded-3xl p-8 mb-8 premium-shadow">
|
||||
<!-- Filter Section -->
|
||||
<div class="mercedes-glass rounded-3xl p-8 mb-8 professional-shadow">
|
||||
<div class="flex flex-col lg:flex-row lg:items-center lg:justify-between space-y-6 lg:space-y-0">
|
||||
<div class="flex flex-col sm:flex-row sm:items-center sm:space-x-6 space-y-4 sm:space-y-0">
|
||||
<!-- Drucker Filter -->
|
||||
<div class="group">
|
||||
<label for="printerFilter" class="block text-sm font-semibold text-slate-700 dark:text-slate-300 mb-2">
|
||||
🔧 Drucker auswählen
|
||||
Drucker auswählen
|
||||
</label>
|
||||
<div class="relative">
|
||||
<select id="printerFilter"
|
||||
class="appearance-none px-6 py-4 pr-12 border border-slate-200 dark:border-slate-600 rounded-2xl bg-white/90 dark:bg-slate-700/90 backdrop-blur-sm text-slate-800 dark:text-white font-medium focus:ring-4 focus:ring-blue-500/25 focus:border-blue-500 transition-all duration-300 hover:bg-white dark:hover:bg-slate-700 cursor-pointer">
|
||||
<option value="">🏭 Alle Produktionseinheiten</option>
|
||||
<option value="">Alle Produktionseinheiten</option>
|
||||
{% for printer in printers %}
|
||||
<option value="{{ printer.id }}">{{ printer.name }} {% if printer.location %}📍 {{ printer.location }}{% endif %}</option>
|
||||
<option value="{{ printer.id }}">{{ printer.name }} {% if printer.location %}({{ printer.location }}){% endif %}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div class="absolute inset-y-0 right-0 flex items-center pr-4 pointer-events-none">
|
||||
@@ -142,16 +156,16 @@
|
||||
<!-- Status Filter -->
|
||||
<div class="group">
|
||||
<label for="statusFilter" class="block text-sm font-semibold text-slate-700 dark:text-slate-300 mb-2">
|
||||
⚡ Status-Filter
|
||||
Status-Filter
|
||||
</label>
|
||||
<div class="relative">
|
||||
<select id="statusFilter"
|
||||
class="appearance-none px-6 py-4 pr-12 border border-slate-200 dark:border-slate-600 rounded-2xl bg-white/90 dark:bg-slate-700/90 backdrop-blur-sm text-slate-800 dark:text-white font-medium focus:ring-4 focus:ring-blue-500/25 focus:border-blue-500 transition-all duration-300 hover:bg-white dark:hover:bg-slate-700 cursor-pointer">
|
||||
<option value="">🔄 Alle Status</option>
|
||||
<option value="running">🟢 Aktiv</option>
|
||||
<option value="queued">🟡 Warteschlange</option>
|
||||
<option value="completed">✅ Abgeschlossen</option>
|
||||
<option value="cancelled">❌ Abgebrochen</option>
|
||||
<option value="">Alle Status</option>
|
||||
<option value="running">Aktiv</option>
|
||||
<option value="queued">Warteschlange</option>
|
||||
<option value="completed">Abgeschlossen</option>
|
||||
<option value="cancelled">Abgebrochen</option>
|
||||
</select>
|
||||
<div class="absolute inset-y-0 right-0 flex items-center pr-4 pointer-events-none">
|
||||
<svg class="h-5 w-5 text-slate-400 group-hover:text-blue-500 transition-colors duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
@@ -180,18 +194,18 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Premium Calendar Container -->
|
||||
<div class="calendar-container premium-shadow">
|
||||
<!-- Calendar Container -->
|
||||
<div class="calendar-container professional-shadow">
|
||||
<div class="p-6">
|
||||
<div id="calendar"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Premium Legend Section -->
|
||||
<div class="mercedes-glass rounded-3xl p-8 mt-8 premium-shadow">
|
||||
<!-- Legend Section -->
|
||||
<div class="mercedes-glass rounded-3xl p-8 mt-8 professional-shadow">
|
||||
<div class="text-center mb-6">
|
||||
<h3 class="text-xl font-bold text-slate-800 dark:text-slate-200 mb-2">
|
||||
🎯 Status-Legende
|
||||
Status-Legende
|
||||
</h3>
|
||||
<p class="text-slate-600 dark:text-slate-400">Übersicht der verschiedenen Produktions-Status</p>
|
||||
</div>
|
||||
@@ -233,7 +247,7 @@
|
||||
<!-- Premium Event Modal -->
|
||||
<div id="eventModal" class="fixed inset-0 bg-black/60 backdrop-blur-sm hidden z-50">
|
||||
<div class="flex items-center justify-center min-h-screen p-4">
|
||||
<div class="mercedes-glass rounded-3xl premium-shadow max-w-2xl w-full p-8 transform transition-all duration-500 scale-95 opacity-0" id="modalContent">
|
||||
<div class="mercedes-glass rounded-3xl professional-shadow max-w-2xl w-full p-8 transform transition-all duration-500 scale-95 opacity-0" id="modalContent">
|
||||
<div class="flex justify-between items-center mb-8">
|
||||
<div>
|
||||
<h3 id="modalTitle" class="text-2xl font-bold text-slate-900 dark:text-white mb-2">
|
||||
|
Reference in New Issue
Block a user