-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(backend): ✨ Add infrastructure data to strapi and generate types in backend * feat(frontend): ✨ Add content block to infrastruct page * feat(frontend): 💩 Try to fix styling * style(frontend): 💄 Style the block content in structure Create BlockRendererClient component for styling the block content in infrastructure. * refactor(frontend): ♻️ Run prettier and use runtime edge Improve code readability and use edge to build Cloudflare pages * fix(frontend): 🚨 Fix merge conflicts --------- Co-authored-by: Lukas Thrane <lukas@thrane.name>
- Loading branch information
2 people
authored and
GitHub
committed
Jan 31, 2024
1 parent
c9db0df
commit 20eb5be
Showing
14 changed files
with
2,976 additions
and
624 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
backend/src/api/infrastructure/content-types/infrastructure/schema.json
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,18 @@ | ||
| { | ||
| "kind": "singleType", | ||
| "collectionName": "infrastructures", | ||
| "info": { | ||
| "singularName": "infrastructure", | ||
| "pluralName": "infrastructures", | ||
| "displayName": "Infrastructure" | ||
| }, | ||
| "options": { | ||
| "draftAndPublish": true | ||
| }, | ||
| "pluginOptions": {}, | ||
| "attributes": { | ||
| "Content": { | ||
| "type": "blocks" | ||
| } | ||
| } | ||
| } |
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,9 @@ | ||
| 'use strict'; | ||
|
|
||
| /** | ||
| * infrastructure controller | ||
| */ | ||
|
|
||
| const { createCoreController } = require('@strapi/strapi').factories; | ||
|
|
||
| module.exports = createCoreController('api::infrastructure.infrastructure'); |
324 changes: 324 additions & 0 deletions
324
backend/src/api/infrastructure/documentation/1.0.0/infrastructure.json
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,324 @@ | ||
| { | ||
| "/infrastructure": { | ||
| "get": { | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/InfrastructureResponse" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "400": { | ||
| "description": "Bad Request", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/Error" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "401": { | ||
| "description": "Unauthorized", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/Error" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "403": { | ||
| "description": "Forbidden", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/Error" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "404": { | ||
| "description": "Not Found", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/Error" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "500": { | ||
| "description": "Internal Server Error", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/Error" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "tags": [ | ||
| "Infrastructure" | ||
| ], | ||
| "parameters": [ | ||
| { | ||
| "name": "sort", | ||
| "in": "query", | ||
| "description": "Sort by attributes ascending (asc) or descending (desc)", | ||
| "deprecated": false, | ||
| "required": false, | ||
| "schema": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| { | ||
| "name": "pagination[withCount]", | ||
| "in": "query", | ||
| "description": "Return page/pageSize (default: true)", | ||
| "deprecated": false, | ||
| "required": false, | ||
| "schema": { | ||
| "type": "boolean" | ||
| } | ||
| }, | ||
| { | ||
| "name": "pagination[page]", | ||
| "in": "query", | ||
| "description": "Page number (default: 0)", | ||
| "deprecated": false, | ||
| "required": false, | ||
| "schema": { | ||
| "type": "integer" | ||
| } | ||
| }, | ||
| { | ||
| "name": "pagination[pageSize]", | ||
| "in": "query", | ||
| "description": "Page size (default: 25)", | ||
| "deprecated": false, | ||
| "required": false, | ||
| "schema": { | ||
| "type": "integer" | ||
| } | ||
| }, | ||
| { | ||
| "name": "pagination[start]", | ||
| "in": "query", | ||
| "description": "Offset value (default: 0)", | ||
| "deprecated": false, | ||
| "required": false, | ||
| "schema": { | ||
| "type": "integer" | ||
| } | ||
| }, | ||
| { | ||
| "name": "pagination[limit]", | ||
| "in": "query", | ||
| "description": "Number of entities to return (default: 25)", | ||
| "deprecated": false, | ||
| "required": false, | ||
| "schema": { | ||
| "type": "integer" | ||
| } | ||
| }, | ||
| { | ||
| "name": "fields", | ||
| "in": "query", | ||
| "description": "Fields to return (ex: title,author)", | ||
| "deprecated": false, | ||
| "required": false, | ||
| "schema": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| { | ||
| "name": "populate", | ||
| "in": "query", | ||
| "description": "Relations to return", | ||
| "deprecated": false, | ||
| "required": false, | ||
| "schema": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| { | ||
| "name": "filters", | ||
| "in": "query", | ||
| "description": "Filters to apply", | ||
| "deprecated": false, | ||
| "required": false, | ||
| "schema": { | ||
| "type": "object" | ||
| }, | ||
| "style": "deepObject" | ||
| }, | ||
| { | ||
| "name": "locale", | ||
| "in": "query", | ||
| "description": "Locale to apply", | ||
| "deprecated": false, | ||
| "required": false, | ||
| "schema": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| ], | ||
| "operationId": "get/infrastructure" | ||
| }, | ||
| "put": { | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/InfrastructureResponse" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "400": { | ||
| "description": "Bad Request", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/Error" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "401": { | ||
| "description": "Unauthorized", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/Error" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "403": { | ||
| "description": "Forbidden", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/Error" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "404": { | ||
| "description": "Not Found", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/Error" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "500": { | ||
| "description": "Internal Server Error", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/Error" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "tags": [ | ||
| "Infrastructure" | ||
| ], | ||
| "parameters": [], | ||
| "operationId": "put/infrastructure", | ||
| "requestBody": { | ||
| "required": true, | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/InfrastructureRequest" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "delete": { | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "type": "integer", | ||
| "format": "int64" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "400": { | ||
| "description": "Bad Request", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/Error" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "401": { | ||
| "description": "Unauthorized", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/Error" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "403": { | ||
| "description": "Forbidden", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/Error" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "404": { | ||
| "description": "Not Found", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/Error" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "500": { | ||
| "description": "Internal Server Error", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/Error" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "tags": [ | ||
| "Infrastructure" | ||
| ], | ||
| "parameters": [], | ||
| "operationId": "delete/infrastructure" | ||
| } | ||
| } | ||
| } |
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,9 @@ | ||
| 'use strict'; | ||
|
|
||
| /** | ||
| * infrastructure router | ||
| */ | ||
|
|
||
| const { createCoreRouter } = require('@strapi/strapi').factories; | ||
|
|
||
| module.exports = createCoreRouter('api::infrastructure.infrastructure'); |
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,9 @@ | ||
| 'use strict'; | ||
|
|
||
| /** | ||
| * infrastructure service | ||
| */ | ||
|
|
||
| const { createCoreService } = require('@strapi/strapi').factories; | ||
|
|
||
| module.exports = createCoreService('api::infrastructure.infrastructure'); |
Oops, something went wrong.