Added Heritages, Ancestries, and Tinctures
All checks were successful
Build and Deploy DAVE | DMGs Site / deploy (push) Successful in 43s
All checks were successful
Build and Deploy DAVE | DMGs Site / deploy (push) Successful in 43s
This commit is contained in:
117
src/keystatic/collections/crucible/kindred.ts
Normal file
117
src/keystatic/collections/crucible/kindred.ts
Normal file
@@ -0,0 +1,117 @@
|
||||
import { collection, fields } from '@keystatic/core';
|
||||
import { createBaseArticleFields } from '@fields/base-article.ts';
|
||||
import { createContentField } from '@fields/content.ts';
|
||||
import { createElementsFields, createMateria } from '@fields/crucible';
|
||||
|
||||
export const kindred = collection({
|
||||
label: 'Kindred',
|
||||
slugField: 'title',
|
||||
path: 'src/content/crucible/kindred/*/',
|
||||
format: {
|
||||
contentField: 'body',
|
||||
},
|
||||
schema: {
|
||||
...createBaseArticleFields(),
|
||||
body: createContentField(),
|
||||
crucible: fields.object(
|
||||
{
|
||||
baseline: fields.checkbox({
|
||||
label: 'Baseline',
|
||||
description: 'Is this kindred the baseline?',
|
||||
defaultValue: false,
|
||||
}),
|
||||
deviations: fields.array(
|
||||
fields.object({
|
||||
axis: fields.select({
|
||||
defaultValue: 'size',
|
||||
label: 'Axis',
|
||||
options: [
|
||||
{
|
||||
value: 'size',
|
||||
label: 'Size',
|
||||
},
|
||||
{
|
||||
value: 'lifespan',
|
||||
label: 'Lifespan',
|
||||
},
|
||||
{
|
||||
value: 'reproduction',
|
||||
label: 'Reproduction',
|
||||
},
|
||||
{
|
||||
value: 'habitat',
|
||||
label: 'Habitat',
|
||||
},
|
||||
{
|
||||
value: 'metabolism',
|
||||
label: 'Metabolism',
|
||||
},
|
||||
{
|
||||
value: 'attunement',
|
||||
label: 'Attunement',
|
||||
},
|
||||
{
|
||||
value: 'cognition',
|
||||
label: 'Cognition',
|
||||
},
|
||||
],
|
||||
}),
|
||||
position: fields.text({
|
||||
label: 'Position',
|
||||
}),
|
||||
theme: fields.object({
|
||||
name: fields.text({
|
||||
label: 'Theme',
|
||||
}),
|
||||
elements: createElementsFields(),
|
||||
manifestation: fields.text({
|
||||
multiline: true,
|
||||
label: 'Manifestation',
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
{
|
||||
label: 'Deviations',
|
||||
itemLabel: (props) =>
|
||||
`${props.fields.axis.value.toUpperCase()}: ${props.fields.theme.fields.name.value.toUpperCase()}`,
|
||||
},
|
||||
),
|
||||
drive: fields.object(
|
||||
{
|
||||
name: fields.text({
|
||||
label: 'Name',
|
||||
}),
|
||||
elements: createElementsFields(),
|
||||
manifestation: fields.text({
|
||||
multiline: true,
|
||||
label: 'Manifestation',
|
||||
}),
|
||||
},
|
||||
{
|
||||
label: 'Drive',
|
||||
},
|
||||
),
|
||||
gifts: fields.array(
|
||||
fields.object({
|
||||
name: fields.text({
|
||||
label: 'Name',
|
||||
}),
|
||||
elements: createElementsFields(),
|
||||
description: fields.text({
|
||||
multiline: true,
|
||||
label: 'Description',
|
||||
}),
|
||||
}),
|
||||
{
|
||||
label: 'Gifts',
|
||||
itemLabel: (props) => props.fields.name.value,
|
||||
},
|
||||
),
|
||||
leftover: createMateria(),
|
||||
},
|
||||
{
|
||||
label: 'Crucible Data',
|
||||
},
|
||||
),
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user