-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes: #19
- Loading branch information
Showing
15 changed files
with
194 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { RiExternalLinkLine } from 'react-icons/ri'; | ||
import { defineField } from 'sanity'; | ||
|
||
const imageCard = defineField({ | ||
title: 'Kachel mit Bild', | ||
name: 'imageCard', | ||
type: 'object', | ||
description: 'Die Abschnitte der Chronik.', | ||
icon: RiExternalLinkLine, | ||
fields: [ | ||
defineField({ | ||
title: 'Titel', | ||
name: 'title', | ||
type: 'string', | ||
}), | ||
defineField({ | ||
title: 'Beschreibung', | ||
name: 'description', | ||
type: 'text', | ||
}), | ||
defineField({ | ||
title: 'Bild', | ||
name: 'image', | ||
type: 'extendedImage', | ||
}), | ||
], | ||
}); | ||
|
||
export default imageCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export const chronicle = { | ||
title: 'Chronik', | ||
name: 'chronicle', | ||
}; | ||
|
||
export const contactPersons = { | ||
title: 'Ansprechpartner', | ||
name: 'contactPersons', | ||
}; | ||
|
||
export const gallery = { | ||
title: 'Galerie', | ||
name: 'gallery', | ||
}; | ||
|
||
export const stats = { | ||
title: 'Stats', | ||
name: 'stats', | ||
}; | ||
|
||
export const vision = { | ||
title: 'Vision', | ||
name: 'vision', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { RiLinksLine } from 'react-icons/ri'; | ||
import { defineField } from 'sanity'; | ||
|
||
import { getDefaultPageFieldsWithGroup } from '@/shared/fields/general'; | ||
|
||
export const chronicleField = defineField({ | ||
title: 'Chronik', | ||
name: 'chronicleSection', | ||
type: 'object', | ||
icon: RiLinksLine, | ||
group: 'chronicle', | ||
fields: [ | ||
...getDefaultPageFieldsWithGroup(), | ||
|
||
defineField({ | ||
title: 'Chronik', | ||
name: 'chronicle', | ||
type: 'array', | ||
of: [{ type: 'imageCard' }], | ||
description: 'Die Abschnitte der Chronik.', | ||
}), | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { RiLinksLine } from 'react-icons/ri'; | ||
import { defineField } from 'sanity'; | ||
|
||
import { getDefaultPageFieldsWithGroup } from '@/shared/fields/general'; | ||
import { getLengthRule } from '@/shared/validation-rules'; | ||
|
||
export const galleryField = defineField({ | ||
title: 'Galerie', | ||
name: 'gallerySection', | ||
type: 'object', | ||
icon: RiLinksLine, | ||
group: 'gallery', | ||
fields: [ | ||
...getDefaultPageFieldsWithGroup(), | ||
|
||
defineField({ | ||
title: 'Bilder', | ||
name: 'venues', | ||
type: 'array', | ||
of: [{ type: 'extendedImage' }], | ||
description: 'Diese gewählten Bilder werden in der gewünschten Reihenfolge angezeigt.', | ||
validation: rule => [getLengthRule(rule, 3, 'Es müssen genau 3 Bilder ausgewählt werden.')], | ||
}), | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// cSpell:words verein | ||
import { RiBookletLine, RiLinksLine } from 'react-icons/ri'; | ||
import { defineField, defineType } from 'sanity'; | ||
|
||
import { content, general, meta } from '@/shared/field-groups'; | ||
import { defaultPageFields, getHiddenSlugField } from '@/shared/fields/general'; | ||
import { metaField } from '@/shared/fields/meta'; | ||
import { contactPersonsSectionField } from '@/shared/sections/contact-persons'; | ||
import { statsField } from '@/shared/sections/stats'; | ||
import { visionField } from '@/shared/sections/vision'; | ||
|
||
import { chronicle, contactPersons, gallery, stats, vision } from './_groups'; | ||
import { chronicleField } from './chronicle'; | ||
import { galleryField } from './gallery'; | ||
|
||
const aboutUsPage = defineType({ | ||
title: 'Über uns', | ||
name: 'aboutUs', | ||
type: 'document', | ||
icon: RiBookletLine, | ||
groups: [general, meta, content], | ||
fields: [ | ||
// (hidden) | ||
getHiddenSlugField('verein'), | ||
|
||
// general | ||
...defaultPageFields, | ||
|
||
// meta | ||
metaField, | ||
|
||
// content | ||
defineField({ | ||
title: 'Inhalte', | ||
name: 'content', | ||
type: 'object', | ||
icon: RiLinksLine, | ||
group: 'content', | ||
groups: [gallery, chronicle, vision, stats, contactPersons], | ||
fields: [galleryField, chronicleField, visionField, statsField, contactPersonsSectionField], | ||
}), | ||
], | ||
preview: { | ||
prepare: () => ({ title: 'Über uns' }), | ||
}, | ||
}); | ||
|
||
export default aboutUsPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export const contactPersons = { | ||
title: 'ContactPersons', | ||
title: 'Ansprechpartner', | ||
name: 'contactPersons', | ||
}; | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters