generated from theodorusclarence/ts-nextjs-tailwind-starter
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add plugins and more schema classes
- Loading branch information
1 parent
1e12886
commit db28722
Showing
8 changed files
with
507 additions
and
29 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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { type SchemaTypeDefinition } from 'sanity'; | ||
|
||
import job from '../src/schemas/job'; | ||
import skill from '../src/schemas/skill'; | ||
import skillIcon from '../src/schemas/skillIcon'; | ||
|
||
export const schema: { types: SchemaTypeDefinition[] } = { | ||
types: [skill, skillIcon], | ||
types: [job, skill, skillIcon], | ||
}; |
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,68 @@ | ||
import { defineField, defineType } from 'sanity'; | ||
|
||
export default defineType({ | ||
name: 'job', | ||
title: 'Job', | ||
type: 'document', | ||
fields: [ | ||
defineField({ | ||
name: 'id', | ||
title: 'Id', | ||
type: 'string', | ||
}), | ||
defineField({ | ||
name: 'company', | ||
title: 'Company', | ||
type: 'string', | ||
}), | ||
defineField({ | ||
name: 'icon', | ||
title: 'Icon', | ||
type: 'image', | ||
}), | ||
defineField({ | ||
name: 'location', | ||
title: 'Location', | ||
type: 'string', | ||
}), | ||
defineField({ | ||
name: 'jobTitle', | ||
title: 'Job Title', | ||
type: 'string', | ||
}), | ||
defineField({ | ||
name: 'startYear', | ||
title: 'Start Year', | ||
type: 'number', | ||
initialValue: new Date().getFullYear() - 3, | ||
}), | ||
defineField({ | ||
name: 'endYear', | ||
title: 'End Year', | ||
type: 'number', | ||
initialValue: new Date().getFullYear() - 1, | ||
}), | ||
defineField({ | ||
name: 'isCurrentJob', | ||
title: 'Current Job?', | ||
type: 'boolean', | ||
initialValue: false, | ||
}), | ||
defineField({ | ||
name: 'description', | ||
title: 'Description', | ||
type: 'array', | ||
of: [{ type: 'block' }], | ||
}), | ||
defineField({ | ||
name: 'technologies', | ||
title: 'Technologies', | ||
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
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,12 @@ | ||
export interface Skill { | ||
id: string; | ||
company: string; | ||
icon: string; | ||
location: string; | ||
jobTitle: string; | ||
startYear: number; | ||
endYear: number; | ||
isCurrentJob: boolean; | ||
description: object; | ||
technologies: string[]; | ||
} |
Oops, something went wrong.