"Refactor database connections and styling in frontend templates"
This commit is contained in:
parent
57af2da176
commit
8d92a18126
Binary file not shown.
@ -14,16 +14,43 @@ module.exports = {
|
||||
'96': '24rem'
|
||||
},
|
||||
colors: {
|
||||
// Mercedes-Benz Corporate Colors
|
||||
// Mercedes-Benz Corporate Colors - Deep Black Theme
|
||||
'mercedes': {
|
||||
'black': '#000000',
|
||||
'black': '#000000', // Tiefschwarz für Dark Mode
|
||||
'dark-gray': '#0a0a0a', // Sehr dunkles Grau
|
||||
'silver': '#C0C0C0',
|
||||
'dark-gray': '#1a1a1a',
|
||||
'light-gray': '#f5f5f5',
|
||||
'platinum': '#E5E4E2',
|
||||
'charcoal': '#36454F',
|
||||
'charcoal': '#1a1a1a', // Dunkle Akzentfarbe
|
||||
'steel': '#71797E'
|
||||
},
|
||||
// Deep Black Dark Mode Farben
|
||||
'deep-black': {
|
||||
'primary': '#000000', // Haupthintergrund
|
||||
'secondary': '#0a0a0a', // Sekundärer Hintergrund
|
||||
'surface': '#1a1a1a', // Kartenoberflächen
|
||||
'border': '#333333', // Rahmenfarben
|
||||
'text': '#ffffff', // Primärer Text
|
||||
'text-muted': '#a0a0a0' // Gedämpfter Text
|
||||
},
|
||||
// Professional Grid Colors
|
||||
'grid': {
|
||||
'gap-sm': '1rem',
|
||||
'gap-md': '1.5rem',
|
||||
'gap-lg': '2rem',
|
||||
'gap-xl': '2.5rem'
|
||||
},
|
||||
// Status Farben - Optimiert für Dark Mode
|
||||
'status': {
|
||||
'online': '#10b981',
|
||||
'offline': '#ef4444',
|
||||
'warning': '#f59e0b',
|
||||
'info': '#3b82f6',
|
||||
'success': '#059669',
|
||||
'error': '#dc2626',
|
||||
'pending': '#8b5cf6',
|
||||
'processing': '#06b6d4'
|
||||
},
|
||||
// Dark Mode optimierte Farben - Verbessert
|
||||
'dark': {
|
||||
'bg': '#0f172a', // Dunkler Hintergrund
|
||||
@ -60,18 +87,6 @@ module.exports = {
|
||||
'focus': '#e2e8f0',
|
||||
'accent': '#3b82f6'
|
||||
},
|
||||
// Status Farben - Erweitert
|
||||
'status': {
|
||||
'online': '#10b981',
|
||||
'offline': '#ef4444',
|
||||
'warning': '#f59e0b',
|
||||
'info': '#3b82f6',
|
||||
'success': '#059669',
|
||||
'error': '#dc2626',
|
||||
'pending': '#8b5cf6',
|
||||
'processing': '#06b6d4',
|
||||
'unknown': '#6b7280'
|
||||
},
|
||||
// Printer Status Farben - Erweitert
|
||||
'printer': {
|
||||
'ready': '#10b981',
|
||||
@ -111,6 +126,49 @@ module.exports = {
|
||||
'to-red': '#ef4444'
|
||||
}
|
||||
},
|
||||
// Grid Layout Definitionen
|
||||
gridTemplateColumns: {
|
||||
'stats-mobile': '1fr',
|
||||
'stats-tablet': 'repeat(2, 1fr)',
|
||||
'stats-desktop': 'repeat(4, 1fr)',
|
||||
'cards-mobile': '1fr',
|
||||
'cards-tablet': 'repeat(2, 1fr)',
|
||||
'cards-desktop': 'repeat(3, 1fr)',
|
||||
'wide-desktop': 'repeat(4, 1fr)'
|
||||
},
|
||||
// Spacing für konsistente Abstände
|
||||
gap: {
|
||||
'card-sm': '1rem',
|
||||
'card-md': '1.5rem',
|
||||
'card-lg': '2rem',
|
||||
'section': '2.5rem'
|
||||
},
|
||||
// Professional Shadows für Glasmorphismus
|
||||
boxShadow: {
|
||||
'mercedes-glass': '0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1)',
|
||||
'mercedes-hover': '0 12px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15)',
|
||||
'card-dark': '0 25px 50px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.05)',
|
||||
'deep-black': '0 20px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1)'
|
||||
},
|
||||
// Backdrop Blur Values
|
||||
backdropBlur: {
|
||||
'mercedes': '20px',
|
||||
'strong': '25px'
|
||||
},
|
||||
// Typography für Mercedes-Design
|
||||
fontFamily: {
|
||||
'mercedes': ['Inter', 'system-ui', 'sans-serif']
|
||||
},
|
||||
// Animation Timings
|
||||
transitionDuration: {
|
||||
'400': '400ms',
|
||||
'600': '600ms'
|
||||
},
|
||||
// Border Radius für konsistente Rundungen
|
||||
borderRadius: {
|
||||
'mercedes': '1.5rem',
|
||||
'card': '1.25rem'
|
||||
},
|
||||
typography: {
|
||||
DEFAULT: {
|
||||
css: {
|
||||
@ -123,11 +181,12 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
},
|
||||
boxShadow: {
|
||||
'mercedes': '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',
|
||||
'card-dark': '0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2)',
|
||||
}
|
||||
},
|
||||
},
|
||||
plugins: [],
|
||||
plugins: [
|
||||
require('@tailwindcss/forms')({
|
||||
strategy: 'class'
|
||||
}),
|
||||
require('@tailwindcss/typography')
|
||||
],
|
||||
}
|
@ -15,7 +15,7 @@
|
||||
<div class="flex items-center space-x-2">
|
||||
<div class="status-dot status-online"></div>
|
||||
<span class="text-sm font-semibold text-professional-primary">Live</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-glass rounded-full px-4 py-2 animate-scale-in">
|
||||
<span id="live-time" class="text-sm font-semibold text-professional-primary"></span>
|
||||
@ -50,15 +50,15 @@
|
||||
<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>Aktualisieren</span>
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 -mt-8 relative z-10 space-y-8">
|
||||
|
||||
<!-- Neue Reservierung anlegen -->
|
||||
|
||||
<!-- Neue Reservierung anlegen -->
|
||||
<div class="professional-container p-8 lg:p-12 animate-slide-up">
|
||||
<div class="text-center mb-10">
|
||||
<h2 class="title-professional text-3xl font-bold mb-4">
|
||||
@ -68,13 +68,13 @@
|
||||
Erstellen Sie einen neuen Druckauftrag mit professionellen Einstellungen
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Queue-Status-Anzeige -->
|
||||
|
||||
<!-- Queue-Status-Anzeige -->
|
||||
<div id="queue-status-info" class="mb-8"></div>
|
||||
|
||||
|
||||
<form id="newJobForm" class="space-y-8">
|
||||
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
||||
<!-- Drucker auswählen -->
|
||||
<!-- Drucker auswählen -->
|
||||
<div class="group">
|
||||
<label for="printer_id" class="block text-sm font-semibold text-professional-primary mb-3">
|
||||
Drucker auswählen <span class="text-red-500">*</span>
|
||||
@ -82,9 +82,9 @@
|
||||
<div class="relative">
|
||||
<select id="printer_id" name="printer_id" required
|
||||
class="input-professional appearance-none pr-12 cursor-pointer">
|
||||
<option value="">Drucker auswählen...</option>
|
||||
<!-- Wird durch JavaScript gefüllt -->
|
||||
</select>
|
||||
<option value="">Drucker auswählen...</option>
|
||||
<!-- Wird durch JavaScript gefüllt -->
|
||||
</select>
|
||||
<div class="absolute inset-y-0 right-0 flex items-center pr-4 pointer-events-none">
|
||||
<svg class="h-5 w-5 text-professional-muted group-hover:text-professional-primary transition-colors duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
|
||||
@ -92,18 +92,18 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="printer-status-info" class="mt-3 text-center">
|
||||
<!-- Status-Info wird dynamisch gefüllt -->
|
||||
</div>
|
||||
<!-- Status-Info wird dynamisch gefüllt -->
|
||||
</div>
|
||||
<div id="printer-status-warning" class="mt-4 hidden">
|
||||
<div class="alert-professional alert-warning">
|
||||
<div class="flex-shrink-0">
|
||||
<div class="w-12 h-12 bg-gradient-to-br from-orange-500 to-red-600 rounded-2xl flex items-center justify-center">
|
||||
<svg class="h-6 w-6 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path>
|
||||
</svg>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<h3 class="text-lg font-semibold text-professional-primary mb-4">
|
||||
🔄 WARTESCHLANGEN-MODUS: Offline-Drucker ausgewählt!
|
||||
</h3>
|
||||
@ -111,11 +111,11 @@
|
||||
<div class="flex items-center space-x-3">
|
||||
<div class="w-2 h-2 bg-red-500 rounded-full"></div>
|
||||
<span class="text-sm text-professional-secondary">Drucker ist derzeit <strong>OFFLINE</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center space-x-3">
|
||||
<div class="w-2 h-2 bg-yellow-500 rounded-full"></div>
|
||||
<span class="text-sm text-professional-secondary">Job wird in <strong>WARTESCHLANGE</strong> eingereiht</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center space-x-3">
|
||||
<div class="w-2 h-2 bg-blue-500 rounded-full"></div>
|
||||
<span class="text-sm text-professional-secondary">System überwacht alle <strong>2 Minuten</strong></span>
|
||||
@ -126,29 +126,29 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Gewünschte Startzeit -->
|
||||
</div>
|
||||
|
||||
<!-- Gewünschte Startzeit -->
|
||||
<div class="group">
|
||||
<label for="start_time" class="block text-sm font-semibold text-professional-primary mb-3">
|
||||
Gewünschte Startzeit <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<input type="datetime-local" id="start_time" name="start_time" required
|
||||
<input type="datetime-local" id="start_time" name="start_time" required
|
||||
class="input-professional">
|
||||
</div>
|
||||
|
||||
<!-- Geschätzte Druckdauer -->
|
||||
</div>
|
||||
|
||||
<!-- Geschätzte Druckdauer -->
|
||||
<div class="group">
|
||||
<label for="duration" class="block text-sm font-semibold text-professional-primary mb-3">
|
||||
Geschätzte Druckdauer (Minuten) <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<input type="number" id="duration" name="duration" required min="1" max="7200"
|
||||
<input type="number" id="duration" name="duration" required min="1" max="7200"
|
||||
class="input-professional" placeholder="60">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 gap-8">
|
||||
<!-- Job-Titel -->
|
||||
<div class="group">
|
||||
@ -158,29 +158,29 @@
|
||||
<input type="text" id="job_title" name="job_title" required
|
||||
class="input-professional"
|
||||
placeholder="Geben Sie einen beschreibenden Titel ein">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- STL-Datei hochladen -->
|
||||
<div class="group">
|
||||
<label for="stl_file" class="block text-sm font-semibold text-professional-primary mb-3">
|
||||
STL-Datei hochladen (optional)
|
||||
</label>
|
||||
<div class="flex items-center justify-center w-full">
|
||||
<div class="flex items-center justify-center w-full">
|
||||
<label for="stl_file" class="flex flex-col items-center justify-center w-full h-32 border-2 border-slate-300 dark:border-slate-600 border-dashed rounded-2xl cursor-pointer bg-slate-50/50 dark:bg-slate-700/30 hover:bg-slate-100/70 dark:hover:bg-slate-700/50 transition-all duration-300 backdrop-blur-sm">
|
||||
<div class="flex flex-col items-center justify-center pt-5 pb-6">
|
||||
<div class="flex flex-col items-center justify-center pt-5 pb-6">
|
||||
<svg class="w-10 h-10 mb-3 text-professional-muted" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"></path>
|
||||
</svg>
|
||||
</svg>
|
||||
<p class="mb-2 text-sm text-professional-primary"><span class="font-semibold">Klicken Sie zum Hochladen</span> oder ziehen Sie die Datei hierher</p>
|
||||
<p class="text-xs text-professional-muted">STL bis zu 50MB</p>
|
||||
</div>
|
||||
<input id="stl_file" name="stl_file" type="file" accept=".stl" class="hidden" />
|
||||
</label>
|
||||
</div>
|
||||
<input id="stl_file" name="stl_file" type="file" accept=".stl" class="hidden" />
|
||||
</label>
|
||||
</div>
|
||||
<div id="file-name" class="mt-3 text-sm text-professional-muted hidden"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Submit Button -->
|
||||
<div class="flex items-center justify-end pt-8 border-t border-slate-200 dark:border-slate-600">
|
||||
<button type="submit" class="btn-professional group">
|
||||
@ -188,12 +188,12 @@
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path>
|
||||
</svg>
|
||||
<span>Reservierung erstellen</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Aktive und geplante Jobs -->
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Aktive und geplante Jobs -->
|
||||
<div class="professional-container p-8 lg:p-12 animate-slide-up">
|
||||
<div class="text-center mb-10">
|
||||
<h2 class="title-professional text-3xl font-bold mb-4">
|
||||
@ -203,14 +203,14 @@
|
||||
Übersicht Ihrer laufenden und geplanten Druckaufträge
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="active-jobs-container" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
<!-- Jobs werden dynamisch mit JavaScript geladen -->
|
||||
|
||||
<div id="active-jobs-container" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
<!-- Jobs werden dynamisch mit JavaScript geladen -->
|
||||
<div class="col-span-full py-12 text-center" id="no-jobs-message">
|
||||
<div class="text-professional-muted mb-4">
|
||||
<svg class="w-16 h-16 mx-auto" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M9 5H7a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path>
|
||||
</svg>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="text-lg font-semibold text-professional-primary mb-2">Keine aktiven Jobs</h3>
|
||||
<p class="text-professional-muted">Sie haben derzeit keine aktiven oder geplanten Druckjobs.</p>
|
||||
@ -232,12 +232,12 @@
|
||||
<button onclick="closeJobModal()" class="p-2 hover:bg-slate-100 dark:hover:bg-slate-700 rounded-xl transition-colors duration-200">
|
||||
<svg class="w-6 h-6 text-professional-muted hover:text-professional-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
|
||||
</svg>
|
||||
</button>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="jobDetailsContent">
|
||||
<!-- Inhalt wird dynamisch geladen -->
|
||||
<!-- Inhalt wird dynamisch geladen -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -255,8 +255,8 @@
|
||||
<button onclick="closeExtendModal()" class="p-2 hover:bg-slate-100 dark:hover:bg-slate-700 rounded-xl transition-colors duration-200">
|
||||
<svg class="w-6 h-6 text-professional-muted hover:text-professional-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
|
||||
</svg>
|
||||
</button>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form id="extendJobForm" class="space-y-6">
|
||||
@ -292,7 +292,7 @@ window.isAdmin = {% if current_user.is_admin %}true{% else %}false{% endif %};
|
||||
|
||||
// Live Time Update
|
||||
function updateLiveTime() {
|
||||
const now = new Date();
|
||||
const now = new Date();
|
||||
const timeElement = document.getElementById('live-time');
|
||||
if (timeElement) {
|
||||
timeElement.textContent = now.toLocaleTimeString('de-DE');
|
||||
|
Loading…
x
Reference in New Issue
Block a user