oxen-website/types/cms.ts

47 lines
892 B
TypeScript
Raw Normal View History

2021-02-02 06:28:00 +01:00
import { Document } from '@contentful/rich-text-types';
2021-02-04 07:19:04 +01:00
import { SideMenuItem } from '../state/navigation';
2021-02-02 06:28:00 +01:00
2021-01-29 03:50:49 +01:00
export type IAuthor = {
name: string;
2021-02-02 06:28:00 +01:00
avatar?: IFigureImage;
2021-01-29 03:50:49 +01:00
shortBio: string;
email: string;
2021-01-31 11:02:19 +01:00
// Eg. Marketing Researcher
position: string | null;
twitter: string | null;
facebook: string | null;
github: string | null;
2021-01-29 03:50:49 +01:00
};
export type IFigureImage = {
2021-01-31 11:02:19 +01:00
title: string | null;
description: string | null;
2021-01-29 03:50:49 +01:00
imageUrl: string;
};
2021-02-08 07:37:50 +01:00
export interface IPost {
2021-01-29 03:50:49 +01:00
id: string;
title: string;
subtitle: string;
2021-02-08 07:37:50 +01:00
description: string;
2021-02-02 06:28:00 +01:00
body: Document;
2021-01-29 03:50:49 +01:00
author?: IAuthor;
2021-01-31 11:02:19 +01:00
publishedDate: string;
featureImage?: IFigureImage;
tags: Array<string>;
slug: string;
2021-02-08 07:37:50 +01:00
}
2021-02-02 06:28:00 +01:00
export type BodyDocument = {
nodeType: 'document';
content: any;
};
2021-02-04 06:42:15 +01:00
export interface ISplitPage {
2021-02-04 07:19:04 +01:00
id: SideMenuItem;
2021-02-04 06:42:15 +01:00
label: string;
title: string;
body: Document;
hero?: IFigureImage;
}