mirror of
https://github.com/morten-olsen/morten-olsen.github.io.git
synced 2026-02-08 01:46:28 +01:00
init
This commit is contained in:
15
types/article.ts
Normal file
15
types/article.ts
Normal 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
4
types/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export * from "./position";
|
||||
export * from "./article";
|
||||
export * from "./profile";
|
||||
export * from "./pages";
|
||||
19
types/pages.ts
Normal file
19
types/pages.ts
Normal 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
7
types/position.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
type Position = {
|
||||
title: string;
|
||||
raw: string;
|
||||
content: string;
|
||||
};
|
||||
|
||||
export { Position };
|
||||
17
types/profile.ts
Normal file
17
types/profile.ts
Normal 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 };
|
||||
Reference in New Issue
Block a user