diff --git a/modules/hudozka-strapi-api/api/home/config/routes.json b/modules/hudozka-strapi-api/api/home/config/routes.json new file mode 100644 index 00000000..69b6108d --- /dev/null +++ b/modules/hudozka-strapi-api/api/home/config/routes.json @@ -0,0 +1,28 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/home", + "handler": "home.find", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/home", + "handler": "home.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/home", + "handler": "home.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/modules/hudozka-strapi-api/api/home/controllers/home.js b/modules/hudozka-strapi-api/api/home/controllers/home.js new file mode 100644 index 00000000..556f4fce --- /dev/null +++ b/modules/hudozka-strapi-api/api/home/controllers/home.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/controllers.html#core-controllers) + * to customize this controller + */ + +module.exports = {}; diff --git a/modules/hudozka-strapi-api/api/home/models/home.js b/modules/hudozka-strapi-api/api/home/models/home.js new file mode 100644 index 00000000..dd847efd --- /dev/null +++ b/modules/hudozka-strapi-api/api/home/models/home.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/models.html#lifecycle-hooks) + * to customize this model + */ + +module.exports = {}; diff --git a/modules/hudozka-strapi-api/api/home/models/home.settings.json b/modules/hudozka-strapi-api/api/home/models/home.settings.json new file mode 100644 index 00000000..c698a8f2 --- /dev/null +++ b/modules/hudozka-strapi-api/api/home/models/home.settings.json @@ -0,0 +1,24 @@ +{ + "kind": "singleType", + "collectionName": "homes", + "info": { + "name": "Home", + "description": "" + }, + "options": { + "increments": true, + "timestamps": true, + "draftAndPublish": false + }, + "attributes": { + "title": { + "type": "string" + }, + "cards": { + "type": "dynamiczone", + "components": [ + "hudozka.page-card" + ] + } + } +} diff --git a/modules/hudozka-strapi-api/api/home/services/home.js b/modules/hudozka-strapi-api/api/home/services/home.js new file mode 100644 index 00000000..6bc4168d --- /dev/null +++ b/modules/hudozka-strapi-api/api/home/services/home.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/services.html#core-services) + * to customize this service + */ + +module.exports = {}; diff --git a/modules/hudozka-strapi-api/components/hudozka/page-card.json b/modules/hudozka-strapi-api/components/hudozka/page-card.json new file mode 100644 index 00000000..b3a7f6cf --- /dev/null +++ b/modules/hudozka-strapi-api/components/hudozka/page-card.json @@ -0,0 +1,23 @@ +{ + "collectionName": "components_hudozka_page_cards", + "info": { + "name": "PageCard", + "icon": "award" + }, + "options": {}, + "attributes": { + "page": { + "model": "page" + }, + "layout": { + "type": "enumeration", + "enum": [ + "small", + "medium", + "big" + ], + "default": "small", + "required": true + } + } +}