Skip to content

Commit

Permalink
🔨 chore(schema): added description for all fields
Browse files Browse the repository at this point in the history
  • Loading branch information
sean1832 committed Jun 30, 2024
1 parent 3a77995 commit f6efe6d
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 23 deletions.
9 changes: 3 additions & 6 deletions data/projects.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,17 @@
"awards": [
{
"name": "ARM ARCHITECTURE PRIZE",
"url": "https://www.instagram.com/armarchitecture/p/CWVFOyvFK-9/?hl=zh-cn&ref=159",
"img": "/awards/arm.webp"
"url": "https://www.instagram.com/armarchitecture/p/CWVFOyvFK-9/?hl=zh-cn&ref=159"
},
{
"name": "RASCOL Students Choice Award",
"url": "https://www.instagram.com/p/CREE_m0lMBI/?img_index=1",
"img": "/awards/rascol.webp"
"url": "https://www.instagram.com/p/CREE_m0lMBI/?img_index=1"
}
],
"publications": [
{
"name": "Architecture students embrace life-changing learning on Country",
"url": "https://www.rmit.edu.au/news/all-news/2021/may/architectural-students-learning-on-country",
"img": "/awards/rmit_publication.webp"
"url": "https://www.rmit.edu.au/news/all-news/2021/may/architectural-students-learning-on-country"
},
{
"name": "On Country: Framlingham, Portfolio 2021",
Expand Down
74 changes: 58 additions & 16 deletions data/schema/projects-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
"type": "string",
"description": "Unique identifier for the project (this will be part of the URL)"
},
"name": {
"type": "string"
"type": "string",
"description": "Name of the project"
},
"type": {
"type": "string",
"description": "Type of the project",
"enum": [
"Design Studio",
"International Competition",
Expand All @@ -24,40 +27,50 @@
]
},
"year": {
"type": "string"
"type": "string",
"description": "Year of the project"
},
"description": {
"type": "string",
"description": "Short description of the project",
"maxLength": 120
},
"longDescription": {
"type": "string"
"type": "string",
"description": "Full description of the project"
},
"location": {
"type": "object",
"description": "Location of the project",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
"type": "string",
"description": "Name of the location"
},
"url": {
"type": "string",
"description": "Location URL. (e.g. Google Maps)",
"format": "uri"
}
},
"required": ["name"]
},
"group": {
"type": "array",
"description": "Group members of the project",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"awards": {
"type": "array",
"description": "Awards, honourable mentions, shortlists of the project",
"uniqueItems": true,
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
Expand All @@ -72,9 +85,11 @@
},
"publications": {
"type": "array",
"description": "Publications, articles, interviews of the project",
"uniqueItems": true,
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
Expand All @@ -89,106 +104,133 @@
},
"gallery": {
"type": "object",
"description": "Homepage project gallery properties",
"additionalProperties": false,
"properties": {
"className": {
"type": "string"
"type": "string",
"description": "Gallery container tailwindCSS className (e.g. lg:col-span-3)"
}
},
"required": ["className"]
},
"tutors": {
"type": "array",
"description": "Supervisors, tutors of the project if any",
"uniqueItems": true,
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
"type": "string",
"description": "Name of the tutor"
},
"url": {
"type": "string",
"format": "uri"
"format": "uri",
"description": "Tutor URL if any (e.g. personal website, linkedin etc.)"
}
},
"required": ["name", "url"]
}
},
"mediaContainer": {
"type": "object",
"description": "Media container properties",
"properties": {
"className": {
"type": "string"
"type": "string",
"description": "Media container tailwindCSS className (e.g. grid-cols-3)"
},
"media": {
"type": "array",
"description": "Media items of the project",
"uniqueItems": true,
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"src": {
"type": "string"
"type": "string",
"description": "Media source file path or URL. consider `./public/` folder as root for local files."
},
"alt": {
"type": "string"
"type": "string",
"description": "Media alt text for accessibility"
},
"className": {
"type": "string"
"type": "string",
"description": "Media item tailwindCSS className (e.g. col-span-2)"
},
"credit": {
"type": "object",
"description": "Media credit reference properties",
"additionalProperties": false,
"properties": {
"text": {
"type": "string"
"type": "string",
"description": "Credit text"
},
"url": {
"type": "string"
"type": "string",
"format": "uri",
"description": "Credit source URL"
},
"isButton": {
"type": "boolean",
"description": "Credit as button inside lightbox?",
"default": true
}
}
},
"sizes": {
"type": "string"
"type": "string",
"description": "Media sizes attribute for responsive images (e.g. '(min-width: 640px) 50vw, 100vw')"
},
"caption": {
"type": "object",
"additionalProperties": false,
"properties": {
"text": {
"type": "string"
"type": "string",
"description": "Detail image description text"
},
"isExpose": {
"type": "boolean",
"description": "Expose caption outside of lightbox?",
"default": true
}
}
},
"isHero": {
"type": "boolean",
"description": "Media as hero image or video?",
"default": true
},
"isAdaptive": {
"type": "boolean",
"description": "Media as adaptive image?",
"default": true
},
"isCarousel": {
"type": "boolean",
"description": "Media inside carousel?",
"default": true
},
"isExternal": {
"type": "boolean",
"description": "Media sourced from external URL?",
"default": true
},
"isInverted": {
"type": "boolean",
"description": "Media as inverted image in dark mode?",
"default": true
},
"isVideo": {
"type": "boolean",
"description": "Media is video?",
"default": true
}
},
Expand Down
2 changes: 1 addition & 1 deletion todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

- [ ] Complete image descriptions
- [x] Refactor `project.json` data structure
- [ ] Add description for each items in `projects-schema.json`
- [x] Add description for each items in `projects-schema.json`
- [x] Implement separate `blurhash.json` for image placeholders
- [ ] Rename image files

Expand Down

0 comments on commit f6efe6d

Please sign in to comment.