Chi Siamo
Marchesan Agricoltura opera dal 1911 con dedizione e innovazione nel settore agricolo.
Bonus – Contatti Modificabili
Email: assistenzamarchesan@gmail.com
Telefono: 351 843 7009
WhatsApp: 351 843 7009
Facebook: marchesanag
Instagram: marchesanag
style.css
body { font-family: Arial, sans-serif; margin: 0; background: #fafafa; }
header { padding: 20px; text-align: center; }
.logo img { height: 80px; border-radius: 8px; }
.edit-btn, .add-section-btn, .reset-btn { padding: 10px; margin: 10px; background: #C49A45; color: white; border: none; cursor: pointer; border-radius: 6px; }
.editable-section { padding: 20px; margin: 20px; background: white; border-radius: 10px; border: 1px solid #ddd; }
.product-card { border: 1px solid #C49A45; padding: 15px; border-radius: 10px; margin-bottom: 20px; }
.product-image-wrapper { width: 100%; height: 200px; overflow: hidden; border-radius: 8px; }
.product-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.social-icons img { width: 40px; margin: 10px; }
[contenteditable="true"] { outline: 2px dashed #C49A45; background: #fff6e0; }
script.js
// --- FUNZIONE CARICAMENTO LOGO --- document.getElementById("logo-upload").addEventListener("change", function(e) { const file = e.target.files[0]; if (!file) return; if (file.type !== "image/jpeg") return alert("Il logo deve essere JPEG");
const reader = new FileReader(); reader.onload = e => document.getElementById("site-logo").src = e.target.result; reader.readAsDataURL(file); });
// --- CARICAMENTO MAIS --- document.getElementById("corn-upload").addEventListener("change", function(e) { const file = e.target.files[0]; if (!file) return; if (file.type !== "image/jpeg") return alert("Usa JPEG");
const reader = new FileReader(); reader.onload = e => document.getElementById("corn-image").src = e.target.result; reader.readAsDataURL(file); });
// --- CARICAMENTO SOIA --- document.getElementById("soy-upload").addEventListener("change", function(e) { const file = e.target.files[0]; if (!file) return; if (file.type !== "image/jpeg") return alert("Usa JPEG");
const reader = new FileReader(); reader.onload = e => document.getElementById("soy-image").src = e.target.result; reader.readAsDataURL(file); });
// --- SISTEMA MODIFICA TESTI --- let editMode = false; const editBtn = document.getElementById("editToggle");
editBtn.addEventListener("click", () => { editMode = !editMode; editBtn.textContent = editMode ? "Disattiva Modifica" : "Attiva Modifica Sito";
document.querySelectorAll("[contenteditable]").forEach(el => { el.contentEditable = editMode; }); });
// --- AGGIUNTA SEZIONE --- document.getElementById("addSectionBtn").addEventListener("click", () => { const area = document.getElementById("contentArea"); const section = document.createElement("section"); section.className = "editable-section"; section.innerHTML = ` Inserisci contenuto...