Transformation complète du site HookLab de formation TikTok Shop vers une landing page haute conversion pour agence web locale ciblant les artisans du bâtiment dans le Nord (Douai, Orchies, Valenciennes). - Nouveau design system : bleu nuit/orange sur fond clair (mobile-first) - Hero avec promesse artisan + CTA orange "Réserver mon Audit" - Section "Le Système" (3 étapes : Trouvé, Choisi, Contacté) - Portfolio connecté à Sanity.io (fallback data intégré) - Section "Qui suis-je" avec carte OpenStreetMap interactive - FAQ orientée artisans avec JSON-LD pour Google - Formulaire contact audit gratuit - SEO local : 12 keywords artisans, JSON-LD LocalBusiness - Sanity.io schemas (portfolio, siteSettings) + client conditionnel - Accessibilité : skip-to-content, focus-visible, aria-labels https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
43 lines
934 B
TypeScript
43 lines
934 B
TypeScript
import { sanityClient } from "./client";
|
|
|
|
export interface PortfolioItem {
|
|
_id: string;
|
|
title: string;
|
|
result: string;
|
|
image: unknown;
|
|
slug: string;
|
|
}
|
|
|
|
export interface SiteSettings {
|
|
ownerName: string;
|
|
ownerBio: string;
|
|
ownerPhoto: unknown;
|
|
address: string;
|
|
phone: string;
|
|
email: string;
|
|
lat: number;
|
|
lng: number;
|
|
}
|
|
|
|
export async function getPortfolio(): Promise<PortfolioItem[]> {
|
|
if (!sanityClient) return [];
|
|
try {
|
|
return await sanityClient.fetch(
|
|
`*[_type == "portfolio"] | order(orderRank asc) { _id, title, result, image, "slug": slug.current }`
|
|
);
|
|
} catch {
|
|
return [];
|
|
}
|
|
}
|
|
|
|
export async function getSiteSettings(): Promise<SiteSettings | null> {
|
|
if (!sanityClient) return null;
|
|
try {
|
|
return await sanityClient.fetch(
|
|
`*[_type == "siteSettings"][0] { ownerName, ownerBio, ownerPhoto, address, phone, email, lat, lng }`
|
|
);
|
|
} catch {
|
|
return null;
|
|
}
|
|
}
|