This commit is contained in:
2022-07-20 19:24:59 +01:00
commit b709b69364
19 changed files with 31916 additions and 0 deletions

33
src/collections/Media.ts Normal file
View File

@@ -0,0 +1,33 @@
import { CollectionConfig } from 'payload/types';
const Media: CollectionConfig = {
slug: 'media',
access: {
read: (): boolean => true
},
upload: {
adminThumbnail: 'card',
imageSizes: [
{
name: 'card',
width: 640,
height: 480
},
{
name: 'feature',
width: 1024,
height: 576
}
]
},
fields: [
{
name: 'alt',
label: 'Alt Text',
type: 'text',
required: true
}
]
};
export default Media;

27
src/collections/Pages.ts Normal file
View File

@@ -0,0 +1,27 @@
import { CollectionConfig } from 'payload/types';
import slug from '../fields/Slug';
const Pages: CollectionConfig = {
slug: 'pages',
admin: {
useAsTitle: 'title'
},
access: {
read: (): boolean => true // Everyone can read Pages
},
fields: [
{
name: 'title',
label: 'Title',
type: 'text'
},
{
name: 'content',
label: 'Content',
type: 'richText'
},
slug
]
};
export default Pages;

21
src/collections/Users.ts Normal file
View File

@@ -0,0 +1,21 @@
import { CollectionConfig } from 'payload/types';
const Users: CollectionConfig = {
slug: 'users',
auth: true,
admin: {
useAsTitle: 'email'
},
access: {
read: () => true
},
fields: [
{
name: 'name',
type: 'text',
required: true
}
]
};
export default Users;