Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"kind": "singleType",
"collectionName": "home_case_studies_sections",
"info": {
"singularName": "home-case-studies-section",
"pluralName": "home-case-studies-sections",
"displayName": "HomeCaseStudiesSection"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"title": {
"type": "string",
"required": true
},
"subtitle": {
"type": "text",
"required": false
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* home-case-studies-section controller
*/

import { factories } from '@strapi/strapi'

export default factories.createCoreController('api::home-case-studies-section.home-case-studies-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* home-case-studies-section router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::home-case-studies-section.home-case-studies-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* home-case-studies-section service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::home-case-studies-section.home-case-studies-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"kind": "singleType",
"collectionName": "home_get_in_touch_sections",
"info": {
"singularName": "home-get-in-touch-section",
"pluralName": "home-get-in-touch-sections",
"displayName": "HomeGetInTouchSection",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"title": {
"type": "string",
"required": true
},
"subtitle": {
"type": "string"
},
"icon": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [
"images",
"files",
"videos",
"audios"
]
},
"link": {
"type": "component",
"repeatable": false,
"component": "content.button-link"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* home-get-in-touch-section controller
*/

import { factories } from '@strapi/strapi'

export default factories.createCoreController('api::home-get-in-touch-section.home-get-in-touch-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* home-get-in-touch-section router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::home-get-in-touch-section.home-get-in-touch-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* home-get-in-touch-section service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::home-get-in-touch-section.home-get-in-touch-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"kind": "singleType",
"collectionName": "home_how_kleros_works_sections",
"info": {
"singularName": "home-how-kleros-works-section",
"pluralName": "home-how-kleros-works-sections",
"displayName": "HomeHowKlerosWorksSection",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"label": {
"type": "string",
"required": true
},
"title": {
"type": "string",
"required": true
},
"subtitle": {
"type": "string",
"required": true
},
"explainer": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we would require, two explainer Icons , one for Desktop and one for Mobile

"type": "media",
"multiple": false,
"required": true,
"allowedTypes": [
"images",
"files",
"videos",
"audios"
]
Comment on lines +31 to +36
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Restrict media types to images only

Since these fields are intended for explainer icons, they should only accept image files. The current configuration allows unnecessary media types like files, videos, and audios.

Apply this diff to both media fields:

       "allowedTypes": [
-        "images",
-        "files",
-        "videos",
-        "audios"
+        "images"
       ]

Also applies to: 39-44

},
"explainer_desktop": {
"allowedTypes": [
"images",
"files",
"videos",
"audios"
],
"type": "media",
"multiple": false
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* home-how-kleros-works-section controller
*/

import { factories } from '@strapi/strapi'

export default factories.createCoreController('api::home-how-kleros-works-section.home-how-kleros-works-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* home-how-kleros-works-section router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::home-how-kleros-works-section.home-how-kleros-works-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* home-how-kleros-works-section service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::home-how-kleros-works-section.home-how-kleros-works-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"kind": "singleType",
"collectionName": "home_learn_posts_sections",
"info": {
"singularName": "home-learn-posts-section",
"pluralName": "home-learn-posts-sections",
"displayName": "HomeLearnPostsSection",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"title": {
"type": "string",
"required": true
},
"subtitle": {
"type": "string"
},
"cards": {
"type": "component",
"repeatable": true,
"component": "content.link-card"
},
"introduction": {
"displayName": "introduction",
"type": "component",
"repeatable": false,
"component": "home.introduction"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* home-learn-posts-section controller
*/

import { factories } from '@strapi/strapi'

export default factories.createCoreController('api::home-learn-posts-section.home-learn-posts-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* home-learn-posts-section router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::home-learn-posts-section.home-learn-posts-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* home-learn-posts-section service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::home-learn-posts-section.home-learn-posts-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"kind": "singleType",
"collectionName": "home_start_earning_sections",
"info": {
"singularName": "home-start-earning-section",
"pluralName": "home-start-earning-sections",
"displayName": "HomeStartEarningSection",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"title": {
"type": "string",
"required": true
},
"subtitle": {
"type": "string"
},
"cta": {
"type": "component",
"repeatable": true,
"component": "content.section"
},
"cards": {
"type": "component",
"repeatable": true,
"component": "content.link-card"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* home-start-earning-section controller
*/

import { factories } from '@strapi/strapi'

export default factories.createCoreController('api::home-start-earning-section.home-start-earning-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* home-start-earning-section router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::home-start-earning-section.home-start-earning-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* home-start-earning-section service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::home-start-earning-section.home-start-earning-section');
33 changes: 33 additions & 0 deletions cms-backend/src/components/content/link-card.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"collectionName": "components_content_link_cards",
"info": {
"displayName": "LinkCard",
"description": ""
},
"options": {},
"attributes": {
"icon": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [
"images",
"files",
"videos",
"audios"
]
},
"title": {
"type": "string",
"required": true
},
"subtitle": {
"type": "string"
},
"link": {
"type": "component",
"repeatable": false,
"component": "content.button-link"
}
}
}
20 changes: 20 additions & 0 deletions cms-backend/src/components/home/introduction.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"collectionName": "components_home_introductions",
"info": {
"displayName": "introduction"
},
"options": {},
"attributes": {
"heading_text": {
"type": "string"
},
"link": {
"type": "component",
"repeatable": false,
"component": "content.button-link"
},
"closing_text": {
"type": "string"
}
}
}
Loading