"Update templates for improved UI/UX"

This commit is contained in:
2025-05-29 17:24:06 +02:00
parent 731a9fe6f1
commit ef8b5bf177
8 changed files with 299 additions and 461 deletions

View File

@@ -32,55 +32,7 @@
}
.focus\:border-mercedes-blue:focus { border-color: #0073ce; }
/* Enhanced Page Header */
.guest-header {
background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
border: 1px solid #e2e8f0;
box-shadow:
0 10px 25px -5px rgba(0, 0, 0, 0.1),
0 4px 6px -2px rgba(0, 0, 0, 0.05);
position: relative;
overflow: hidden;
}
.dark .guest-header {
background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
border-color: #334155;
}
.guest-header::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(0, 115, 206, 0.1), transparent);
transition: left 0.5s;
}
.guest-header:hover::before {
left: 100%;
}
/* Enhanced Form Container */
.guest-form-container {
background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
border: 1px solid #e2e8f0;
box-shadow:
0 20px 40px -12px rgba(0, 0, 0, 0.1),
0 8px 16px -4px rgba(0, 0, 0, 0.05);
border-radius: 16px;
position: relative;
overflow: hidden;
}
.dark .guest-form-container {
background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
border-color: #334155;
}
/* Enhanced Form Inputs */
/* Enhanced Form Elements */
.mercedes-form-input {
transition: all 0.2s ease;
border: 1px solid #d1d5db;
@@ -166,100 +118,6 @@
75% { transform: translateX(5px); }
}
/* Enhanced Info Banner */
.info-banner {
background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
border: 1px solid #bfdbfe;
border-radius: 12px;
position: relative;
overflow: hidden;
}
.dark .info-banner {
background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
border-color: #3b82f6;
}
.info-banner::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 4px;
height: 100%;
background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}
/* Enhanced Buttons */
.btn-primary {
background: linear-gradient(135deg, #0073ce 0%, #1e40af 100%);
border: none;
color: white;
padding: 0.75rem 2rem;
border-radius: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
display: inline-flex;
align-items: center;
text-decoration: none;
box-shadow: 0 4px 14px 0 rgba(0, 115, 206, 0.39);
}
.btn-primary::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.5s;
}
.btn-primary:hover::before {
left: 100%;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px 0 rgba(0, 115, 206, 0.5);
}
.btn-secondary {
background: transparent;
border: 2px solid #0073ce;
color: #0073ce;
padding: 0.75rem 2rem;
border-radius: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
transition: all 0.3s ease;
display: inline-flex;
align-items: center;
text-decoration: none;
}
.btn-secondary:hover {
background: #0073ce;
color: white;
transform: translateY(-2px);
}
.dark .btn-secondary {
border-color: #60a5fa;
color: #60a5fa;
}
.dark .btn-secondary:hover {
background: #60a5fa;
color: #1e293b;
}
/* Progress Indicators */
.progress-step {
background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
@@ -329,24 +187,6 @@
}
}
/* Responsive Design */
@media (max-width: 768px) {
.guest-form-container {
margin: 1rem;
padding: 1.5rem !important;
}
.btn-primary,
.btn-secondary {
width: 100%;
justify-content: center;
}
.upload-area {
height: 120px;
}
}
/* Success Animation */
.success-checkmark {
animation: checkmark 0.6s ease-in-out;
@@ -367,6 +207,23 @@
}
}
/* Responsive Design */
@media (max-width: 768px) {
.dashboard-card {
padding: 1rem !important;
}
.btn-primary,
.btn-secondary {
width: 100%;
justify-content: center;
}
.upload-area {
height: 120px;
}
}
/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
@@ -382,74 +239,54 @@
outline: 2px solid #0073ce;
outline-offset: 2px;
}
/* Custom Scrollbar */
.custom-scroll::-webkit-scrollbar {
width: 6px;
}
.custom-scroll::-webkit-scrollbar-track {
background: #f1f5f9;
border-radius: 3px;
}
.custom-scroll::-webkit-scrollbar-thumb {
background: #0073ce;
border-radius: 3px;
}
.custom-scroll::-webkit-scrollbar-thumb:hover {
background: #1e40af;
}
</style>
{% endblock %}
{% block content %}
<div class="space-y-8">
<!-- Enhanced Page Header -->
<div class="guest-header p-6 rounded-xl relative">
<div class="relative z-10">
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-6">
<div class="flex items-center gap-4">
<div class="w-16 h-16 flex-shrink-0 bg-mercedes-blue text-white rounded-xl flex items-center justify-center">
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/>
<div class="dashboard-card p-6">
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-6">
<div class="flex items-center gap-6">
<div class="w-16 h-16 flex-shrink-0 bg-mercedes-blue text-white rounded-xl flex items-center justify-center">
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/>
</svg>
</div>
<div>
<h1 class="text-4xl font-bold text-mercedes-black dark:text-white tracking-tight">Gastanfrage</h1>
<p class="text-mercedes-gray dark:text-slate-400 mt-1 text-lg">Stellen Sie Ihre 3D-Druckauftrag Anfrage mit Mercedes-Benz Qualitätsstandards</p>
<div class="flex items-center mt-2 text-sm text-mercedes-blue">
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
</div>
<div>
<h1 class="text-4xl font-bold text-mercedes-black dark:text-white tracking-tight">Gastanfrage</h1>
<p class="text-mercedes-gray dark:text-slate-400 mt-1 text-lg">Stellen Sie Ihre 3D-Druckauftrag Anfrage</p>
<div class="flex items-center mt-2 text-sm text-mercedes-blue">
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
Bearbeitungszeit: 24-48 Stunden
</div>
<span>Bearbeitungszeit: 24-48 Stunden</span>
</div>
</div>
<div class="flex flex-wrap gap-3">
<a href="{{ url_for('guest.guest_requests_overview') if url_for else '/guest/requests' }}"
class="btn-secondary flex items-center gap-2">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 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"/>
</svg>
<span>Anträge Übersicht</span>
</a>
<a href="{{ url_for('index') if url_for else '/' }}"
class="btn-secondary flex items-center gap-2">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"/>
</svg>
<span>Startseite</span>
</a>
</div>
</div>
<div class="flex flex-wrap gap-3">
<a href="{{ url_for('guest.guest_requests_overview') if url_for else '/guest/requests' }}"
class="btn-secondary flex items-center gap-2">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 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"/>
</svg>
<span>Anträge Übersicht</span>
</a>
<a href="{{ url_for('index') if url_for else '/' }}"
class="btn-secondary flex items-center gap-2">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"/>
</svg>
<span>Startseite</span>
</a>
</div>
</div>
</div>
<!-- Progress Indicator -->
<div class="guest-form-container p-6">
<div class="dashboard-card p-6">
<div class="mb-8">
<h2 class="text-lg font-semibold text-mercedes-black dark:text-white mb-4">Antrags-Fortschritt</h2>
<div class="flex items-center justify-between max-w-md mx-auto">
<div class="flex items-center">
<div class="progress-step active">1</div>
@@ -472,8 +309,8 @@
</div>
<!-- Enhanced Info Banner -->
<div class="info-banner p-6 relative">
<div class="flex items-start gap-4 relative z-10">
<div class="dashboard-card p-6">
<div class="flex items-start gap-4">
<div class="w-12 h-12 bg-blue-500 text-white rounded-xl flex items-center justify-center flex-shrink-0">
<svg class="h-6 w-6" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"/>
@@ -498,15 +335,15 @@
</div>
<div class="flex items-center">
<svg class="w-5 h-5 mr-2 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 2.26a2 2 0 001.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
<span>E-Mail-Benachrichtigung über Status</span>
<span>Professionelle 3D-Druck-Qualität</span>
</div>
<div class="flex items-center">
<svg class="w-5 h-5 mr-2 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/>
</svg>
<span>Automatischer Druckstart nach Genehmigung</span>
<span>Kostenlose Beratung inklusive</span>
</div>
</div>
</div>
@@ -514,7 +351,7 @@
</div>
<!-- Enhanced Form Container -->
<div class="guest-form-container p-8">
<div class="dashboard-card p-8">
<div class="mb-8">
<h2 class="text-2xl font-bold text-mercedes-black dark:text-white mb-3">
Druckantrag einreichen
@@ -536,10 +373,10 @@
</svg>
Persönliche Angaben
</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<!-- Name -->
<div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<!-- Name -->
<div>
<label for="{{ form.name.id if form else 'name' }}" class="block text-sm font-medium text-mercedes-black dark:text-slate-300 mb-2">
Vollständiger Name *
</label>
@@ -552,20 +389,20 @@
{% endif %}
{% if form and form.name.errors %}
<div class="mt-2 text-sm text-mercedes-red">
{% for error in form.name.errors %}
{% for error in form.name.errors %}
<p class="flex items-center">
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
{{ error }}
</p>
{% endfor %}
</div>
{% endif %}
</div>
<!-- E-Mail -->
<div>
{% endfor %}
</div>
{% endif %}
</div>
<!-- E-Mail -->
<div>
<label for="{{ form.email.id if form else 'email' }}" class="block text-sm font-medium text-mercedes-black dark:text-slate-300 mb-2">
E-Mail-Adresse *
</label>
@@ -581,16 +418,16 @@
</p>
{% if form and form.email.errors %}
<div class="mt-2 text-sm text-mercedes-red">
{% for error in form.email.errors %}
{% for error in form.email.errors %}
<p class="flex items-center">
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
{{ error }}
</p>
{% endfor %}
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
</div>
</div>
@@ -603,10 +440,10 @@
</svg>
Projekt-Details
</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<!-- Drucker -->
<div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<!-- Drucker -->
<div>
<label for="{{ form.printer_id.id if form else 'printer_id' }}" class="block text-sm font-medium text-mercedes-black dark:text-slate-300 mb-2">
Gewünschter Drucker *
</label>
@@ -625,24 +462,24 @@
</p>
{% if form and form.printer_id.errors %}
<div class="mt-2 text-sm text-mercedes-red">
{% for error in form.printer_id.errors %}
{% for error in form.printer_id.errors %}
<p class="flex items-center">
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
{{ error }}
</p>
{% endfor %}
</div>
{% endif %}
</div>
<!-- Geschätzte Dauer -->
<div>
{% endfor %}
</div>
{% endif %}
</div>
<!-- Geschätzte Dauer -->
<div>
<label for="{{ form.duration_min.id if form else 'duration_min' }}" class="block text-sm font-medium text-mercedes-black dark:text-slate-300 mb-2">
Geschätzte Druckdauer *
</label>
<div class="relative">
<div class="relative">
{% if form %}
{{ form.duration_min(class="mercedes-form-input block w-full px-4 py-3 pr-20", placeholder="z.B. 120", required="required") }}
{% else %}
@@ -652,27 +489,27 @@
{% endif %}
<div class="absolute inset-y-0 right-0 flex items-center pr-4 pointer-events-none">
<span class="text-mercedes-gray dark:text-slate-400 text-sm font-medium">Minuten</span>
</div>
</div>
</div>
<p class="mt-1 text-xs text-mercedes-gray dark:text-slate-400">
Ungefähre Druckzeit basierend auf der Dateigröße und Komplexität
</p>
{% if form and form.duration_min.errors %}
<div class="mt-2 text-sm text-mercedes-red">
{% for error in form.duration_min.errors %}
{% for error in form.duration_min.errors %}
<p class="flex items-center">
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
{{ error }}
</p>
{% endfor %}
</div>
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
</div>
</div>
<!-- Projektbeschreibung -->
<!-- Projektbeschreibung -->
<div class="mt-6">
<label for="{{ form.reason.id if form else 'reason' }}" class="block text-sm font-medium text-mercedes-black dark:text-slate-300 mb-2">
Projektbeschreibung *
@@ -689,16 +526,16 @@
</p>
{% if form and form.reason.errors %}
<div class="mt-2 text-sm text-mercedes-red">
{% for error in form.reason.errors %}
{% for error in form.reason.errors %}
<p class="flex items-center">
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
{{ error }}
</p>
{% endfor %}
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
</div>
@@ -706,8 +543,8 @@
<div class="bg-gray-50 dark:bg-slate-800/50 rounded-xl p-6">
<h3 class="text-lg font-semibold text-mercedes-black dark:text-white mb-4 flex items-center">
<svg class="w-5 h-5 mr-2 text-mercedes-blue" 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"/>
</svg>
<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"/>
</svg>
3D-Datei hochladen
</h3>
@@ -728,8 +565,8 @@
<span class="px-2 py-1 bg-mercedes-blue text-white rounded">OBJ</span>
<span class="px-2 py-1 bg-mercedes-blue text-white rounded">3MF</span>
<span class="px-2 py-1 bg-mercedes-blue text-white rounded">GCODE</span>
</div>
</div>
</div>
{% if form %}
{{ form.file(class="hidden", id="file-input") }}
{% else %}
@@ -780,21 +617,21 @@
<button type="submit" id="submit-button"
class="btn-primary" disabled>
<svg class="w-5 h-5 mr-2" id="submit-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8"/>
</svg>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8"/>
</svg>
<svg class="w-5 h-5 mr-2 animate-spin hidden" id="submit-spinner" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
<span id="submit-text">Antrag einreichen</span>
</button>
</button>
</div>
</div>
</form>
</div>
<!-- Enhanced Status Check Section -->
<div class="guest-form-container p-8">
<div class="dashboard-card p-8">
<div class="text-center">
<div class="inline-flex items-center justify-center w-16 h-16 bg-mercedes-green text-white rounded-xl mb-6">
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24">
@@ -839,7 +676,7 @@
};
let isSubmitting = false;
document.addEventListener('DOMContentLoaded', function() {
document.addEventListener('DOMContentLoaded', function() {
initializeGuestRequestForm();
});