Add school name and logo to home screen and admin header

- School name now appears on the student home screen and updates the page title
- Logo can be uploaded in Settings (PNG/JPG/GIF/WebP/SVG, max 2 MB); stored in the data volume so it persists across container restarts
- When a logo is uploaded the text school name is hidden in favour of the logo
- Admin header shows the school name instead of hardcoded "Homeschool", updates live when saved
- New server endpoints: GET /api/logo, POST /api/admin/upload-logo, DELETE /api/admin/logo
- /api/public-settings now includes school_name and has_logo

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-08-10 16:46:00 -04:00
1 parent 1eedfc7715
commit 6b7baf7297
6 files changed
+135 -5

No files matched your search

+15
View File
@@ -247,6 +247,21 @@ async function loadHome() {
document.querySelector('.page-confetti').style.display =
pubSettings.show_home_emoji === false ? 'none' : '';
const nameTitle = document.getElementById('school-name-title');
if (pubSettings.school_name) {
nameTitle.textContent = pubSettings.school_name;
document.title = pubSettings.school_name;
}
const logoEl = document.getElementById('school-logo');
if (pubSettings.has_logo) {
logoEl.src = `/api/logo?v=${Date.now()}`;
logoEl.hidden = false;
nameTitle.hidden = true;
} else {
logoEl.hidden = true;
nameTitle.hidden = false;
}
const students = await api('/api/students');
$('#no-kids').hidden = students.length > 0;
$('#kid-cards').innerHTML = students