-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(feat): added schemas for 6 data such as Jobs, Member etc
- Loading branch information
Showing
8 changed files
with
285 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { defineType, defineField } from 'sanity'; | ||
import { HomeIcon } from 'lucide-react'; | ||
export const campusData = defineType({ | ||
name: 'campusData', | ||
title: 'Campus Data', | ||
type: 'document', | ||
icon: HomeIcon, | ||
fields: [ | ||
defineField({ | ||
name: 'title', | ||
title: 'Title', | ||
type: 'string', | ||
description: 'Title of the Card', | ||
}), | ||
defineField({ | ||
name: 'href', | ||
title: 'Href', | ||
type: 'string', | ||
description: 'Link where the card will redirect when clicked', | ||
}), | ||
defineField({ | ||
name: 'image', | ||
title: 'Image', | ||
type: 'image', | ||
description: 'Image to display on the card', | ||
}), | ||
], | ||
}); |
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,35 @@ | ||
import { defineType, defineField } from 'sanity'; | ||
|
||
export const facilities = defineType({ | ||
name: 'facility', | ||
title: 'Facility', | ||
type: 'document', | ||
fields: [ | ||
defineField({ | ||
name: 'title', | ||
title: 'Title', | ||
type: 'string', | ||
description: 'The title of the facility.', | ||
}), | ||
defineField({ | ||
name: 'blockName', | ||
title: 'Block Name', | ||
type: 'string', | ||
description: | ||
'The name of the block associated with the facility. for example- e block', | ||
}), | ||
defineField({ | ||
name: 'items', | ||
title: 'Items', | ||
type: 'array', | ||
of: [{ type: 'string' }], | ||
description: 'A list of items associated with the facility.', | ||
}), | ||
defineField({ | ||
name: 'imageUrl', | ||
title: 'Image URL', | ||
type: 'image', | ||
description: 'The image associated with the facility.', | ||
}), | ||
], | ||
}); |
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 @@ | ||
import { defineField, defineType } from 'sanity'; | ||
import { HomeIcon } from 'lucide-react'; | ||
|
||
export const formerBoardOfGovernor = defineType({ | ||
name: 'formerBoardOfGovernor', | ||
title: 'Former Board Of Governor', | ||
type: 'document', | ||
icon: HomeIcon, | ||
fields: [ | ||
defineField({ | ||
name: 'title', | ||
title: 'Title', | ||
type: 'string', | ||
description: 'Title of the profile group', | ||
}), | ||
defineField({ | ||
name: 'profiles', | ||
title: 'Profiles', | ||
type: 'array', | ||
of: [ | ||
{ | ||
type: 'object', | ||
fields: [ | ||
defineField({ | ||
name: 'title', | ||
title: 'Profile Title', | ||
type: 'string', | ||
description: 'Title of the profile', | ||
}), | ||
defineField({ | ||
name: 'content', | ||
title: 'Content', | ||
type: 'array', | ||
of: [{ type: 'string' }], | ||
description: 'Content of the profile', | ||
}), | ||
defineField({ | ||
name: 'imageURL', | ||
title: 'Image URL', | ||
type: 'string', | ||
description: 'URL of the profile image', | ||
}), | ||
], | ||
}, | ||
], | ||
}), | ||
], | ||
}); |
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 { defineType, defineField } from 'sanity'; | ||
|
||
export const krcData = defineType({ | ||
name: 'krcData', | ||
title: 'Krc Data', | ||
type: 'document', | ||
fields: [ | ||
defineField({ | ||
name: 'title', | ||
title: 'Title', | ||
type: 'string', | ||
description: 'The title of the link data.', | ||
}), | ||
defineField({ | ||
name: 'description', | ||
title: 'Description', | ||
type: 'string', | ||
description: 'A description for the link data.', | ||
}), | ||
defineField({ | ||
name: 'accessInfo', | ||
title: 'Access Info', | ||
type: 'string', | ||
description: 'Information about accessing the resource.', | ||
}), | ||
defineField({ | ||
name: 'buttonText', | ||
title: 'Button Text', | ||
type: 'string', | ||
description: 'The text displayed on the button.', | ||
}), | ||
defineField({ | ||
name: 'link', | ||
title: 'Link', | ||
type: 'url', | ||
description: 'The URL for the link.', | ||
}), | ||
], | ||
}); |
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 { defineType, defineField } from 'sanity'; | ||
|
||
export const krcDataTel = defineType({ | ||
name: 'krcDataTEL', | ||
title: 'Krc Data TEL(First three)', | ||
type: 'document', | ||
fields: [ | ||
defineField({ | ||
name: 'title', | ||
title: 'Title', | ||
type: 'string', | ||
description: 'The title of the link data.', | ||
}), | ||
defineField({ | ||
name: 'description', | ||
title: 'Description', | ||
type: 'string', | ||
description: 'A description for the link data.', | ||
}), | ||
defineField({ | ||
name: 'accessInfo', | ||
title: 'Access Info', | ||
type: 'string', | ||
description: 'Information about accessing the resource.', | ||
}), | ||
defineField({ | ||
name: 'buttonText', | ||
title: 'Button Text', | ||
type: 'string', | ||
description: 'The text displayed on the button.', | ||
}), | ||
defineField({ | ||
name: 'link', | ||
title: 'Link', | ||
type: 'url', | ||
description: 'The URL for the link.', | ||
}), | ||
], | ||
}); |
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,57 @@ | ||
import { defineType, defineField } from 'sanity'; | ||
|
||
export const krcDataTelFull = defineType({ | ||
name: 'krcDataTelFull', | ||
title: 'Krc Data TEL(Full)', | ||
type: 'document', | ||
fields: [ | ||
defineField({ | ||
name: 'heading', | ||
title: 'Heading', | ||
type: 'string', | ||
description: 'The heading of the group of cards', | ||
}), | ||
defineField({ | ||
name: 'card', | ||
title: 'Card', | ||
type: 'array', | ||
of: [ | ||
{ | ||
type: 'object', | ||
fields: [ | ||
defineField({ | ||
name: 'title', | ||
title: 'Title', | ||
type: 'string', | ||
description: 'The title of the link data.', | ||
}), | ||
defineField({ | ||
name: 'description', | ||
title: 'Description', | ||
type: 'string', | ||
description: 'A description for the link data.', | ||
}), | ||
defineField({ | ||
name: 'accessInfo', | ||
title: 'Access Info', | ||
type: 'string', | ||
description: 'Information about accessing the resource.', | ||
}), | ||
defineField({ | ||
name: 'buttonText', | ||
title: 'Button Text', | ||
type: 'string', | ||
description: 'The text displayed on the button.', | ||
}), | ||
defineField({ | ||
name: 'link', | ||
title: 'Link', | ||
type: 'url', | ||
description: 'The URL for the link.', | ||
}), | ||
], | ||
}, | ||
], | ||
}), | ||
], | ||
}); |
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 { defineField, defineType } from 'sanity'; | ||
|
||
export const research = defineType({ | ||
title: 'Research Profiles', | ||
name: 'profiles', | ||
type: 'document', | ||
fields: [ | ||
defineField({ | ||
title: 'Title', | ||
name: 'title', | ||
type: 'string', | ||
}), | ||
defineField({ | ||
title: 'Image Url', | ||
name: 'imageUrl', | ||
type: 'string', | ||
}), | ||
defineField({ | ||
title: 'More Details', | ||
name: 'content', | ||
type: 'array', | ||
of: [{ type: 'string' }], | ||
}), | ||
], | ||
}); |
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