From c3479135f95a7491c2436a113a6850505083d6dd Mon Sep 17 00:00:00 2001 From: oxypomme Date: Wed, 2 Feb 2022 08:38:38 +0100 Subject: [PATCH 01/13] feat: :sparkles: Added description models BREAKING CHANGE: Models changes --- .../content-types/description/schema.json | 56 +++++++++++++++++++ .../description/controllers/description.js | 9 +++ src/api/description/routes/description.js | 9 +++ src/api/description/services/description.js | 9 +++ 4 files changed, 83 insertions(+) create mode 100644 src/api/description/content-types/description/schema.json create mode 100644 src/api/description/controllers/description.js create mode 100644 src/api/description/routes/description.js create mode 100644 src/api/description/services/description.js diff --git a/src/api/description/content-types/description/schema.json b/src/api/description/content-types/description/schema.json new file mode 100644 index 0000000..1f29bf1 --- /dev/null +++ b/src/api/description/content-types/description/schema.json @@ -0,0 +1,56 @@ +{ + "kind": "singleType", + "collectionName": "descriptions", + "info": { + "singularName": "description", + "pluralName": "descriptions", + "displayName": "Description", + "description": "" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "attributes": { + "role": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "string", + "required": true + }, + "avatar": { + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "type": "string", + "maxLength": 2048, + "regex": "https?://.*", + "minLength": 7 + }, + "profile_intro": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "text" + }, + "description": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "text" + } + } +} diff --git a/src/api/description/controllers/description.js b/src/api/description/controllers/description.js new file mode 100644 index 0000000..c02cb43 --- /dev/null +++ b/src/api/description/controllers/description.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * description controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::description.description'); diff --git a/src/api/description/routes/description.js b/src/api/description/routes/description.js new file mode 100644 index 0000000..340b993 --- /dev/null +++ b/src/api/description/routes/description.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * description router. + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::description.description'); diff --git a/src/api/description/services/description.js b/src/api/description/services/description.js new file mode 100644 index 0000000..270377a --- /dev/null +++ b/src/api/description/services/description.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * description service. + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::description.description'); From cc5f405f80b0e4dca19d212c416619489f69dfb0 Mon Sep 17 00:00:00 2001 From: oxypomme Date: Wed, 2 Feb 2022 08:38:58 +0100 Subject: [PATCH 02/13] feat: :sparkles: Added diplomes models --- .../diplome/content-types/diplome/schema.json | 87 +++++++++++++++++++ src/api/diplome/controllers/diplome.js | 9 ++ src/api/diplome/routes/diplome.js | 9 ++ src/api/diplome/services/diplome.js | 9 ++ 4 files changed, 114 insertions(+) create mode 100644 src/api/diplome/content-types/diplome/schema.json create mode 100644 src/api/diplome/controllers/diplome.js create mode 100644 src/api/diplome/routes/diplome.js create mode 100644 src/api/diplome/services/diplome.js diff --git a/src/api/diplome/content-types/diplome/schema.json b/src/api/diplome/content-types/diplome/schema.json new file mode 100644 index 0000000..98ae77d --- /dev/null +++ b/src/api/diplome/content-types/diplome/schema.json @@ -0,0 +1,87 @@ +{ + "kind": "collectionType", + "collectionName": "diplomes", + "info": { + "singularName": "diplome", + "pluralName": "diplomes", + "displayName": "Diplomes", + "description": "" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "attributes": { + "start": { + "type": "date", + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "required": true + }, + "end": { + "type": "date", + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "required": true + }, + "name": { + "type": "string", + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "required": true + }, + "location": { + "type": "string", + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "required": true + }, + "logo": { + "type": "media", + "multiple": false, + "required": false, + "allowedTypes": [ + "images" + ], + "pluginOptions": { + "i18n": { + "localized": false + } + } + }, + "description": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "text" + }, + "isApprentice": { + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "type": "boolean", + "default": false, + "required": true + } + } +} diff --git a/src/api/diplome/controllers/diplome.js b/src/api/diplome/controllers/diplome.js new file mode 100644 index 0000000..215405c --- /dev/null +++ b/src/api/diplome/controllers/diplome.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * diplome controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::diplome.diplome'); diff --git a/src/api/diplome/routes/diplome.js b/src/api/diplome/routes/diplome.js new file mode 100644 index 0000000..82e2af1 --- /dev/null +++ b/src/api/diplome/routes/diplome.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * diplome router. + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::diplome.diplome'); diff --git a/src/api/diplome/services/diplome.js b/src/api/diplome/services/diplome.js new file mode 100644 index 0000000..ab50e05 --- /dev/null +++ b/src/api/diplome/services/diplome.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * diplome service. + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::diplome.diplome'); From dff2d58378d8517bfff458840344137d46a791df Mon Sep 17 00:00:00 2001 From: oxypomme Date: Wed, 2 Feb 2022 08:39:36 +0100 Subject: [PATCH 03/13] feat: :sparkles: Added experiences models --- .../content-types/experience/schema.json | 82 +++++++++++++++++++ src/api/experience/controllers/experience.js | 9 ++ src/api/experience/routes/experience.js | 9 ++ src/api/experience/services/experience.js | 9 ++ 4 files changed, 109 insertions(+) create mode 100644 src/api/experience/content-types/experience/schema.json create mode 100644 src/api/experience/controllers/experience.js create mode 100644 src/api/experience/routes/experience.js create mode 100644 src/api/experience/services/experience.js diff --git a/src/api/experience/content-types/experience/schema.json b/src/api/experience/content-types/experience/schema.json new file mode 100644 index 0000000..c1d336e --- /dev/null +++ b/src/api/experience/content-types/experience/schema.json @@ -0,0 +1,82 @@ +{ + "kind": "collectionType", + "collectionName": "experiences", + "info": { + "singularName": "experience", + "pluralName": "experiences", + "displayName": "Travails", + "description": "" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "attributes": { + "start": { + "type": "date", + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "required": true + }, + "end": { + "type": "date", + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "required": false + }, + "name": { + "type": "string", + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "required": true + }, + "location": { + "type": "string", + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "required": false + }, + "role": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "string", + "required": true + }, + "description": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "text", + "required": false + }, + "logo": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "string" + } + } +} diff --git a/src/api/experience/controllers/experience.js b/src/api/experience/controllers/experience.js new file mode 100644 index 0000000..a811483 --- /dev/null +++ b/src/api/experience/controllers/experience.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * experience controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::experience.experience'); diff --git a/src/api/experience/routes/experience.js b/src/api/experience/routes/experience.js new file mode 100644 index 0000000..46e5124 --- /dev/null +++ b/src/api/experience/routes/experience.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * experience router. + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::experience.experience'); diff --git a/src/api/experience/services/experience.js b/src/api/experience/services/experience.js new file mode 100644 index 0000000..3787576 --- /dev/null +++ b/src/api/experience/services/experience.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * experience service. + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::experience.experience'); From 55f8ec773915e0f5276c7d0c33396a1e26a2d429 Mon Sep 17 00:00:00 2001 From: oxypomme Date: Wed, 2 Feb 2022 08:40:12 +0100 Subject: [PATCH 04/13] feat: :sparkles: Added languages models --- .../content-types/language/schema.json | 27 +++++++++++++++++++ src/api/language/controllers/language.js | 9 +++++++ src/api/language/routes/language.js | 9 +++++++ src/api/language/services/language.js | 9 +++++++ 4 files changed, 54 insertions(+) create mode 100644 src/api/language/content-types/language/schema.json create mode 100644 src/api/language/controllers/language.js create mode 100644 src/api/language/routes/language.js create mode 100644 src/api/language/services/language.js diff --git a/src/api/language/content-types/language/schema.json b/src/api/language/content-types/language/schema.json new file mode 100644 index 0000000..4ff43b0 --- /dev/null +++ b/src/api/language/content-types/language/schema.json @@ -0,0 +1,27 @@ +{ + "kind": "collectionType", + "collectionName": "languages", + "info": { + "singularName": "language", + "pluralName": "languages", + "displayName": "Langages", + "description": "" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": {}, + "attributes": { + "name": { + "type": "string", + "unique": true, + "required": true + }, + "color": { + "type": "string" + }, + "icon": { + "type": "string" + } + } +} diff --git a/src/api/language/controllers/language.js b/src/api/language/controllers/language.js new file mode 100644 index 0000000..95d18dc --- /dev/null +++ b/src/api/language/controllers/language.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * language controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::language.language'); diff --git a/src/api/language/routes/language.js b/src/api/language/routes/language.js new file mode 100644 index 0000000..c9a9292 --- /dev/null +++ b/src/api/language/routes/language.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * language router. + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::language.language'); diff --git a/src/api/language/services/language.js b/src/api/language/services/language.js new file mode 100644 index 0000000..d597ae2 --- /dev/null +++ b/src/api/language/services/language.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * language service. + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::language.language'); From 0a32055ad2899eef417cceb6c9e2e952428e9e08 Mon Sep 17 00:00:00 2001 From: oxypomme Date: Wed, 2 Feb 2022 08:40:23 +0100 Subject: [PATCH 05/13] feat: :sparkles: Added techs models --- .../content-types/technologie/schema.json | 27 +++++++++++++++++++ .../technologie/controllers/technologie.js | 9 +++++++ src/api/technologie/routes/technologie.js | 9 +++++++ src/api/technologie/services/technologie.js | 9 +++++++ 4 files changed, 54 insertions(+) create mode 100644 src/api/technologie/content-types/technologie/schema.json create mode 100644 src/api/technologie/controllers/technologie.js create mode 100644 src/api/technologie/routes/technologie.js create mode 100644 src/api/technologie/services/technologie.js diff --git a/src/api/technologie/content-types/technologie/schema.json b/src/api/technologie/content-types/technologie/schema.json new file mode 100644 index 0000000..f3bb983 --- /dev/null +++ b/src/api/technologie/content-types/technologie/schema.json @@ -0,0 +1,27 @@ +{ + "kind": "collectionType", + "collectionName": "technologies", + "info": { + "singularName": "technologie", + "pluralName": "technologies", + "displayName": "Technologies", + "description": "" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": {}, + "attributes": { + "name": { + "type": "string", + "required": true, + "unique": true + }, + "color": { + "type": "string" + }, + "icon": { + "type": "string" + } + } +} diff --git a/src/api/technologie/controllers/technologie.js b/src/api/technologie/controllers/technologie.js new file mode 100644 index 0000000..c66a7c5 --- /dev/null +++ b/src/api/technologie/controllers/technologie.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * technologie controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::technologie.technologie'); diff --git a/src/api/technologie/routes/technologie.js b/src/api/technologie/routes/technologie.js new file mode 100644 index 0000000..261164c --- /dev/null +++ b/src/api/technologie/routes/technologie.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * technologie router. + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::technologie.technologie'); diff --git a/src/api/technologie/services/technologie.js b/src/api/technologie/services/technologie.js new file mode 100644 index 0000000..4e00e60 --- /dev/null +++ b/src/api/technologie/services/technologie.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * technologie service. + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::technologie.technologie'); From e2daf5d7f740bccd8cb218d9efe44b622a6df45b Mon Sep 17 00:00:00 2001 From: oxypomme Date: Wed, 2 Feb 2022 08:40:33 +0100 Subject: [PATCH 06/13] feat: :sparkles: Added project models --- .../project/content-types/project/schema.json | 109 ++++++++++++++++++ src/api/project/controllers/project.js | 9 ++ src/api/project/routes/project.js | 9 ++ src/api/project/services/project.js | 9 ++ src/components/components/git-repo.json | 19 +++ 5 files changed, 155 insertions(+) create mode 100644 src/api/project/content-types/project/schema.json create mode 100644 src/api/project/controllers/project.js create mode 100644 src/api/project/routes/project.js create mode 100644 src/api/project/services/project.js create mode 100644 src/components/components/git-repo.json diff --git a/src/api/project/content-types/project/schema.json b/src/api/project/content-types/project/schema.json new file mode 100644 index 0000000..e17b84d --- /dev/null +++ b/src/api/project/content-types/project/schema.json @@ -0,0 +1,109 @@ +{ + "kind": "collectionType", + "collectionName": "projects", + "info": { + "singularName": "project", + "pluralName": "projects", + "displayName": "Projets", + "description": "" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "attributes": { + "name": { + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "type": "string", + "required": true + }, + "type": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "enumeration", + "enum": [ + "personal", + "school", + "business" + ], + "required": true, + "default": "personal" + }, + "description": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "richtext", + "required": false + }, + "featured": { + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "type": "boolean", + "default": false, + "required": true + }, + "imageURL": { + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "type": "string" + }, + "languages": { + "type": "relation", + "relation": "oneToMany", + "target": "api::language.language" + }, + "technologies": { + "type": "relation", + "relation": "oneToMany", + "target": "api::technologie.technologie" + }, + "goal": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "text" + }, + "git": { + "type": "component", + "repeatable": false, + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "required": false, + "component": "components.git-repo" + }, + "url": { + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "type": "string", + "required": false + } + } +} diff --git a/src/api/project/controllers/project.js b/src/api/project/controllers/project.js new file mode 100644 index 0000000..edcf1de --- /dev/null +++ b/src/api/project/controllers/project.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * project controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::project.project'); diff --git a/src/api/project/routes/project.js b/src/api/project/routes/project.js new file mode 100644 index 0000000..345a51f --- /dev/null +++ b/src/api/project/routes/project.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * project router. + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::project.project'); diff --git a/src/api/project/services/project.js b/src/api/project/services/project.js new file mode 100644 index 0000000..4a8706b --- /dev/null +++ b/src/api/project/services/project.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * project service. + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::project.project'); diff --git a/src/components/components/git-repo.json b/src/components/components/git-repo.json new file mode 100644 index 0000000..64f43bf --- /dev/null +++ b/src/components/components/git-repo.json @@ -0,0 +1,19 @@ +{ + "collectionName": "components_components_git_repos", + "info": { + "displayName": "Git Repo", + "icon": "code", + "description": "" + }, + "options": {}, + "attributes": { + "provider": { + "type": "string", + "required": true + }, + "url": { + "type": "string", + "required": true + } + } +} From 11ce1bfc9fd14a61d3eea8aa32f9cb81ce956707 Mon Sep 17 00:00:00 2001 From: oxypomme Date: Wed, 2 Feb 2022 12:17:59 +0100 Subject: [PATCH 07/13] fix: :bug: Fixed localisation of logos url --- .../diplome/content-types/diplome/schema.json | 21 +++++++------------ .../content-types/experience/schema.json | 2 +- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/api/diplome/content-types/diplome/schema.json b/src/api/diplome/content-types/diplome/schema.json index 98ae77d..21ed58a 100644 --- a/src/api/diplome/content-types/diplome/schema.json +++ b/src/api/diplome/content-types/diplome/schema.json @@ -52,19 +52,6 @@ }, "required": true }, - "logo": { - "type": "media", - "multiple": false, - "required": false, - "allowedTypes": [ - "images" - ], - "pluginOptions": { - "i18n": { - "localized": false - } - } - }, "description": { "pluginOptions": { "i18n": { @@ -82,6 +69,14 @@ "type": "boolean", "default": false, "required": true + }, + "logo": { + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "type": "string" } } } diff --git a/src/api/experience/content-types/experience/schema.json b/src/api/experience/content-types/experience/schema.json index c1d336e..54c062c 100644 --- a/src/api/experience/content-types/experience/schema.json +++ b/src/api/experience/content-types/experience/schema.json @@ -73,7 +73,7 @@ "logo": { "pluginOptions": { "i18n": { - "localized": true + "localized": false } }, "type": "string" From 23fc9554e20c38fd06e644985af87d814f30fbc5 Mon Sep 17 00:00:00 2001 From: oxypomme Date: Fri, 4 Feb 2022 14:28:31 +0100 Subject: [PATCH 08/13] feat: :sparkles: Small changes on experiences & git --- .../experience/content-types/experience/schema.json | 9 +++++++++ src/components/components/git-repo.json | 11 +++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/api/experience/content-types/experience/schema.json b/src/api/experience/content-types/experience/schema.json index 54c062c..c1869fb 100644 --- a/src/api/experience/content-types/experience/schema.json +++ b/src/api/experience/content-types/experience/schema.json @@ -77,6 +77,15 @@ } }, "type": "string" + }, + "isApprentice": { + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "type": "boolean", + "default": false } } } diff --git a/src/components/components/git-repo.json b/src/components/components/git-repo.json index 64f43bf..747f326 100644 --- a/src/components/components/git-repo.json +++ b/src/components/components/git-repo.json @@ -7,13 +7,16 @@ }, "options": {}, "attributes": { - "provider": { - "type": "string", - "required": true - }, "url": { "type": "string", "required": true + }, + "provider": { + "type": "enumeration", + "enum": [ + "GitHub", + "GitLab" + ] } } } From 4142830dad5f0430864e06a38cb6f58c2ddf9e03 Mon Sep 17 00:00:00 2001 From: oxypomme Date: Fri, 4 Feb 2022 14:42:15 +0100 Subject: [PATCH 09/13] feat: :sparkles: Added testimonial models --- .../content-types/description/schema.json | 18 +++++++ .../content-types/testimonial/schema.json | 54 +++++++++++++++++++ .../testimonial/controllers/testimonial.js | 9 ++++ src/api/testimonial/routes/testimonial.js | 9 ++++ src/api/testimonial/services/testimonial.js | 9 ++++ 5 files changed, 99 insertions(+) create mode 100644 src/api/testimonial/content-types/testimonial/schema.json create mode 100644 src/api/testimonial/controllers/testimonial.js create mode 100644 src/api/testimonial/routes/testimonial.js create mode 100644 src/api/testimonial/services/testimonial.js diff --git a/src/api/description/content-types/description/schema.json b/src/api/description/content-types/description/schema.json index 1f29bf1..153dbda 100644 --- a/src/api/description/content-types/description/schema.json +++ b/src/api/description/content-types/description/schema.json @@ -51,6 +51,24 @@ } }, "type": "text" + }, + "birthdate": { + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "type": "date", + "required": true + }, + "name": { + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "type": "string", + "required": true } } } diff --git a/src/api/testimonial/content-types/testimonial/schema.json b/src/api/testimonial/content-types/testimonial/schema.json new file mode 100644 index 0000000..d934a6e --- /dev/null +++ b/src/api/testimonial/content-types/testimonial/schema.json @@ -0,0 +1,54 @@ +{ + "kind": "collectionType", + "collectionName": "testimonials", + "info": { + "singularName": "testimonial", + "pluralName": "testimonials", + "displayName": "Témoignages", + "description": "" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "attributes": { + "content": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "richtext", + "required": true + }, + "name": { + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "type": "string", + "required": true + }, + "role": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "string" + }, + "logo": { + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "type": "string" + } + } +} diff --git a/src/api/testimonial/controllers/testimonial.js b/src/api/testimonial/controllers/testimonial.js new file mode 100644 index 0000000..038ea69 --- /dev/null +++ b/src/api/testimonial/controllers/testimonial.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * testimonial controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::testimonial.testimonial'); diff --git a/src/api/testimonial/routes/testimonial.js b/src/api/testimonial/routes/testimonial.js new file mode 100644 index 0000000..4cb87cf --- /dev/null +++ b/src/api/testimonial/routes/testimonial.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * testimonial router. + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::testimonial.testimonial'); diff --git a/src/api/testimonial/services/testimonial.js b/src/api/testimonial/services/testimonial.js new file mode 100644 index 0000000..98d913e --- /dev/null +++ b/src/api/testimonial/services/testimonial.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * testimonial service. + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::testimonial.testimonial'); From 74750905c10da111db0e300cd063954facfbb6ca Mon Sep 17 00:00:00 2001 From: oxypomme Date: Fri, 4 Feb 2022 17:55:41 +0100 Subject: [PATCH 10/13] feat: :sparkles: Added project domain --- .../project/content-types/project/schema.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/api/project/content-types/project/schema.json b/src/api/project/content-types/project/schema.json index e17b84d..75feb06 100644 --- a/src/api/project/content-types/project/schema.json +++ b/src/api/project/content-types/project/schema.json @@ -104,6 +104,24 @@ }, "type": "string", "required": false + }, + "domain": { + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "type": "enumeration", + "enum": [ + "web", + "bot", + "software", + "portable_software", + "mobile", + "game" + ], + "required": true, + "default": "web" } } } From 769dea82bf2a2670686cc01afc7281fdab3d891f Mon Sep 17 00:00:00 2001 From: oxypomme Date: Tue, 1 Mar 2022 12:58:36 +0100 Subject: [PATCH 11/13] feat: :sparkles: Added blog models --- src/api/blog/content-types/blog/schema.json | 43 +++++++++++++++++++++ src/api/blog/controllers/blog.js | 9 +++++ src/api/blog/routes/blog.js | 9 +++++ src/api/blog/services/blog.js | 9 +++++ 4 files changed, 70 insertions(+) create mode 100644 src/api/blog/content-types/blog/schema.json create mode 100644 src/api/blog/controllers/blog.js create mode 100644 src/api/blog/routes/blog.js create mode 100644 src/api/blog/services/blog.js diff --git a/src/api/blog/content-types/blog/schema.json b/src/api/blog/content-types/blog/schema.json new file mode 100644 index 0000000..eea69fc --- /dev/null +++ b/src/api/blog/content-types/blog/schema.json @@ -0,0 +1,43 @@ +{ + "kind": "collectionType", + "collectionName": "blogs", + "info": { + "singularName": "blog", + "pluralName": "blogs", + "displayName": "Blog" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "attributes": { + "title": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "string" + }, + "content": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "richtext" + }, + "media": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "string" + } + } +} diff --git a/src/api/blog/controllers/blog.js b/src/api/blog/controllers/blog.js new file mode 100644 index 0000000..f325a06 --- /dev/null +++ b/src/api/blog/controllers/blog.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * blog controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::blog.blog'); diff --git a/src/api/blog/routes/blog.js b/src/api/blog/routes/blog.js new file mode 100644 index 0000000..62d1fe1 --- /dev/null +++ b/src/api/blog/routes/blog.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * blog router. + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::blog.blog'); diff --git a/src/api/blog/services/blog.js b/src/api/blog/services/blog.js new file mode 100644 index 0000000..f15940c --- /dev/null +++ b/src/api/blog/services/blog.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * blog service. + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::blog.blog'); From 9b6a5dc4a74089b67e157693f0f8b7b8b6772531 Mon Sep 17 00:00:00 2001 From: oxypomme Date: Tue, 1 Mar 2022 13:00:43 +0100 Subject: [PATCH 12/13] fix: :bug: Fixed localisation for blog --- src/api/blog/content-types/blog/schema.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/api/blog/content-types/blog/schema.json b/src/api/blog/content-types/blog/schema.json index eea69fc..3c8fe03 100644 --- a/src/api/blog/content-types/blog/schema.json +++ b/src/api/blog/content-types/blog/schema.json @@ -4,7 +4,8 @@ "info": { "singularName": "blog", "pluralName": "blogs", - "displayName": "Blog" + "displayName": "Blog", + "description": "" }, "options": { "draftAndPublish": true @@ -34,7 +35,7 @@ "media": { "pluginOptions": { "i18n": { - "localized": true + "localized": false } }, "type": "string" From b347bae25f0142f1d0849e2ed5f63488c13bfb7f Mon Sep 17 00:00:00 2001 From: oxypomme Date: Mon, 7 Mar 2022 17:44:17 +0100 Subject: [PATCH 13/13] revert: :fire: Removed useless data --- src/api/description/content-types/description/schema.json | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/api/description/content-types/description/schema.json b/src/api/description/content-types/description/schema.json index 153dbda..30e499d 100644 --- a/src/api/description/content-types/description/schema.json +++ b/src/api/description/content-types/description/schema.json @@ -36,14 +36,6 @@ "regex": "https?://.*", "minLength": 7 }, - "profile_intro": { - "pluginOptions": { - "i18n": { - "localized": true - } - }, - "type": "text" - }, "description": { "pluginOptions": { "i18n": {