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:
7
app/modules/hosting/templates_library/generic/meta.json
Normal file
7
app/modules/hosting/templates_library/generic/meta.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"id": "generic",
|
||||
"name": "Generic Business",
|
||||
"description": "Clean, minimal template that works for any business type",
|
||||
"tags": ["general", "minimal", "any"],
|
||||
"languages": ["en", "fr", "de"]
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"slug": "about",
|
||||
"title": "About Us",
|
||||
"title_translations": {"en": "About Us", "fr": "À propos", "de": "Über uns"},
|
||||
"template": "default",
|
||||
"is_published": true,
|
||||
"show_in_header": true,
|
||||
"content": "{{about_content}}",
|
||||
"content_translations": {
|
||||
"en": "<h2>About {{business_name}}</h2>\n<p>{{about_paragraph}}</p>",
|
||||
"fr": "<h2>À propos de {{business_name}}</h2>\n<p>{{about_paragraph}}</p>"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"slug": "contact",
|
||||
"title": "Contact",
|
||||
"title_translations": {"en": "Contact Us", "fr": "Contact", "de": "Kontakt"},
|
||||
"template": "default",
|
||||
"is_published": true,
|
||||
"show_in_header": true,
|
||||
"show_in_footer": true,
|
||||
"content_translations": {
|
||||
"en": "<h2>Get in Touch</h2>\n<p>We'd love to hear from you. Reach out using the information below.</p>\n<ul>\n<li>Email: {{email}}</li>\n<li>Phone: {{phone}}</li>\n<li>Address: {{address}}</li>\n</ul>",
|
||||
"fr": "<h2>Contactez-nous</h2>\n<p>N'hésitez pas à nous contacter.</p>\n<ul>\n<li>Email : {{email}}</li>\n<li>Téléphone : {{phone}}</li>\n<li>Adresse : {{address}}</li>\n</ul>"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"slug": "homepage",
|
||||
"title": "{{business_name}}",
|
||||
"template": "full",
|
||||
"is_published": true,
|
||||
"show_in_header": false,
|
||||
"sections": {
|
||||
"hero": {
|
||||
"enabled": true,
|
||||
"title": {"translations": {"en": "{{business_name}}", "fr": "{{business_name}}"}},
|
||||
"subtitle": {"translations": {"en": "{{meta_description}}", "fr": "{{meta_description}}"}},
|
||||
"background_type": "gradient",
|
||||
"buttons": [
|
||||
{"label": {"translations": {"en": "Contact Us", "fr": "Contactez-nous"}}, "url": "/contact", "style": "primary"}
|
||||
]
|
||||
},
|
||||
"features": {
|
||||
"enabled": true,
|
||||
"title": {"translations": {"en": "What We Offer", "fr": "Nos Services"}},
|
||||
"items": [
|
||||
{"icon": "shield-check", "title": {"translations": {"en": "Quality", "fr": "Qualité"}}, "description": {"translations": {"en": "Committed to excellence in everything we do", "fr": "Engagés pour l'excellence dans tout ce que nous faisons"}}},
|
||||
{"icon": "clock", "title": {"translations": {"en": "Reliability", "fr": "Fiabilité"}}, "description": {"translations": {"en": "Dependable service you can count on", "fr": "Un service fiable sur lequel vous pouvez compter"}}},
|
||||
{"icon": "users", "title": {"translations": {"en": "Experience", "fr": "Expérience"}}, "description": {"translations": {"en": "Years of expertise at your service", "fr": "Des années d'expertise à votre service"}}}
|
||||
]
|
||||
},
|
||||
"cta": {
|
||||
"enabled": true,
|
||||
"title": {"translations": {"en": "Ready to get started?", "fr": "Prêt à commencer ?"}},
|
||||
"subtitle": {"translations": {"en": "Contact us today for a free consultation", "fr": "Contactez-nous pour une consultation gratuite"}},
|
||||
"buttons": [
|
||||
{"label": {"translations": {"en": "Get in Touch", "fr": "Nous Contacter"}}, "url": "/contact", "style": "primary"}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
15
app/modules/hosting/templates_library/generic/theme.json
Normal file
15
app/modules/hosting/templates_library/generic/theme.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"theme_name": "modern",
|
||||
"colors": {
|
||||
"primary": "#3b82f6",
|
||||
"secondary": "#1e40af",
|
||||
"accent": "#f59e0b",
|
||||
"background": "#ffffff",
|
||||
"text": "#1e293b",
|
||||
"border": "#e2e8f0"
|
||||
},
|
||||
"font_family_heading": "Inter",
|
||||
"font_family_body": "Inter",
|
||||
"layout_style": "grid",
|
||||
"header_style": "fixed"
|
||||
}
|
||||
Reference in New Issue
Block a user