Fix: champs camelCase + anglais, contact data, nettoyage debug
All checks were successful
Deploy / Deploy to Production (push) Successful in 15s
All checks were successful
Deploy / Deploy to Production (push) Successful in 15s
- Blueprint site.yml : renommage en camelCase (contactEmail, contactAddress, socialLinks, legalNotices) - Controller site.php : mentionsLegales() → legalNotices(), fix (string) casts pour la sérialisation JSON - state/site.svelte.js : ajout champ contact - Menu.svelte : nouveau composant dialog pour le menu overlay - Header.svelte : intégration Menu, animation hamburger CSS - router/index.js : suppression des console.log de debug Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
cfdaf1a6e2
commit
3e9657430f
6 changed files with 296 additions and 16 deletions
|
|
@ -16,29 +16,19 @@ async function loadSlide(path) {
|
|||
slides.setLoading(path, true);
|
||||
}
|
||||
|
||||
console.log(`[router] loadSlide: ${path}`);
|
||||
|
||||
try {
|
||||
const response = await fetch(`${path}.json`);
|
||||
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
||||
const data = await response.json();
|
||||
|
||||
console.log(`[router] fetch ok: ${path}`, {
|
||||
template: data.template,
|
||||
hasSite: !!data.site,
|
||||
navigation: data.site?.navigation,
|
||||
});
|
||||
|
||||
if (!siteInitialized && data.site) {
|
||||
site.set(data.site);
|
||||
locale.initialize(data.site.language, data.site.languages);
|
||||
slides.init(data.site.navigation);
|
||||
siteInitialized = true;
|
||||
console.log(`[router] slides initialized:`, slides.all.map(s => s.path));
|
||||
}
|
||||
|
||||
slides.setData(path, data);
|
||||
console.log(`[router] setData done: ${path}, slides loaded:`, slides.all.map(s => `${s.path}=${s.loaded}`));
|
||||
} catch (error) {
|
||||
console.error(`[router] Failed to load slide ${path}:`, error);
|
||||
slides.setLoading(path, false);
|
||||
|
|
@ -72,12 +62,10 @@ export function slideTo(path, { skipHistory = false } = {}) {
|
|||
|
||||
export async function initRouter() {
|
||||
const initialPath = normalizePath(window.location.pathname);
|
||||
console.log(`[router] initRouter, initialPath: ${initialPath}`);
|
||||
|
||||
await loadSlide(initialPath);
|
||||
|
||||
const idx = slides.getIndexByPath(initialPath);
|
||||
console.log(`[router] after initial load, idx=${idx}, slides.all.length=${slides.all.length}`);
|
||||
if (idx !== -1) {
|
||||
slides.setActiveIndex(idx);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue