Files
atridotdad/src/types.ts
Atridad Lahiji a26c990a21
Some checks failed
Docker Deploy / build-and-push (push) Has been cancelled
4.0.0
2026-01-24 17:24:00 -07:00

167 lines
3.2 KiB
TypeScript

import type { ImageMetadata } from "astro";
import type { Component } from "vue";
import type { GiteaRepoInfo } from "./utils/gitea";
// Icon Types
export type LucideIcon = Component;
export type AstroIconName = string; // For astro-icon string references like "mdi:email"
export type CustomIconComponent = Component;
export type IconType = LucideIcon | AstroIconName | CustomIconComponent;
export interface Talk {
id: string;
name: string;
description: string;
link: string;
date?: string;
}
export interface Project {
id: string;
name: string;
description: string;
webLink?: string;
status?: string;
iosLink?: string;
androidLink?: string;
gitLink?: string;
giteaInfo?: GiteaRepoInfo;
}
export interface SocialLink {
id: string;
name: string;
url: string;
icon: IconType;
ariaLabel: string;
}
export interface TechLink {
id: string;
name: string;
url: string;
icon: IconType;
ariaLabel: string;
}
export interface NavigationItem {
id: string;
name: string;
path: string;
tooltip: string;
icon: IconType;
enabled?: boolean;
isActive?: (path: string) => boolean;
}
export type ResumeSectionKey =
| "summary"
| "experience"
| "education"
| "skills"
| "volunteer"
| "profiles"
| "awards";
export interface ResumeConfig {
tomlFile: string; // Can be a file path or raw TOML content
layout?: {
leftColumn?: ResumeSectionKey[];
rightColumn?: ResumeSectionKey[];
};
sections: {
enabled: ResumeSectionKey[];
summary?: {
title?: string;
};
experience?: {
title?: string;
};
education?: {
title?: string;
};
skills?: {
title?: string;
};
volunteer?: {
title?: string;
};
profiles?: {
title?: string;
};
awards?: {
title?: string;
};
};
}
export interface PersonalInfo {
name: string;
profileImage: {
src: ImageMetadata;
alt: string;
width?: number;
height?: number;
};
tagline: string;
description?: string;
}
export interface HomepageSections {
socialLinks: {
title: string;
description?: string;
};
techStack: {
title: string;
description?: string;
};
}
export interface SiteConfig {
personal: PersonalInfo;
homepage: HomepageSections;
resume: ResumeConfig;
meta: {
title: string;
description: string;
url: string;
author: string;
};
giteaDomains?: string[];
}
export interface Config {
personalInfo: PersonalInfo;
homepageSections: HomepageSections;
resumeConfig: ResumeConfig;
siteConfig: SiteConfig;
talks: readonly Talk[];
projects: readonly Project[];
sections: {
readonly resume: {
readonly name: string;
readonly path: string;
readonly description: string;
};
readonly posts: {
readonly name: string;
readonly path: string;
readonly description: string;
};
readonly talks: {
readonly name: string;
readonly path: string;
readonly description: string;
};
readonly projects: {
readonly name: string;
readonly path: string;
readonly description: string;
};
};
socialLinks: readonly SocialLink[];
techLinks: readonly TechLink[];
navigationItems: readonly NavigationItem[];
}