From 9ff03cd41a5d239112a1f1f228d1480a0a115d66 Mon Sep 17 00:00:00 2001 From: "d.viti" Date: Tue, 14 Oct 2025 00:27:00 +0200 Subject: [PATCH] feat: Add logo and color palette support to project-mode Features added to project-mode.html: - Logo upload section in 'Dati Azienda' (matches shop-mode design) - Base64 logo encoding and preview - K-means color palette extraction (5-7 colors) - Average color calculation as brand color - Visual palette display with color chips Functions copied from shop-mode: - handleLogoUpload() - File upload with size validation (2MB max) - extractDominantColor() - K-means clustering algorithm - kMeansClustering() - Palette extraction with convergence - rgbToHex() / hexToRgb() - Color conversion utilities PDF improvements: - generaPDFCliente() now includes logo in header - generaPDFInterno() now includes logo in header - Dynamic brand colors from extracted palette - Responsive layout (centered without logo, left-aligned with logo) - White card background for logo with subtle border Data persistence: - logoColor and colorPalette added to salvaDati() - Logo and palette restored in caricaPreventivoSalvato() UI features: - Drag & drop logo upload - Real-time color extraction on upload - Palette visualization (8x8px color chips with hover effect) - Brand color display with hex value - Delete logo button Algorithm specs: - Skip whites (RGB > 235), blacks (< 20), grays (sat < 0.2) - 3-6 clusters based on image complexity - 10 iterations with early convergence - Lightness filter (0.25-0.80 range) - Sort by saturation (most vibrant first) Both modes now have identical logo/branding features! --- project-mode.html | 4108 +++++++++++++++++++++++++++++---------------- 1 file changed, 2647 insertions(+), 1461 deletions(-) diff --git a/project-mode.html b/project-mode.html index 9590da8..b5928a3 100644 --- a/project-mode.html +++ b/project-mode.html @@ -1,1499 +1,2685 @@ - + - - - - Calcolatore Prezzi Software Pro - Italia - - - - - - - - - - - - - - - - - - - -
- - -
-

- - Calcolatore Prezzi Software Pro -

-

Sistema professionale per preventivi sviluppo software in Italia

-
- -
-
- - + /* Animazioni personalizzate */ + @keyframes slideIn { + from { + opacity: 0; + transform: translateY(20px); + } + to { + opacity: 1; + transform: translateY(0); + } + } + + .animate-slide-in { + animation: slideIn 0.5s ease-out; + } + + /* Effetto glass morphism */ + .glass { + background: rgba(255, 255, 255, 0.95); + backdrop-filter: blur(10px); + border: 1px solid rgba(255, 255, 255, 0.3); + } + + /* Custom scrollbar */ + ::-webkit-scrollbar { + width: 8px; + height: 8px; + } + + ::-webkit-scrollbar-track { + background: #f1f1f1; + border-radius: 10px; + } + + ::-webkit-scrollbar-thumb { + background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%); + border-radius: 10px; + } + + /* Loading animation */ + .loader { + border: 3px solid #f3f3f3; + border-top: 3px solid #3b82f6; + border-radius: 50%; + width: 40px; + height: 40px; + animation: spin 1s linear infinite; + } + + @keyframes spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } + } + + + +
+ +
+

+ + Calcolatore Prezzi Software Pro +

+

+ Sistema professionale per preventivi sviluppo software in + Italia +

-
- -
-
-
- - -
-

- - Dati Azienda -

-
-
- - -
-
- - -
-
- - -
-
- - + +
+
+ +
-
- -
-

- - Dati Cliente -

-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
+ +
+
-
- -
-

- - Membri del Team - INTERNO -

- - -
- -
- - - - -
-

- - Team attivo: -

-

- Tariffa media sviluppo: | - Tariffa media supporto: -

-
-
+
- -
- -
- - - +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
- -
- -
-

- - Configurazione Regime Fiscale -

-
-
- - -
- - - - - - - - -