mirror of
https://github.com/tjsga/website-sanity.git
synced 2025-04-18 18:10:17 -04:00
+News Articles, Members, Mission, Initiatives
This commit is contained in:
commit
769cd1fc86
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
node_modules/
|
||||||
|
dist
|
9
README.md
Normal file
9
README.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Sanity Clean Content Studio
|
||||||
|
|
||||||
|
Congratulations, you have now installed the Sanity Content Studio, an open source real-time content editing environment connected to the Sanity backend.
|
||||||
|
|
||||||
|
Now you can do the following things:
|
||||||
|
|
||||||
|
- [Read “getting started” in the docs](https://www.sanity.io/docs/introduction/getting-started?utm_source=readme)
|
||||||
|
- [Join the community Slack](https://slack.sanity.io/?utm_source=readme)
|
||||||
|
- [Extend and build plugins](https://www.sanity.io/docs/content-studio/extending?utm_source=readme)
|
7
config/.checksums
Normal file
7
config/.checksums
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"#": "Used by Sanity to keep track of configuration file checksums, do not delete or modify!",
|
||||||
|
"@sanity/default-layout": "bb034f391ba508a6ca8cd971967cbedeb131c4d19b17b28a0895f32db5d568ea",
|
||||||
|
"@sanity/default-login": "6fb6d3800aa71346e1b84d95bbcaa287879456f2922372bb0294e30b968cd37f",
|
||||||
|
"@sanity/form-builder": "b38478227ba5e22c91981da4b53436df22e48ff25238a55a973ed620be5068aa",
|
||||||
|
"@sanity/data-aspects": "d199e2c199b3e26cd28b68dc84d7fc01c9186bf5089580f2e2446994d36b3cb6"
|
||||||
|
}
|
3
config/@sanity/data-aspects.json
Normal file
3
config/@sanity/data-aspects.json
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"listOptions": {}
|
||||||
|
}
|
6
config/@sanity/default-layout.json
Normal file
6
config/@sanity/default-layout.json
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"toolSwitcher": {
|
||||||
|
"order": [],
|
||||||
|
"hidden": []
|
||||||
|
}
|
||||||
|
}
|
7
config/@sanity/default-login.json
Normal file
7
config/@sanity/default-login.json
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"providers": {
|
||||||
|
"mode": "append",
|
||||||
|
"redirectOnSingle": false,
|
||||||
|
"entries": []
|
||||||
|
}
|
||||||
|
}
|
5
config/@sanity/form-builder.json
Normal file
5
config/@sanity/form-builder.json
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"images": {
|
||||||
|
"directUploads": true
|
||||||
|
}
|
||||||
|
}
|
30
package.json
Normal file
30
package.json
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
"name": "tjsgawebsite",
|
||||||
|
"private": true,
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "",
|
||||||
|
"main": "package.json",
|
||||||
|
"author": "Michael Fatemi <myfatemi04@gmail.com>",
|
||||||
|
"license": "UNLICENSED",
|
||||||
|
"scripts": {
|
||||||
|
"start": "sanity start",
|
||||||
|
"test": "sanity check",
|
||||||
|
"build": "sanity build"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"sanity"
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
"@sanity/base": "^2.0.9",
|
||||||
|
"@sanity/components": "^2.0.9",
|
||||||
|
"@sanity/core": "^2.0.9",
|
||||||
|
"@sanity/default-layout": "^2.0.9",
|
||||||
|
"@sanity/default-login": "^2.0.9",
|
||||||
|
"@sanity/desk-tool": "^2.0.9",
|
||||||
|
"@sanity/vision": "^2.0.9",
|
||||||
|
"prop-types": "^15.7",
|
||||||
|
"react": "^17.0",
|
||||||
|
"react-dom": "^17.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {}
|
||||||
|
}
|
1
plugins/.gitkeep
Normal file
1
plugins/.gitkeep
Normal file
|
@ -0,0 +1 @@
|
||||||
|
User-specific packages can be placed here
|
29
sanity-structure.js
Normal file
29
sanity-structure.js
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
import S from '@sanity/desk-tool/structure-builder';
|
||||||
|
|
||||||
|
const notSingletonPage = listItem => ![
|
||||||
|
"mission",
|
||||||
|
"footer"
|
||||||
|
].includes(listItem.getId())
|
||||||
|
|
||||||
|
export default () =>
|
||||||
|
S.list()
|
||||||
|
.title("Content")
|
||||||
|
.items([
|
||||||
|
S.listItem()
|
||||||
|
.title("Mission")
|
||||||
|
.child(
|
||||||
|
S.editor()
|
||||||
|
.id("mission")
|
||||||
|
.schemaType("mission")
|
||||||
|
.documentId("mission")
|
||||||
|
),
|
||||||
|
S.listItem()
|
||||||
|
.title("Footer")
|
||||||
|
.child(
|
||||||
|
S.editor()
|
||||||
|
.id("footer")
|
||||||
|
.schemaType("footer")
|
||||||
|
.documentId("footer")
|
||||||
|
),
|
||||||
|
...S.documentTypeListItems().filter(notSingletonPage)
|
||||||
|
]);
|
34
sanity.json
Normal file
34
sanity.json
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
"root": true,
|
||||||
|
"project": {
|
||||||
|
"name": "TJ SGA Website"
|
||||||
|
},
|
||||||
|
"api": {
|
||||||
|
"projectId": "yi263kzm",
|
||||||
|
"dataset": "production"
|
||||||
|
},
|
||||||
|
"plugins": [
|
||||||
|
"@sanity/base",
|
||||||
|
"@sanity/components",
|
||||||
|
"@sanity/default-layout",
|
||||||
|
"@sanity/default-login",
|
||||||
|
"@sanity/desk-tool"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"development": {
|
||||||
|
"plugins": [
|
||||||
|
"@sanity/vision"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"parts": [
|
||||||
|
{
|
||||||
|
"name": "part:@sanity/base/schema",
|
||||||
|
"path": "./schemas/schema"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "part:@sanity/desk-tool/structure",
|
||||||
|
"path": "./sanity-structure.js"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
28
schemas/article.js
Normal file
28
schemas/article.js
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
export default {
|
||||||
|
name: "article",
|
||||||
|
title: "News Article",
|
||||||
|
type: "document",
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "title",
|
||||||
|
title: "Title",
|
||||||
|
type: "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "thumbnail",
|
||||||
|
title: "Thumbnail",
|
||||||
|
type: "image"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "publish_date",
|
||||||
|
title: "Publish date",
|
||||||
|
type: "date"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "content",
|
||||||
|
title: "Content",
|
||||||
|
type: "array",
|
||||||
|
of: [{type: "block"}]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
31
schemas/footer.js
Normal file
31
schemas/footer.js
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
export default {
|
||||||
|
name: "footer",
|
||||||
|
title: "Footer",
|
||||||
|
type: "document",
|
||||||
|
__experimental_actions: [ 'update', 'publish', 'create' ], // removing 'delete'
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "columns",
|
||||||
|
title: "Columns",
|
||||||
|
type: "array",
|
||||||
|
of: [{
|
||||||
|
name: "column",
|
||||||
|
title: "Column",
|
||||||
|
type: "document",
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "title",
|
||||||
|
title: "Title",
|
||||||
|
type: "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "links",
|
||||||
|
title: "Links",
|
||||||
|
type: "array",
|
||||||
|
of: [{type: "string"}]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
22
schemas/get_involved.js
Normal file
22
schemas/get_involved.js
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
export default {
|
||||||
|
name: "get_involved",
|
||||||
|
title: "Way to get involved",
|
||||||
|
type: "document",
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "title",
|
||||||
|
title: "Title",
|
||||||
|
type: "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "text",
|
||||||
|
title: "Text",
|
||||||
|
type: "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "priority",
|
||||||
|
title: "Priority",
|
||||||
|
type: "number"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
23
schemas/initiative.js
Normal file
23
schemas/initiative.js
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
export default {
|
||||||
|
name: "initiative",
|
||||||
|
title: "Initiative",
|
||||||
|
type: "document",
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "name",
|
||||||
|
title: "Name",
|
||||||
|
type: "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "thumbnail",
|
||||||
|
title: "Thumbnail",
|
||||||
|
type: "image"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "content",
|
||||||
|
title: "Content",
|
||||||
|
type: "array",
|
||||||
|
of: [{type: "block"}]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
38
schemas/member.js
Normal file
38
schemas/member.js
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
export default {
|
||||||
|
name: "member",
|
||||||
|
title: "Member",
|
||||||
|
type: "document",
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "name",
|
||||||
|
title: "Name",
|
||||||
|
type: "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "year",
|
||||||
|
title: "Graduating Year",
|
||||||
|
type: "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "committee",
|
||||||
|
title: "Committee (excomm or steering)",
|
||||||
|
type: "string",
|
||||||
|
validation: Rule => Rule.regex(/^(excomm|steering)$/)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "role",
|
||||||
|
title: "Role",
|
||||||
|
type: "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "profile_photo",
|
||||||
|
title: "Profile Photo",
|
||||||
|
type: "image"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "bio",
|
||||||
|
title: "Bio",
|
||||||
|
type: "text"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
28
schemas/mission.js
Normal file
28
schemas/mission.js
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
export default {
|
||||||
|
name: "mission",
|
||||||
|
title: "Mission",
|
||||||
|
type: "document",
|
||||||
|
__experimental_actions: [ 'update', 'publish', 'create' ], // removing 'delete'
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "mission",
|
||||||
|
title: "Mission",
|
||||||
|
type: "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "vision",
|
||||||
|
title: "Vision",
|
||||||
|
type: "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "quote_text",
|
||||||
|
title: "Quote text",
|
||||||
|
type: "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "quote_author",
|
||||||
|
title: "Quote author",
|
||||||
|
type: "string"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
29
schemas/schema.js
Normal file
29
schemas/schema.js
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
// First, we must import the schema creator
|
||||||
|
import createSchema from 'part:@sanity/base/schema-creator'
|
||||||
|
|
||||||
|
// Then import schema types from any plugins that might expose them
|
||||||
|
import schemaTypes from 'all:part:@sanity/base/schema-type'
|
||||||
|
|
||||||
|
// Custom schemas
|
||||||
|
import article from './article';
|
||||||
|
import footer from './footer';
|
||||||
|
import get_involved from './get_involved';
|
||||||
|
import initiative from './initiative';
|
||||||
|
import member from './member';
|
||||||
|
import mission from './mission';
|
||||||
|
|
||||||
|
// Then we give our schema to the builder and provide the result to Sanity
|
||||||
|
export default createSchema({
|
||||||
|
// We name our schema
|
||||||
|
name: 'default',
|
||||||
|
// Then proceed to concatenate our document type
|
||||||
|
// to the ones provided by any plugins that are installed
|
||||||
|
types: schemaTypes.concat([
|
||||||
|
article,
|
||||||
|
footer,
|
||||||
|
get_involved,
|
||||||
|
initiative,
|
||||||
|
member,
|
||||||
|
mission
|
||||||
|
]),
|
||||||
|
})
|
1
static/.gitkeep
Normal file
1
static/.gitkeep
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Files placed here will be served by the Sanity server under the `/static`-prefix
|
BIN
static/favicon.ico
Normal file
BIN
static/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
6
tsconfig.json
Normal file
6
tsconfig.json
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
// Note: This config is only used to help editors like VS Code understand/resolve
|
||||||
|
// parts, the actual transpilation is done by babel. Any compiler configuration in
|
||||||
|
// here will be ignored.
|
||||||
|
"include": ["./node_modules/@sanity/base/types/**/*.ts", "./**/*.ts", "./**/*.tsx"]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user