This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/COR-1610 about page improvements (#4803)
* fix: adding image to sanity and create columns for about page * WiP: still net to get the qruey right * fix: styling and query * fix: casing typo * fix: PR feedback * fix: curly brackets * fix: IDE difference in typing * fix: size difference * fix: more legacy code * fix: remove unused import
- Loading branch information
1 parent
f5b9f04
commit ccd398c
Showing
6 changed files
with
138 additions
and
62 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
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,39 @@ | ||
import { defineField, defineType } from 'sanity'; | ||
import { supportedLanguages } from '../../studio/i18n'; | ||
import { BsCardImage } from 'react-icons/bs'; | ||
|
||
export const image = defineType({ | ||
name: 'localeImage', | ||
type: 'object', | ||
title: 'Locale Image Content', | ||
fields: supportedLanguages.map(({ title, id }) => | ||
defineField({ | ||
title, | ||
name: id, | ||
type: 'image', | ||
icon: BsCardImage, | ||
initialValue: { | ||
isFullWidth: true, | ||
}, | ||
fields: [ | ||
defineField({ | ||
name: 'alt', | ||
title: 'Alternatieve tekst (toegankelijkheid)', | ||
type: 'string', | ||
validation: (rule) => rule.required().error('Alt text is verplicht'), | ||
}), | ||
defineField({ | ||
name: 'isFullWidth', | ||
title: 'Afbeelding breed weergeven?', | ||
type: 'boolean', | ||
initialValue: false, | ||
}), | ||
defineField({ | ||
name: 'caption', | ||
title: 'Onderschrift', | ||
type: 'text', | ||
}), | ||
], | ||
}) | ||
), | ||
}); |