add sections

This commit is contained in:
Zotov Ivan Yuryevich
2026-04-08 23:23:52 +03:00
parent 1197af4fb7
commit 72c9248b81
19 changed files with 2616 additions and 312 deletions

2410
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -16,8 +16,9 @@
}, },
"dependencies": { "dependencies": {
"@strapi/plugin-cloud": "5.41.1", "@strapi/plugin-cloud": "5.41.1",
"@strapi/plugin-graphql": "^5.41.1",
"@strapi/plugin-users-permissions": "5.41.1", "@strapi/plugin-users-permissions": "5.41.1",
"@strapi/strapi": "5.41.1", "@strapi/strapi": "^5.42.0",
"better-sqlite3": "12.8.0", "better-sqlite3": "12.8.0",
"react": "^18.0.0", "react": "^18.0.0",
"react-dom": "^18.0.0", "react-dom": "^18.0.0",

View File

@@ -21,7 +21,7 @@
"description": { "description": {
"type": "text" "type": "text"
}, },
"comment": { "badge": {
"type": "string" "type": "string"
}, },
"group": { "group": {

View File

@@ -14,7 +14,11 @@
"sections": { "sections": {
"type": "dynamiczone", "type": "dynamiczone",
"components": [ "components": [
"sections.home-hero" "sections.home-hero",
"sections.services",
"sections.solutions",
"sections.cases",
"sections.about"
] ]
} }
} }

View File

@@ -21,16 +21,16 @@
"description": { "description": {
"type": "text" "type": "text"
}, },
"products": {
"type": "component",
"component": "shared.product",
"repeatable": true
},
"categories": { "categories": {
"type": "relation", "type": "relation",
"relation": "manyToMany", "relation": "manyToMany",
"target": "api::category.category", "target": "api::category.category",
"mappedBy": "vendors" "mappedBy": "vendors"
},
"products": {
"type": "component",
"component": "shared.string",
"repeatable": true
} }
} }
} }

View File

@@ -0,0 +1,26 @@
{
"collectionName": "components_cards_advantages",
"info": {
"displayName": "Advantage"
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"description": {
"type": "text"
},
"icon": {
"type": "component",
"component": "shared.icon",
"repeatable": false
},
"color": {
"type": "component",
"component": "shared.color",
"repeatable": false
}
},
"config": {}
}

View File

@@ -0,0 +1,35 @@
{
"collectionName": "components_cards_cases",
"info": {
"displayName": "Case"
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"description": {
"type": "text"
},
"pretitle": {
"type": "string"
},
"badge": {
"type": "string"
},
"footnote": {
"type": "string"
},
"color": {
"type": "component",
"component": "shared.color",
"repeatable": false
},
"icon": {
"type": "component",
"component": "shared.icon",
"repeatable": false
}
},
"config": {}
}

View File

@@ -0,0 +1,31 @@
{
"collectionName": "components_cards_services",
"info": {
"displayName": "Service"
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"description": {
"type": "text"
},
"icon": {
"type": "component",
"component": "shared.icon",
"repeatable": false
},
"color": {
"type": "component",
"component": "shared.color",
"repeatable": false
},
"category": {
"type": "relation",
"relation": "oneToOne",
"target": "api::category.category"
}
},
"config": {}
}

View File

@@ -0,0 +1,29 @@
{
"collectionName": "components_cards_solutions",
"info": {
"displayName": "Solution"
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"description": {
"type": "text"
},
"footnote": {
"type": "string"
},
"icon": {
"type": "component",
"component": "shared.icon",
"repeatable": false
},
"category": {
"type": "relation",
"relation": "oneToOne",
"target": "api::category.category"
}
},
"config": {}
}

View File

@@ -0,0 +1,26 @@
{
"collectionName": "components_sections_abouts",
"info": {
"displayName": "About"
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"description": {
"type": "text"
},
"partners": {
"type": "component",
"component": "shared.string",
"repeatable": true
},
"cards": {
"type": "component",
"component": "cards.advantage",
"repeatable": true
}
},
"config": {}
}

View File

@@ -0,0 +1,21 @@
{
"collectionName": "components_sections_cases",
"info": {
"displayName": "Cases"
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"cards": {
"type": "component",
"component": "cards.case",
"repeatable": true
}
},
"config": {}
}

View File

@@ -0,0 +1,21 @@
{
"collectionName": "components_sections_services",
"info": {
"displayName": "Services"
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"cards": {
"type": "component",
"component": "cards.service",
"repeatable": true
}
},
"config": {}
}

View File

@@ -0,0 +1,21 @@
{
"collectionName": "components_sections_solutions",
"info": {
"displayName": "Solutions"
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"description": {
"type": "text"
},
"cards": {
"type": "component",
"component": "cards.solution",
"repeatable": true
}
},
"config": {}
}

View File

@@ -0,0 +1,22 @@
{
"collectionName": "components_shared_colors",
"info": {
"displayName": "Color"
},
"options": {},
"attributes": {
"value": {
"type": "enumeration",
"enum": [
"blue",
"violet",
"emerald",
"orange",
"pink",
"indigo",
"cyan"
]
}
},
"config": {}
}

View File

@@ -0,0 +1,27 @@
{
"collectionName": "components_shared_contacts",
"info": {
"displayName": "Contact"
},
"options": {},
"attributes": {
"type": {
"type": "enumeration",
"required": true,
"enum": [
"phone",
"working-hours",
"email",
"address"
]
},
"value": {
"type": "string",
"required": true
},
"displayValue": {
"type": "string"
}
},
"config": {}
}

View File

@@ -0,0 +1,33 @@
{
"collectionName": "components_shared_icons",
"info": {
"displayName": "Icon"
},
"options": {},
"attributes": {
"value": {
"type": "enumeration",
"enum": [
"cloud",
"shield",
"cpu",
"database",
"server",
"settings",
"building",
"shopping-cart",
"factory",
"heart",
"graduation-cap",
"landmark",
"rocket",
"zap",
"award",
"users",
"check-circle",
"package"
]
}
},
"config": {}
}

View File

@@ -1,11 +1,11 @@
{ {
"collectionName": "components_shared_products", "collectionName": "components_shared_strings",
"info": { "info": {
"displayName": "Product" "displayName": "String"
}, },
"options": {}, "options": {},
"attributes": { "attributes": {
"title": { "value": {
"type": "string", "type": "string",
"required": true "required": true
} }

View File

@@ -1,5 +1,87 @@
import type { Schema, Struct } from '@strapi/strapi'; import type { Schema, Struct } from '@strapi/strapi';
export interface CardsAdvantage extends Struct.ComponentSchema {
collectionName: 'components_cards_advantages';
info: {
displayName: 'Advantage';
};
attributes: {
color: Schema.Attribute.Component<'shared.color', false>;
description: Schema.Attribute.Text;
icon: Schema.Attribute.Component<'shared.icon', false>;
title: Schema.Attribute.String;
};
}
export interface CardsCase extends Struct.ComponentSchema {
collectionName: 'components_cards_cases';
info: {
displayName: 'Case';
};
attributes: {
badge: Schema.Attribute.String;
color: Schema.Attribute.Component<'shared.color', false>;
description: Schema.Attribute.Text;
footnote: Schema.Attribute.String;
icon: Schema.Attribute.Component<'shared.icon', false>;
pretitle: Schema.Attribute.String;
title: Schema.Attribute.String;
};
}
export interface CardsService extends Struct.ComponentSchema {
collectionName: 'components_cards_services';
info: {
displayName: 'Service';
};
attributes: {
category: Schema.Attribute.Relation<'oneToOne', 'api::category.category'>;
color: Schema.Attribute.Component<'shared.color', false>;
description: Schema.Attribute.Text;
icon: Schema.Attribute.Component<'shared.icon', false>;
title: Schema.Attribute.String;
};
}
export interface CardsSolution extends Struct.ComponentSchema {
collectionName: 'components_cards_solutions';
info: {
displayName: 'Solution';
};
attributes: {
category: Schema.Attribute.Relation<'oneToOne', 'api::category.category'>;
description: Schema.Attribute.Text;
footnote: Schema.Attribute.String;
icon: Schema.Attribute.Component<'shared.icon', false>;
title: Schema.Attribute.String;
};
}
export interface SectionsAbout extends Struct.ComponentSchema {
collectionName: 'components_sections_abouts';
info: {
displayName: 'About';
};
attributes: {
cards: Schema.Attribute.Component<'cards.advantage', true>;
description: Schema.Attribute.Text;
partners: Schema.Attribute.Component<'shared.string', true>;
title: Schema.Attribute.String;
};
}
export interface SectionsCases extends Struct.ComponentSchema {
collectionName: 'components_sections_cases';
info: {
displayName: 'Cases';
};
attributes: {
cards: Schema.Attribute.Component<'cards.case', true>;
description: Schema.Attribute.String;
title: Schema.Attribute.String;
};
}
export interface SectionsHomeHero extends Struct.ComponentSchema { export interface SectionsHomeHero extends Struct.ComponentSchema {
collectionName: 'components_sections_home_heroes'; collectionName: 'components_sections_home_heroes';
info: { info: {
@@ -13,6 +95,30 @@ export interface SectionsHomeHero extends Struct.ComponentSchema {
}; };
} }
export interface SectionsServices extends Struct.ComponentSchema {
collectionName: 'components_sections_services';
info: {
displayName: 'Services';
};
attributes: {
cards: Schema.Attribute.Component<'cards.service', true>;
description: Schema.Attribute.String;
title: Schema.Attribute.String;
};
}
export interface SectionsSolutions extends Struct.ComponentSchema {
collectionName: 'components_sections_solutions';
info: {
displayName: 'Solutions';
};
attributes: {
cards: Schema.Attribute.Component<'cards.solution', true>;
description: Schema.Attribute.Text;
title: Schema.Attribute.String;
};
}
export interface SharedAttribute extends Struct.ComponentSchema { export interface SharedAttribute extends Struct.ComponentSchema {
collectionName: 'components_shared_attributes'; collectionName: 'components_shared_attributes';
info: { info: {
@@ -24,22 +130,91 @@ export interface SharedAttribute extends Struct.ComponentSchema {
}; };
} }
export interface SharedProduct extends Struct.ComponentSchema { export interface SharedColor extends Struct.ComponentSchema {
collectionName: 'components_shared_products'; collectionName: 'components_shared_colors';
info: { info: {
displayName: 'Product'; displayName: 'Color';
}; };
attributes: { attributes: {
title: Schema.Attribute.String & Schema.Attribute.Required; value: Schema.Attribute.Enumeration<
['blue', 'violet', 'emerald', 'orange', 'pink', 'indigo', 'cyan']
>;
};
}
export interface SharedContact extends Struct.ComponentSchema {
collectionName: 'components_shared_contacts';
info: {
displayName: 'Contact';
};
attributes: {
displayValue: Schema.Attribute.String;
type: Schema.Attribute.Enumeration<
['phone', 'working-hours', 'email', 'address']
> &
Schema.Attribute.Required;
value: Schema.Attribute.String & Schema.Attribute.Required;
};
}
export interface SharedIcon extends Struct.ComponentSchema {
collectionName: 'components_shared_icons';
info: {
displayName: 'Icon';
};
attributes: {
value: Schema.Attribute.Enumeration<
[
'cloud',
'shield',
'cpu',
'database',
'server',
'settings',
'building',
'shopping-cart',
'factory',
'heart',
'graduation-cap',
'landmark',
'rocket',
'zap',
'award',
'users',
'check-circle',
'package',
]
>;
};
}
export interface SharedString extends Struct.ComponentSchema {
collectionName: 'components_shared_strings';
info: {
displayName: 'String';
};
attributes: {
value: Schema.Attribute.String & Schema.Attribute.Required;
}; };
} }
declare module '@strapi/strapi' { declare module '@strapi/strapi' {
export module Public { export module Public {
export interface ComponentSchemas { export interface ComponentSchemas {
'cards.advantage': CardsAdvantage;
'cards.case': CardsCase;
'cards.service': CardsService;
'cards.solution': CardsSolution;
'sections.about': SectionsAbout;
'sections.cases': SectionsCases;
'sections.home-hero': SectionsHomeHero; 'sections.home-hero': SectionsHomeHero;
'sections.services': SectionsServices;
'sections.solutions': SectionsSolutions;
'shared.attribute': SharedAttribute; 'shared.attribute': SharedAttribute;
'shared.product': SharedProduct; 'shared.color': SharedColor;
'shared.contact': SharedContact;
'shared.icon': SharedIcon;
'shared.string': SharedString;
} }
} }
} }

View File

@@ -441,7 +441,7 @@ export interface ApiCategoryCategory extends Struct.CollectionTypeSchema {
draftAndPublish: true; draftAndPublish: true;
}; };
attributes: { attributes: {
comment: Schema.Attribute.String; badge: Schema.Attribute.String;
createdAt: Schema.Attribute.DateTime; createdAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private; Schema.Attribute.Private;
@@ -488,7 +488,15 @@ export interface ApiHomePageHomePage extends Struct.SingleTypeSchema {
> & > &
Schema.Attribute.Private; Schema.Attribute.Private;
publishedAt: Schema.Attribute.DateTime; publishedAt: Schema.Attribute.DateTime;
sections: Schema.Attribute.DynamicZone<['sections.home-hero']>; sections: Schema.Attribute.DynamicZone<
[
'sections.home-hero',
'sections.services',
'sections.solutions',
'sections.cases',
'sections.about',
]
>;
updatedAt: Schema.Attribute.DateTime; updatedAt: Schema.Attribute.DateTime;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private; Schema.Attribute.Private;
@@ -549,7 +557,7 @@ export interface ApiVendorVendor extends Struct.CollectionTypeSchema {
'api::vendor.vendor' 'api::vendor.vendor'
> & > &
Schema.Attribute.Private; Schema.Attribute.Private;
products: Schema.Attribute.Component<'shared.product', true>; products: Schema.Attribute.Component<'shared.string', true>;
publishedAt: Schema.Attribute.DateTime; publishedAt: Schema.Attribute.DateTime;
slug: Schema.Attribute.UID & Schema.Attribute.Required; slug: Schema.Attribute.UID & Schema.Attribute.Required;
title: Schema.Attribute.String; title: Schema.Attribute.String;