Misc: ajustements i18n, menu et controller
All checks were successful
Deploy / Deploy to Production (push) Successful in 20s
All checks were successful
Deploy / Deploy to Production (push) Successful in 20s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ae86f0ce1c
commit
77080c4928
3 changed files with 72 additions and 40 deletions
|
|
@ -26,7 +26,7 @@ return function ($page, $kirby, $site) {
|
||||||
})->values(),
|
})->values(),
|
||||||
'contact' => [
|
'contact' => [
|
||||||
'email' => (string)$site->contactEmail()->value(),
|
'email' => (string)$site->contactEmail()->value(),
|
||||||
'address' => (string)$site->contactAddress()->value(),
|
'address' => (string)$site->contactAddress()->nl2br(),
|
||||||
'socials' => $site->socialLinks()->toStructure()->map(function($item) {
|
'socials' => $site->socialLinks()->toStructure()->map(function($item) {
|
||||||
return [
|
return [
|
||||||
'label' => (string)$item->label()->value(),
|
'label' => (string)$item->label()->value(),
|
||||||
|
|
|
||||||
|
|
@ -234,20 +234,40 @@
|
||||||
|
|
||||||
/* Mobile — var(--breakpoint-mobile) = 700px */
|
/* Mobile — var(--breakpoint-mobile) = 700px */
|
||||||
@media (max-width: 700px) {
|
@media (max-width: 700px) {
|
||||||
|
.menu-title {
|
||||||
|
font-size: 1.75rem;
|
||||||
|
margin-bottom: 2.5rem;
|
||||||
|
}
|
||||||
.menu-list {
|
.menu-list {
|
||||||
font-size: var(--font-size-subtitle-mobile);
|
font-size: var(--font-size-subtitle-mobile);
|
||||||
grid-area: 6/4 / span 8 / span 8;
|
grid-area: 6/4 / span 8 / span 8;
|
||||||
align-self: start;
|
align-self: start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menu-nav-number {
|
||||||
|
margin-left: -15px;
|
||||||
|
}
|
||||||
|
.menu-nav-label {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
.menu-connect {
|
.menu-connect {
|
||||||
font-size: var(--font-size-button-mobile);
|
|
||||||
grid-area: 8/12 / span 8 / span 8;
|
grid-area: 8/12 / span 8 / span 8;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
align-self: start;
|
align-self: start;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menu-connect-label {
|
||||||
|
font-size: var(--font-size-paragraph-small-mobile);
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-connect-info {
|
||||||
|
font-family: "Danzza Medium", sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
.menu-connect-title {
|
.menu-connect-title {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,51 +1,63 @@
|
||||||
import { locale } from '@state/locale.svelte'
|
import { locale } from "@state/locale.svelte";
|
||||||
|
|
||||||
const dict = {
|
const dict = {
|
||||||
// Article
|
// Article
|
||||||
'published_on': { fr: 'Publié le', en: 'Published on' },
|
published_on: { fr: "Publié le", en: "Published on" },
|
||||||
'link_copied': { fr: 'Lien copié !', en: 'Link copied!' },
|
link_copied: { fr: "Lien copié !", en: "Link copied!" },
|
||||||
'copy_link': { fr: 'Copier le lien', en: 'Copy link' },
|
copy_link: { fr: "Copier le lien", en: "Copy link" },
|
||||||
'share_article': { fr: 'Partager cet article', en: 'Share this article' },
|
share_article: { fr: "Partager cet article", en: "Share this article" },
|
||||||
'related': { fr: 'Nos recommandations', en: 'Our recommendations' },
|
related: { fr: "Nos recommandations", en: "Our recommendations" },
|
||||||
'share_whatsapp': { fr: 'Partager sur WhatsApp', en: 'Share on WhatsApp' },
|
share_whatsapp: { fr: "Partager sur WhatsApp", en: "Share on WhatsApp" },
|
||||||
'share_x': { fr: 'Partager sur X', en: 'Share on X' },
|
share_x: { fr: "Partager sur X", en: "Share on X" },
|
||||||
'share_facebook': { fr: 'Partager sur Facebook', en: 'Share on Facebook' },
|
share_facebook: { fr: "Partager sur Facebook", en: "Share on Facebook" },
|
||||||
'share_linkedin': { fr: 'Partager sur LinkedIn', en: 'Share on LinkedIn' },
|
share_linkedin: { fr: "Partager sur LinkedIn", en: "Share on LinkedIn" },
|
||||||
// Blog
|
// Blog
|
||||||
'loading': { fr: 'Chargement…', en: 'Loading…' },
|
loading: { fr: "Chargement…", en: "Loading…" },
|
||||||
'read_article': { fr: "Lire l'article", en: 'Read article' },
|
read_article: { fr: "Lire l'article", en: "Read article" },
|
||||||
// Play
|
// Play
|
||||||
'play': { fr: 'Jouer', en: 'Play' },
|
play: { fr: "Jouer", en: "Play" },
|
||||||
'coming_soon': { fr: 'Coming soon', en: 'Coming soon' },
|
coming_soon: { fr: "Coming soon", en: "Coming soon" },
|
||||||
// Header
|
// Header
|
||||||
'close_menu': { fr: 'Fermer le menu', en: 'Close menu' },
|
close_menu: { fr: "Fermer le menu", en: "Close menu" },
|
||||||
'open_menu': { fr: 'Ouvrir le menu', en: 'Open menu' },
|
open_menu: { fr: "Ouvrir le menu", en: "Open menu" },
|
||||||
// Footer
|
// Footer
|
||||||
'location': { fr: 'Adresse', en: 'Location' },
|
location: { fr: "Adresse", en: "Location" },
|
||||||
'contact': { fr: 'Contact', en: 'Contact' },
|
contact: { fr: "Contactez-nous", en: "Contact" },
|
||||||
'follow_us': { fr: 'Réseaux', en: 'Follow us' },
|
follow_us: { fr: "Suivez-nous", en: "Follow us" },
|
||||||
'newsletter_heading': { fr: 'Inscrivez-vous à notre newsletter !', en: 'Subscribe to our newsletter!' },
|
newsletter_heading: {
|
||||||
'newsletter_placeholder': { fr: 'Votre email', en: 'Enter your email' },
|
fr: "Inscrivez-vous à notre newsletter !",
|
||||||
'newsletter_submit': { fr: "S'inscrire", en: 'Subscribe' },
|
en: "Subscribe to our newsletter!",
|
||||||
'newsletter_success': { fr: 'Merci pour votre inscription !', en: 'Thank you for subscribing!' },
|
},
|
||||||
'newsletter_error': { fr: 'Une erreur est survenue.', en: 'An error occurred.' },
|
newsletter_placeholder: { fr: "Votre email", en: "Enter your email" },
|
||||||
'copyright': { fr: 'World Game © {year}. Tous droits réservés.', en: 'World Game © {year}. All rights reserved.' },
|
newsletter_submit: { fr: "S'inscrire", en: "Subscribe" },
|
||||||
'legal': { fr: 'Mentions légales', en: 'Legal notice' },
|
newsletter_success: {
|
||||||
'cookies': { fr: 'Préférences cookies', en: 'Cookie preferences' },
|
fr: "Merci pour votre inscription !",
|
||||||
'privacy': { fr: 'Confidentialité', en: 'Privacy' },
|
en: "Thank you for subscribing!",
|
||||||
|
},
|
||||||
|
newsletter_error: {
|
||||||
|
fr: "Une erreur est survenue.",
|
||||||
|
en: "An error occurred.",
|
||||||
|
},
|
||||||
|
copyright: {
|
||||||
|
fr: "World Game © {year}. Tous droits réservés.",
|
||||||
|
en: "World Game © {year}. All rights reserved.",
|
||||||
|
},
|
||||||
|
legal: { fr: "Mentions légales", en: "Legal notice" },
|
||||||
|
cookies: { fr: "Préférences cookies", en: "Cookie preferences" },
|
||||||
|
privacy: { fr: "Confidentialité", en: "Privacy" },
|
||||||
// Menu
|
// Menu
|
||||||
'menu': { fr: 'MENU', en: 'MENU' },
|
menu: { fr: "MENU", en: "MENU" },
|
||||||
'connect': { fr: 'CONNECT', en: 'CONNECT' },
|
connect: { fr: "CONNECT", en: "CONNECT" },
|
||||||
'address': { fr: 'ADRESSE', en: 'LOCATION' },
|
address: { fr: "ADRESSE", en: "LOCATION" },
|
||||||
'mail': { fr: 'MAIL', en: 'MAIL' },
|
mail: { fr: "MAIL", en: "MAIL" },
|
||||||
'socials': { fr: 'RÉSEAUX', en: 'SOCIALS' },
|
socials: { fr: "RÉSEAUX", en: "SOCIALS" },
|
||||||
}
|
};
|
||||||
|
|
||||||
export function t(key, vars = {}) {
|
export function t(key, vars = {}) {
|
||||||
const lang = locale.current
|
const lang = locale.current;
|
||||||
let str = dict[key]?.[lang] ?? dict[key]?.fr ?? key
|
let str = dict[key]?.[lang] ?? dict[key]?.fr ?? key;
|
||||||
for (const [k, v] of Object.entries(vars)) {
|
for (const [k, v] of Object.entries(vars)) {
|
||||||
str = str.replace(`{${k}}`, v)
|
str = str.replace(`{${k}}`, v);
|
||||||
}
|
}
|
||||||
return str
|
return str;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue