feat(hosting): add industry template infrastructure (Workstream 3B)
5 industry templates as JSON presets, each with theme + multi-page content:
- generic: clean minimal (homepage, about, contact)
- restaurant: warm tones, Playfair Display (homepage, about, menu, contact)
- construction: amber/earth tones, Montserrat (homepage, services, projects, contact)
- auto-parts: red/bold, parts-focused (homepage, catalog, contact)
- professional-services: navy/blue, Merriweather (homepage, services, team, contact)
Each template has:
- meta.json (name, description, tags, languages)
- theme.json (colors, fonts, layout, header style)
- pages/*.json (section-based homepage + content pages with i18n)
- {{placeholder}} variables for prospect data injection
TemplateService loads from templates_library/ directory with caching.
GET /admin/hosting/sites/templates endpoint to list available templates.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"id": "restaurant", "name": "Restaurant & Dining", "description": "Elegant template for restaurants, cafés, bars, and catering", "tags": ["food", "dining", "hospitality"], "languages": ["en", "fr", "de"]}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"slug": "about",
|
||||
"title": "About",
|
||||
"title_translations": {"en": "Our Story", "fr": "Notre Histoire", "de": "Über uns"},
|
||||
"template": "default",
|
||||
"is_published": true,
|
||||
"show_in_header": true,
|
||||
"content_translations": {
|
||||
"en": "<h2>Our Story</h2>\n<p>{{about_paragraph}}</p>",
|
||||
"fr": "<h2>Notre Histoire</h2>\n<p>{{about_paragraph}}</p>"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"slug": "contact",
|
||||
"title": "Contact",
|
||||
"title_translations": {"en": "Visit Us", "fr": "Nous Rendre Visite", "de": "Besuchen Sie uns"},
|
||||
"template": "default",
|
||||
"is_published": true,
|
||||
"show_in_header": true,
|
||||
"show_in_footer": true,
|
||||
"content_translations": {
|
||||
"en": "<h2>Visit Us</h2>\n<p>We look forward to welcoming you.</p>\n<ul>\n<li>Address: {{address}}</li>\n<li>Phone: {{phone}}</li>\n<li>Email: {{email}}</li>\n</ul>",
|
||||
"fr": "<h2>Nous Rendre Visite</h2>\n<p>Nous avons hâte de vous accueillir.</p>\n<ul>\n<li>Adresse : {{address}}</li>\n<li>Téléphone : {{phone}}</li>\n<li>Email : {{email}}</li>\n</ul>"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"slug": "homepage",
|
||||
"title": "{{business_name}}",
|
||||
"template": "full",
|
||||
"is_published": true,
|
||||
"sections": {
|
||||
"hero": {
|
||||
"enabled": true,
|
||||
"title": {"translations": {"en": "{{business_name}}", "fr": "{{business_name}}"}},
|
||||
"subtitle": {"translations": {"en": "A culinary experience in {{city}}", "fr": "Une expérience culinaire à {{city}}"}},
|
||||
"background_type": "image",
|
||||
"buttons": [
|
||||
{"label": {"translations": {"en": "Reserve a Table", "fr": "Réserver une table"}}, "url": "/contact", "style": "primary"},
|
||||
{"label": {"translations": {"en": "See Our Menu", "fr": "Voir la carte"}}, "url": "/menu", "style": "secondary"}
|
||||
]
|
||||
},
|
||||
"features": {
|
||||
"enabled": true,
|
||||
"title": {"translations": {"en": "Our Specialties", "fr": "Nos Spécialités"}},
|
||||
"items": [
|
||||
{"icon": "fire", "title": {"translations": {"en": "Fresh Ingredients", "fr": "Produits frais"}}, "description": {"translations": {"en": "Locally sourced, seasonal ingredients", "fr": "Produits locaux et de saison"}}},
|
||||
{"icon": "star", "title": {"translations": {"en": "Chef's Selection", "fr": "Sélection du chef"}}, "description": {"translations": {"en": "Carefully crafted dishes by our expert chef", "fr": "Plats élaborés par notre chef expert"}}},
|
||||
{"icon": "heart", "title": {"translations": {"en": "Warm Atmosphere", "fr": "Ambiance chaleureuse"}}, "description": {"translations": {"en": "A welcoming space for every occasion", "fr": "Un espace accueillant pour chaque occasion"}}}
|
||||
]
|
||||
},
|
||||
"testimonials": {
|
||||
"enabled": true,
|
||||
"title": {"translations": {"en": "What Our Guests Say", "fr": "Ce que disent nos clients"}},
|
||||
"items": []
|
||||
},
|
||||
"cta": {
|
||||
"enabled": true,
|
||||
"title": {"translations": {"en": "Ready to dine with us?", "fr": "Prêt à nous rendre visite ?"}},
|
||||
"buttons": [
|
||||
{"label": {"translations": {"en": "Make a Reservation", "fr": "Réserver"}}, "url": "/contact", "style": "primary"}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"slug": "menu",
|
||||
"title": "Menu",
|
||||
"title_translations": {"en": "Our Menu", "fr": "Notre Carte", "de": "Speisekarte"},
|
||||
"template": "default",
|
||||
"is_published": true,
|
||||
"show_in_header": true,
|
||||
"content_translations": {
|
||||
"en": "<h2>Our Menu</h2>\n<p>Discover our selection of dishes, prepared with fresh, local ingredients.</p>",
|
||||
"fr": "<h2>Notre Carte</h2>\n<p>Découvrez notre sélection de plats, préparés avec des produits frais et locaux.</p>"
|
||||
}
|
||||
}
|
||||
15
app/modules/hosting/templates_library/restaurant/theme.json
Normal file
15
app/modules/hosting/templates_library/restaurant/theme.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"theme_name": "modern",
|
||||
"colors": {
|
||||
"primary": "#b45309",
|
||||
"secondary": "#78350f",
|
||||
"accent": "#f59e0b",
|
||||
"background": "#fffbeb",
|
||||
"text": "#1c1917",
|
||||
"border": "#e7e5e4"
|
||||
},
|
||||
"font_family_heading": "Playfair Display",
|
||||
"font_family_body": "Inter",
|
||||
"layout_style": "grid",
|
||||
"header_style": "transparent"
|
||||
}
|
||||
Reference in New Issue
Block a user