This commit is contained in:
Morten Olsen
2023-03-26 22:15:07 +02:00
commit 9b1a067d56
80 changed files with 7889 additions and 0 deletions

15
types/article.ts Normal file
View File

@@ -0,0 +1,15 @@
type Article = {
title: string;
cover: string;
raw: string;
published?: Date;
coverUrl: string;
thumbUrl: string;
slug: string;
root: string;
content: string;
color?: string;
pdfUrl: string;
};
export type { Article };

4
types/index.ts Normal file
View File

@@ -0,0 +1,4 @@
export * from "./position";
export * from "./article";
export * from "./profile";
export * from "./pages";

19
types/pages.ts Normal file
View File

@@ -0,0 +1,19 @@
import { ComponentType } from "react";
import { Article } from "./article";
import { Profile } from "./profile";
interface Pages {
frontpage: ComponentType<{
articles: Article[];
profile: Profile;
}>;
article: ComponentType<{
article: Article;
profile: Profile;
pdfUrl: string;
}>;
}
type Page<TName extends keyof Pages> = Pages[TName];
export { Pages, Page };

7
types/position.ts Normal file
View File

@@ -0,0 +1,7 @@
type Position = {
title: string;
raw: string;
content: string;
};
export { Position };

17
types/profile.ts Normal file
View File

@@ -0,0 +1,17 @@
type Profile = {
name: string;
about: string;
tagline: string;
imageUrl: string;
imagePath: string;
info: {
name: string;
value: string;
}[];
skills: {
name: string;
level: number;
}[];
};
export { Profile };