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
|
|
@ -14,19 +14,19 @@ columns:
|
|||
status: listed
|
||||
- width: 1/2
|
||||
fields:
|
||||
contact_email:
|
||||
contactEmail:
|
||||
label: Email
|
||||
type: email
|
||||
width: 1/2
|
||||
translate: false
|
||||
contact_address:
|
||||
contactAddress:
|
||||
label: Adresse
|
||||
type: writer
|
||||
buttons: false
|
||||
nodes: false
|
||||
width: 1/2
|
||||
placeholder: 33 rue Jean Dupont
|
||||
social_links:
|
||||
socialLinks:
|
||||
label: Liens réseaux sociaux
|
||||
type: structure
|
||||
translate: false
|
||||
|
|
@ -55,7 +55,7 @@ columns:
|
|||
contact:
|
||||
type: fields
|
||||
fields:
|
||||
mentions_legales:
|
||||
legalNotices:
|
||||
label: Mentions légales (PDF)
|
||||
type: files
|
||||
max: 1
|
||||
|
|
|
|||
|
|
@ -24,6 +24,18 @@ return function ($page, $kirby, $site) {
|
|||
'name' => $l->name()
|
||||
];
|
||||
})->values(),
|
||||
'contact' => [
|
||||
'email' => (string)$site->contactEmail()->value(),
|
||||
'address' => (string)$site->contactAddress()->value(),
|
||||
'socials' => $site->socialLinks()->toStructure()->map(function($item) {
|
||||
return [
|
||||
'label' => (string)$item->label()->value(),
|
||||
'url' => (string)$item->url()->value(),
|
||||
'picto' => (string)$item->picto()->value(),
|
||||
];
|
||||
})->values(),
|
||||
'legalNotice' => $site->legalNotices()->toFile()?->url(),
|
||||
],
|
||||
'navigation' => $navPages->map(function($p) use ($kirby) {
|
||||
$titles = [];
|
||||
foreach ($kirby->languages() as $lang) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue