-
Notifications
You must be signed in to change notification settings - Fork 0
Feat(cms)/add home types #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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": { | ||
| "type": "media", | ||
| "multiple": false, | ||
| "required": true, | ||
| "allowedTypes": [ | ||
| "images", | ||
| "files", | ||
| "videos", | ||
| "audios" | ||
| ] | ||
|
Comment on lines
+31
to
+36
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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'); |
| 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" | ||
| } | ||
| } | ||
| } |
| 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" | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
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