168 lines
5.1 KiB
TypeScript
168 lines
5.1 KiB
TypeScript
import { defineType, defineField } from 'sanity'
|
||
|
||
export default defineType({
|
||
name: 'homePage',
|
||
title: 'Page d\'accueil',
|
||
type: 'document',
|
||
groups: [
|
||
{ name: 'hero', title: 'Hero' },
|
||
{ name: 'collection', title: 'Collection' },
|
||
{ name: 'contact', title: 'Contact / WhatsApp' },
|
||
{ name: 'footer', title: 'Footer' },
|
||
{ name: 'seo', title: 'SEO' },
|
||
],
|
||
fields: [
|
||
// ── HERO ──────────────────────────────────────────────────
|
||
defineField({
|
||
name: 'heroLabel',
|
||
title: 'Label hero',
|
||
type: 'string',
|
||
initialValue: '// ARCHIVE_001 — 2026',
|
||
group: 'hero',
|
||
}),
|
||
defineField({
|
||
name: 'heroTitle',
|
||
title: 'Titre hero',
|
||
type: 'string',
|
||
initialValue: 'REBOURS STUDIO',
|
||
description: 'Utiliser | pour un retour à la ligne (ex: REBOURS|STUDIO)',
|
||
group: 'hero',
|
||
validation: (rule) => rule.required(),
|
||
}),
|
||
defineField({
|
||
name: 'heroSubtitle',
|
||
title: 'Sous-titre hero',
|
||
type: 'text',
|
||
rows: 2,
|
||
initialValue: 'Mobilier d\'art contemporain.\nSpace Age × Memphis.',
|
||
group: 'hero',
|
||
}),
|
||
defineField({
|
||
name: 'heroStatus',
|
||
title: 'Status hero',
|
||
type: 'text',
|
||
rows: 2,
|
||
initialValue: 'STATUS: [PROTOTYPE EN COURS]\nCOLLECTION_001 — BIENTÔT DISPONIBLE',
|
||
group: 'hero',
|
||
}),
|
||
defineField({
|
||
name: 'heroImage',
|
||
title: 'Image hero',
|
||
type: 'image',
|
||
options: { hotspot: true },
|
||
description: 'Image principale du hero. Si vide, utilise l\'image du premier produit.',
|
||
group: 'hero',
|
||
fields: [
|
||
defineField({
|
||
name: 'alt',
|
||
title: 'Texte alternatif',
|
||
type: 'string',
|
||
}),
|
||
],
|
||
}),
|
||
|
||
// ── COLLECTION ────────────────────────────────────────────
|
||
defineField({
|
||
name: 'collectionLabel',
|
||
title: 'Label collection',
|
||
type: 'string',
|
||
initialValue: '// COLLECTION_001',
|
||
group: 'collection',
|
||
}),
|
||
defineField({
|
||
name: 'collectionCta',
|
||
title: 'Texte d\'action collection',
|
||
type: 'string',
|
||
initialValue: 'CLIQUER POUR OUVRIR',
|
||
description: 'Affiché après le nombre d\'objets',
|
||
group: 'collection',
|
||
}),
|
||
|
||
// ── CONTACT / WHATSAPP ────────────────────────────────────
|
||
defineField({
|
||
name: 'contactLabel',
|
||
title: 'Label contact',
|
||
type: 'string',
|
||
initialValue: '// CONTACT',
|
||
group: 'contact',
|
||
}),
|
||
defineField({
|
||
name: 'contactTitle',
|
||
title: 'Titre contact',
|
||
type: 'string',
|
||
initialValue: 'UNE QUESTION ? PARLONS-EN',
|
||
description: 'Utiliser | pour un retour à la ligne',
|
||
group: 'contact',
|
||
}),
|
||
defineField({
|
||
name: 'contactDescription',
|
||
title: 'Description contact',
|
||
type: 'text',
|
||
rows: 2,
|
||
initialValue: 'Commandes sur mesure, questions techniques,\nou simplement dire bonjour.',
|
||
group: 'contact',
|
||
}),
|
||
defineField({
|
||
name: 'whatsappNumber',
|
||
title: 'Numéro WhatsApp',
|
||
type: 'string',
|
||
initialValue: '33651755191',
|
||
description: 'Format international sans + (ex: 33612345678)',
|
||
group: 'contact',
|
||
validation: (rule) => rule.required(),
|
||
}),
|
||
defineField({
|
||
name: 'whatsappButtonText',
|
||
title: 'Texte bouton WhatsApp',
|
||
type: 'string',
|
||
initialValue: 'CONTACTEZ-NOUS SUR WHATSAPP',
|
||
group: 'contact',
|
||
}),
|
||
defineField({
|
||
name: 'contactResponseTime',
|
||
title: 'Temps de réponse',
|
||
type: 'string',
|
||
initialValue: 'RÉPONSE SOUS 24H',
|
||
group: 'contact',
|
||
}),
|
||
|
||
// ── FOOTER ────────────────────────────────────────────────
|
||
defineField({
|
||
name: 'footerText',
|
||
title: 'Texte footer',
|
||
type: 'string',
|
||
initialValue: '© 2026 REBOURS STUDIO — PARIS',
|
||
group: 'footer',
|
||
}),
|
||
defineField({
|
||
name: 'instagramUrl',
|
||
title: 'Lien Instagram',
|
||
type: 'url',
|
||
initialValue: 'https://instagram.com/rebour.studio',
|
||
group: 'footer',
|
||
}),
|
||
|
||
// ── SEO ───────────────────────────────────────────────────
|
||
defineField({
|
||
name: 'seoTitle',
|
||
title: 'Titre SEO',
|
||
type: 'string',
|
||
initialValue: 'REBOURS — Mobilier d\'art contemporain | Collection 001',
|
||
group: 'seo',
|
||
}),
|
||
defineField({
|
||
name: 'seoDescription',
|
||
title: 'Description SEO',
|
||
type: 'text',
|
||
rows: 3,
|
||
initialValue: 'REBOURS Studio crée du mobilier d\'art contemporain inspiré du Space Age et du mouvement Memphis. Pièces uniques fabriquées à Paris. Collection 001 en cours.',
|
||
group: 'seo',
|
||
}),
|
||
],
|
||
preview: {
|
||
prepare() {
|
||
return { title: 'Page d\'accueil' }
|
||
},
|
||
},
|
||
})
|