feat: new tempalte improvements

This commit is contained in:
shiva raj badu 2026-04-09 23:37:14 +05:45
parent 4ecab24add
commit c1908635df
No known key found for this signature in database
6 changed files with 42 additions and 40 deletions

View file

@ -9,7 +9,7 @@ const BlockSchema = z.object({
heading: z.string().max(30).meta({ heading: z.string().max(30).meta({
description: "Short heading for a single block of text.", description: "Short heading for a single block of text.",
}), }),
body: z.string().max(100).meta({ body: z.string().max(80).meta({
description: "Description text for a single block of text.", description: "Description text for a single block of text.",
}), }),
}); });

View file

@ -122,7 +122,7 @@ function StatusIcon({
return <img src={checkIconUrl} alt={checkIconAlt} className="h-[26px] w-[26px] object-contain" />; return <img src={checkIconUrl} alt={checkIconAlt} className="h-[26px] w-[26px] object-contain" />;
} }
return <p>{status}</p> return <p className="text-base ">{status}</p>
} }
const ComparisonChartSlide = ({ data }: { data: Partial<SchemaType> }) => { const ComparisonChartSlide = ({ data }: { data: Partial<SchemaType> }) => {
@ -135,14 +135,14 @@ const ComparisonChartSlide = ({ data }: { data: Partial<SchemaType> }) => {
checkIcon, checkIcon,
crossIcon, crossIcon,
} = data; } = data;
const safeColumns = columns && columns.length > 0 ? columns : DEFAULT_COLUMNS; const safeColumns = columns && columns.length > 0 ? columns : [];
const resolvedHighlightedColumnIndex = const resolvedHighlightedColumnIndex =
highlightedColumnIndex && highlightedColumnIndex &&
highlightedColumnIndex >= 1 && highlightedColumnIndex >= 1 &&
highlightedColumnIndex <= safeColumns.length highlightedColumnIndex <= safeColumns.length
? highlightedColumnIndex ? highlightedColumnIndex
: Math.min(4, safeColumns.length); : Math.min(4, safeColumns.length);
const safeRows = rows && rows.length > 0 ? rows : DEFAULT_ROWS; const safeRows = rows && rows.length > 0 ? rows : [];
const normalizedRows = safeRows.map((row) => { const normalizedRows = safeRows.map((row) => {
const rowCells = const rowCells =
"cells" in row "cells" in row
@ -195,7 +195,7 @@ const ComparisonChartSlide = ({ data }: { data: Partial<SchemaType> }) => {
}} }}
> >
<div className=" " /> <div className=" " />
{safeColumns.map((column, index) => ( {safeColumns.map((column: any, index: any) => (
<div <div
key={index} key={index}
className="flex items-center p-[33px] justify-center border-r text-[20px] font-semibold tracking-[0.2em]" className="flex items-center p-[33px] justify-center border-r text-[20px] font-semibold tracking-[0.2em]"

View file

@ -129,7 +129,7 @@ const ImageGallerySlide = ({ data }: { data: Partial<SchemaType> }) => {
<img <img
src={bottomWideImage?.__image_url__} src={bottomWideImage?.__image_url__}
alt={bottomWideImage?.__image_prompt__} alt={bottomWideImage?.__image_prompt__}
className="h-[290px] w-[584px] object-cover" className="h-[290px] w-[605px] object-cover"
/> />
<img <img
src={bottomCenterImage?.__image_url__} src={bottomCenterImage?.__image_url__}

View file

@ -14,7 +14,7 @@ export const Schema = z.object({
topleftTextBlockLabel: z.string().min(3).max(20).default("MISSION").meta({ topleftTextBlockLabel: z.string().min(3).max(20).default("MISSION").meta({
description: "Mission section label.", description: "Mission section label.",
}), }),
topleftTextBlockBody: z.string().min(40).max(98).default( topleftTextBlockBody: z.string().min(40).max(90).default(
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore." "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore."
).meta({ ).meta({
description: "Mission paragraph content.", description: "Mission paragraph content.",
@ -22,7 +22,7 @@ export const Schema = z.object({
bottomleftTextBlockLabel: z.string().min(3).max(20).default("VISION").meta({ bottomleftTextBlockLabel: z.string().min(3).max(20).default("VISION").meta({
description: "Vision section label.", description: "Vision section label.",
}), }),
bottomleftTextBlockBody: z.string().min(40).max(98).default( bottomleftTextBlockBody: z.string().min(40).max(90).default(
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore." "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore."
).meta({ ).meta({
description: "Vision paragraph content.", description: "Vision paragraph content.",

View file

@ -7,10 +7,10 @@ export const slideLayoutDescription =
"A slide with a title on top and a description below, and a content section containing an image and a grid of cards of text."; "A slide with a title on top and a description below, and a content section containing an image and a grid of cards of text.";
const CardSchema = z.object({ const CardSchema = z.object({
heading: z.string().max(16).meta({ heading: z.string().max(14).meta({
description: "Card heading.", description: "Card heading.",
}), }),
body: z.string().max(30).meta({ body: z.string().max(25).meta({
description: "Card short description.", description: "Card short description.",
}), }),
isHighlighted: z.boolean().default(false).meta({ isHighlighted: z.boolean().default(false).meta({
@ -124,7 +124,7 @@ const OurServicesSlide = ({ data }: { data: Partial<SchemaType> }) => {
}} }}
> >
<p <p
className="text-[20px] font-semibold tracking-[2.074px] text-white" className="text-[20px] font-semibold tracking-[4.354px] text-white"
style={{ style={{
color: card.isHighlighted color: card.isHighlighted
? "var(--primary-text,#edf2f1)" ? "var(--primary-text,#edf2f1)"
@ -134,7 +134,7 @@ const OurServicesSlide = ({ data }: { data: Partial<SchemaType> }) => {
{card.heading} {card.heading}
</p> </p>
<p <p
className={`${card.isHighlighted ? "text-white" : "text-[#15342DCC]"} mt-[20px] text-[28px] font-normal`} className={`${card.isHighlighted ? "text-white" : "text-[#15342D]"} mt-[20px] text-[28px] font-normal`}
style={{ style={{
color: card.isHighlighted color: card.isHighlighted
? "var(--primary-text,#edf2f1)" ? "var(--primary-text,#edf2f1)"

View file

@ -484,34 +484,6 @@ export const allLayouts: TemplateWithData[] = [
// TODO: Step 5: Combine all templates into a single array For UseCases (like the ones below) // TODO: Step 5: Combine all templates into a single array For UseCases (like the ones below)
// For UseCases we need to combine all templates into a single array with settings // For UseCases we need to combine all templates into a single array with settings
export const templates: TemplateLayoutsWithSettings[] = [ export const templates: TemplateLayoutsWithSettings[] = [
{
id: "neo-general",
name: "Neo General",
description: neoGeneralSettings.description,
settings: neoGeneralSettings as TemplateGroupSettings,
layouts: neoGeneralTemplates,
},
{
id: "neo-standard",
name: "Neo Standard",
description: neoStandardSettings.description,
settings: neoStandardSettings as TemplateGroupSettings,
layouts: neoStandardTemplates,
},
{
id: "neo-modern",
name: "Neo Modern",
description: neoModernSettings.description,
settings: neoModernSettings as TemplateGroupSettings,
layouts: neoModernTemplates,
},
{
id: "neo-swift",
name: "Neo Swift",
description: neoSwiftSettings.description,
settings: neoSwiftSettings as TemplateGroupSettings,
layouts: neoSwiftTemplates,
},
{ {
id: "general", id: "general",
name: "General", name: "General",
@ -568,6 +540,36 @@ export const templates: TemplateLayoutsWithSettings[] = [
settings: reportSettings as TemplateGroupSettings, settings: reportSettings as TemplateGroupSettings,
layouts: reportTemplates, layouts: reportTemplates,
}, },
{
id: "neo-general",
name: "Neo General",
description: neoGeneralSettings.description,
settings: neoGeneralSettings as TemplateGroupSettings,
layouts: neoGeneralTemplates,
},
{
id: "neo-standard",
name: "Neo Standard",
description: neoStandardSettings.description,
settings: neoStandardSettings as TemplateGroupSettings,
layouts: neoStandardTemplates,
},
{
id: "neo-modern",
name: "Neo Modern",
description: neoModernSettings.description,
settings: neoModernSettings as TemplateGroupSettings,
layouts: neoModernTemplates,
},
{
id: "neo-swift",
name: "Neo Swift",
description: neoSwiftSettings.description,
settings: neoSwiftSettings as TemplateGroupSettings,
layouts: neoSwiftTemplates,
},
]; ];
// Helper to get templates by group ID // Helper to get templates by group ID