feat: partners section on the homepage (logo + URL, CMS upload)
CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Waiting to run
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Blocked by required conditions
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Blocked by required conditions
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Waiting to run
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Blocked by required conditions

- home.json gains a partners block (title/subtitle/items: name, url, logo),
  rendered on the homepage under the services section (next/image logos
  linking out with rel=noopener)
- CMS: partner logos uploadable from the 🎨 Logó page via POST /partner-logo
  (PNG, 1 MiB cap, filename sanitized to a slug, written to public/partners/)
- schema + types extended; guide updated

Closes MITHOME-83
This commit is contained in:
Do Siki
2026-08-23 10:22:22 +02:00
parent 410b4a2e2f
commit f65c22987f
9 changed files with 215 additions and 1 deletions
+35
View File
@@ -278,3 +278,38 @@ async function saveEditedLogo() {
saveBtn.textContent = '💾 Szerkesztett logó mentése';
}, 'image/png');
}
async function uploadPartner() {
const name = document.getElementById('partner-name').value.trim();
const file = document.getElementById('file-partner').files[0];
const msg = document.getElementById('msg-partner');
const pathOut = document.getElementById('path-partner');
const btn = document.getElementById('btn-partner');
pathOut.textContent = '';
if (!name) { msg.textContent = '❌ Adj meg egy fájlnevet.'; msg.className = 'msg err'; return; }
if (!file) { msg.textContent = '❌ Válassz PNG fájlt.'; msg.className = 'msg err'; return; }
if (file.type !== 'image/png') { msg.textContent = '❌ Csak PNG tölthető fel.'; msg.className = 'msg err'; return; }
btn.disabled = true;
try {
const bytes = new Uint8Array(await file.arrayBuffer());
const res = await fetch('/partner-logo?name=' + encodeURIComponent(name), {
method: 'POST',
headers: { 'Content-Type': 'image/png', 'X-CSRF-Token': CSRF_TOKEN },
body: bytes
});
if (res.status === 401) { location.href = '/login'; return; }
const json = await res.json();
if (json.ok) {
msg.textContent = '✅ Feltöltve.';
msg.className = 'msg ok';
pathOut.textContent = 'Elérési út: ' + json.path;
} else {
msg.textContent = '❌ ' + json.error;
msg.className = 'msg err';
}
} catch (e) {
msg.textContent = '❌ Hálózati hiba';
msg.className = 'msg err';
}
btn.disabled = false;
}