content: publish evidence-led portfolio copy
This commit is contained in:
@@ -116,6 +116,7 @@ const projectSchema = z.object({
|
||||
url: httpUrl.optional(),
|
||||
assetIds: z.array(opaqueId),
|
||||
media: z.array(mediaPresentationSchema).optional(),
|
||||
mediaLayout: z.enum(['single', 'portrait-strip', 'chart-pair']).optional(),
|
||||
}).strict().superRefine((project, context) => {
|
||||
if (project.visibility === 'private' && project.url !== undefined) {
|
||||
context.addIssue({ code: 'custom', message: 'A private project may not include a url.', path: ['url'] });
|
||||
@@ -138,6 +139,13 @@ const projectSchema = z.object({
|
||||
});
|
||||
}
|
||||
}
|
||||
if (project.mediaLayout !== undefined && (project.media === undefined || project.media.length === 0)) {
|
||||
context.addIssue({
|
||||
code: 'custom',
|
||||
message: 'Project mediaLayout requires at least one media presentation.',
|
||||
path: ['mediaLayout'],
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
const portfolioContentSchema = z.object({
|
||||
@@ -145,6 +153,12 @@ const portfolioContentSchema = z.object({
|
||||
name: z.literal('Luca Pîslaru'),
|
||||
role: z.literal('System Administrator & Full-Stack Developer'),
|
||||
valueProposition: visibleString,
|
||||
location: z.object({
|
||||
city: visibleString,
|
||||
country: visibleString,
|
||||
countryCode: z.string().regex(/^[A-Z]{2}$/, 'Country code must be a two-letter uppercase code.'),
|
||||
}).strict(),
|
||||
availability: visibleString,
|
||||
}).strict(),
|
||||
navigation: z.array(navigationItemSchema).length(8),
|
||||
profile: z.object({
|
||||
@@ -170,6 +184,12 @@ const portfolioContentSchema = z.object({
|
||||
title: z.literal('Secure self-hosted platform and lifecycle'),
|
||||
summary: visibleString,
|
||||
bands: z.array(z.object({ id: opaqueId, title: visibleString, summary: visibleString }).strict()).length(4),
|
||||
featuredOperation: z.object({
|
||||
title: visibleString,
|
||||
context: visibleString,
|
||||
actions: z.array(visibleString).min(3).max(6),
|
||||
outcome: visibleString,
|
||||
}).strict(),
|
||||
}).strict(),
|
||||
projects: z.object({
|
||||
selected: z.array(projectSchema).length(3),
|
||||
@@ -180,6 +200,7 @@ const portfolioContentSchema = z.object({
|
||||
technologies: z.array(z.object({ name: visibleString, assetId: opaqueId.optional() }).strict()).min(1),
|
||||
}).strict()).min(1),
|
||||
contact: z.object({
|
||||
introduction: visibleString,
|
||||
email: z.email(),
|
||||
social: z.array(z.object({
|
||||
service: z.enum(['GitHub', 'GitLab', 'LinkedIn']),
|
||||
|
||||
@@ -20,6 +20,7 @@ export type SectionLayout =
|
||||
|
||||
export type ProjectVisibility = 'public' | 'private';
|
||||
export type ProjectMaturity = 'learning' | 'experimental' | 'prototype' | 'work-in-progress' | 'active';
|
||||
export type ProjectMediaLayout = 'single' | 'portrait-strip' | 'chart-pair';
|
||||
|
||||
export interface MediaPresentationBase {
|
||||
assetId: string;
|
||||
@@ -84,11 +85,19 @@ export interface InfrastructureEvidenceBand {
|
||||
summary: string;
|
||||
}
|
||||
|
||||
export interface FeaturedOperation {
|
||||
title: string;
|
||||
context: string;
|
||||
actions: readonly string[];
|
||||
outcome: string;
|
||||
}
|
||||
|
||||
export interface InfrastructureCaseStudy {
|
||||
id: string;
|
||||
title: string;
|
||||
summary: string;
|
||||
bands: readonly InfrastructureEvidenceBand[];
|
||||
featuredOperation: FeaturedOperation;
|
||||
}
|
||||
|
||||
export interface PublicProject {
|
||||
@@ -104,6 +113,7 @@ export interface PublicProject {
|
||||
url?: string;
|
||||
assetIds: readonly string[];
|
||||
media?: readonly MediaPresentation[];
|
||||
mediaLayout?: ProjectMediaLayout;
|
||||
}
|
||||
|
||||
export interface ToolkitTechnology {
|
||||
@@ -122,6 +132,7 @@ export interface ContactSocialLink {
|
||||
}
|
||||
|
||||
export interface ContactContent {
|
||||
introduction: string;
|
||||
email: string;
|
||||
social: readonly ContactSocialLink[];
|
||||
cvMessage: string;
|
||||
@@ -150,6 +161,8 @@ export interface PortfolioContent {
|
||||
name: 'Luca Pîslaru';
|
||||
role: 'System Administrator & Full-Stack Developer';
|
||||
valueProposition: string;
|
||||
location: { city: string; country: string; countryCode: string };
|
||||
availability: string;
|
||||
};
|
||||
navigation: ReadonlyArray<{ id: SectionId; label: string }>;
|
||||
profile: { introduction: string; screeningFacts: ReadonlyArray<{ label: string; value: string }> };
|
||||
|
||||
Reference in New Issue
Block a user