refactor: update config json file

This commit is contained in:
Nam Doan 2025-12-08 11:40:28 +07:00
parent f869d12c7a
commit dbe12845b0
4 changed files with 197 additions and 236 deletions

View File

@ -45,7 +45,7 @@
"config": { "config": {
"label": "Mehr Info", "label": "Mehr Info",
"href": "/", "href": "/",
"className": "text-[13px] flex items-center bg-[#112638] gap-1 " "className": "text-[13px] w-fit text-white px-3 flex items-center bg-[#112638] gap-1 "
} }
} }
} }
@ -70,20 +70,12 @@
} }
}, },
{ {
"Dropdown": { "VtCountryCodeSelect": {
"config": { "config": {
"trigger": { "trigger": {
"text": "DE", "className": "w-auto font-bold text-[13px] text-[#11314E] flex justify-start items-center gap-1 hover:text-[#009b93] bg-transparent shadow-none hover:bg-transparent",
"className": "font-bold text-[13px] text-[#11314E] flex items-center gap-1 hover:text-[#009b93]", "isFlag": false
"isShowArrow": true }
},
"items": [
{
"icon": "https://upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Flag_of_Germany.svg/1200px-Flag_of_Germany.svg.png",
"text": "DE",
"href": "/"
}
]
} }
} }
} }
@ -154,10 +146,10 @@
} }
}, },
{ {
"Button": { "AccountButton": {
"config": { "config": {
"icon": "User", "icon": "User",
"className": " flex items-center gap-1 shadow-none w-[50px]" "className": " flex items-center gap-1 shadow-none"
} }
} }
}, },
@ -172,7 +164,7 @@
{ {
"VtCartButton": { "VtCartButton": {
"config": { "config": {
"variant": "shoppingBagbutton", "icon": "ShoppingCart",
"className": "shadow-none bg-transparent text-black w-[50px]" "className": "shadow-none bg-transparent text-black w-[50px]"
} }
} }
@ -204,241 +196,189 @@
{ {
"Footer": { "Footer": {
"config": { "config": {
"children": [ "className": "content-container flex w-full border justify-between pb-8",
"leftClassName": "flex-col ml-6",
"centerClassName": "flex mt-[130px] gap-24",
"rightClassName": "flex mt-[160px]",
"left": [
{ {
"Image": { "Image": {
"config": { "config": {
"src": "/VibentecIT-logo.svg", "src": "/VibentecIT-logo.svg",
"alt": "MyShop", "alt": "MyShop",
"className": "h-[128px] w-[324px] ml-[3rem]", "className": "h-[100px] w-[320px]",
"objectFit": "contain" "objectFit": "contain"
} }
} }
}, },
{ {
"Section": { "VtMenuItem": {
"config": { "config": {
"className": "flex items-start px-[3rem] justify-between" "title": "Der Wegbereiter für innovative IT-Lösungen",
}, "className": "flex flex-col gap-y-2 ml-10 w-[320px] text-[24px] font-semibold text-[#11314E]",
"children": [ "itemClassName": "text-ui-fg-subtle txt-small",
{ "items": [
"Section": { {
"config": { "text": "Tauchen Sie ein in eine Welt modernster Technologien, zuverlässiger Support und proaktiver Innovation gemeinsam gestalten wir die digitale Zukunft Ihres Unternehmens.",
"className": "flex flex-col" "href": "/"
},
"children": [
{
"Link": {
"config": {
"label": "Der Wegbereiter für innovative IT-Lösungen",
"href": "/",
"className": "text-[24px] leading-[125%] text-[#11314E] flex mr-8 gap-1 hover:underline font-bold w-[336px] pl-[2rem] mb-[22px]"
}
}
},
{
"Link": {
"config": {
"label": "Tauchen Sie ein in eine Welt modernster Technologien, zuverlässiger Support und proaktiver Innovation gemeinsam gestalten wir die digitale Zukunft Ihres Unternehmens.",
"href": "/",
"className": "text-[13px] leading-[160%] text-[#11314E] flex items-center mr-8 gap-1 w-[336px] pl-[2rem] hover:no-underline"
}
}
},
{
"Button": {
"config": {
"label": "Kontaktieren Sie Uns",
"labelClassName": "order-[1]",
"iconClassName": "order-[2]",
"icon": "ChevronRight",
"className": "mt-[24px] flex items-center w-fit hover:bg-black gap-1 shadow-none p-[1rem] bg-[#18181B] text-white ml-[2rem]"
}
}
}
]
} }
}, ]
{ }
"Section": {
"config": {
"className": "flex items-start mt-[2rem]"
},
"children": [
{
"Section": {
"config": {
"className": "flex flex-col"
},
"children": [
{
"Link": {
"config": {
"label": "Unternehmen",
"href": "/",
"className": "text-[24px] leading-[125%] text-[#11314E] flex mr-8 gap-1 hover:underline font-bold w-[200px] pl-[2rem] mb-[16px]"
}
}
},
{
"Link": {
"config": {
"label": "Über Uns",
"href": "/",
"className": "text-[13px] leading-[160%] text-[#11314E] flex items-center mr-8 gap-1 w-[200px] pl-[2rem] hover:no-underline"
}
}
},
{
"Link": {
"config": {
"label": "Placeholder",
"href": "/",
"className": "text-[13px] leading-[160%] text-[#11314E] flex items-center mr-8 gap-1 w-[200px] pl-[2rem] hover:no-underline"
}
}
},
{
"Link": {
"config": {
"label": "Placeholder",
"href": "/",
"className": "text-[13px] leading-[160%] text-[#11314E] flex items-center mr-8 gap-1 w-[200px] pl-[2rem] hover:no-underline"
}
}
}
]
}
},
{
"Section": {
"config": {
"className": "flex flex-col gap-[6px]"
},
"children": [
{
"Link": {
"config": {
"label": "Social Media",
"href": "/",
"className": "text-[24px] leading-[125%] text-[#11314E] flex mr-8 mb-[2px] gap-1 hover:underline font-bold w-[200px] pl-[2rem]"
}
}
},
{
"Button": {
"config": {
"label": "Über Uns",
"icon": "Twitter",
"className": "text-[13px] leading-[160%] text-[#11314E] flex justify-start font-semibold mr-8 gap-1 shadow-none w-[200px] pl-[2rem] hover:bg-transparent"
}
}
},
{
"Button": {
"config": {
"label": "Über Uns",
"icon": "Twitter",
"className": "text-[13px] leading-[160%] text-[#11314E] flex justify-start font-semibold mr-8 gap-1 shadow-none w-[200px] pl-[2rem] hover:bg-transparent"
}
}
},
{
"Button": {
"config": {
"label": "Über Uns",
"icon": "Twitter",
"className": "text-[13px] leading-[160%] text-[#11314E] flex justify-start font-semibold mr-8 gap-1 shadow-none w-[200px] pl-[2rem] hover:bg-transparent"
}
}
}
]
}
},
{
"Section": {
"config": {
"className": "flex flex-col"
},
"children": [
{
"Link": {
"config": {
"label": "Addresse",
"href": "/",
"className": "text-[24px] leading-[125%] text-[#11314E] flex mr-8 gap-1 hover:underline font-bold w-[200px] pl-[2rem] mb-[16px]"
}
}
},
{
"Link": {
"config": {
"label": "Über Uns",
"href": "/",
"className": "text-[13px] leading-[160%] text-[#11314E] flex items-center mr-8 gap-1 w-[200px] pl-[2rem] hover:no-underline"
}
}
},
{
"Link": {
"config": {
"label": "Social Media",
"href": "/",
"className": "text-[13px] leading-[160%] text-[#11314E] flex items-center mr-8 gap-1 w-[200px] pl-[2rem] hover:no-underline"
}
}
},
{
"Link": {
"config": {
"label": "Über Uns",
"href": "/",
"className": "text-[13px] leading-[160%] text-[#11314E] flex items-center mr-8 gap-1 w-[200px] pl-[2rem] hover:no-underline"
}
}
}
]
}
}
]
}
},
{
"Section": {
"config": {
"className": "flex flex-col mt-[5rem]"
},
"children": [
{
"Link": {
"config": {
"label": "Tauchen Sie ein in eine Welt modernster Technologien, zuverlässiger Support und proaktiver Innovation gemeinsam gestalten wir die digitale Zukunft Ihres Unternehmens.",
"href": "/",
"className": "text-[13px] leading-[160%] text-[#11314E] flex items-center mr-8 gap-1 w-full pl-[2rem] hover:no-underline"
}
}
}
]
}
}
]
} }
}, },
{ {
"Section": { "Button": {
"config": { "config": {
"className": "relative flex px-[3rem] justify-between mt-[29px] pt-[8px] after:content-[''] after:absolute after:left-[4.8rem] after:right-[3rem] after:top-0 after:h-[1px] after:bg-[#285A86] mb-10" "label": "Kontaktieren Sie uns",
}, "className": "bg-black text-white items-center flex gap-2 ml-10 px-4 mt-[24px] py-5 rounded-md w-fit text-[14px]",
"children": [ "icon": "ChevronRightMini",
{ "iconClassName": "order-1"
"Text": { }
"config": { }
"label": "©2025 Vibentec IT. All rights reserved", }
"className": "text-[13px] leading-[160%] text-[#11314E] flex items-center mr-8 gap-1 w-full pl-[2rem]" ],
} "center": [
{
"VtMenuItem": {
"config": {
"title": "Unternehmen",
"className": "flex flex-col gap-y-2 text-[24px] font-semibold text-[#11314E]",
"itemClassName": "text-[1rem] font-[400]",
"items": [
{
"text": "Über Uns",
"href": "/"
},
{
"text": "Placeholder",
"href": "/categories/shoes"
},
{
"text": "Placeholder",
"href": "/categories/accessories"
} }
} ]
] }
}
},
{
"VtMenuItem": {
"config": {
"title": "Social Media",
"className": "flex flex-col gap-y-2 text-[24px] font-semibold text-[#11314E]",
"itemClassName": "text-[1rem] font-[400] flex items-center",
"items": [
{
"text": "Twitter",
"href": "/",
"icon": "X"
},
{
"text": "Facebook",
"href": "/categories/shoes",
"icon": "X"
},
{
"text": "Pinterest",
"href": "/categories/accessories",
"icon": "X"
}
]
}
}
},
{
"VtMenuItem": {
"config": {
"title": "Addresse",
"className": "flex flex-col gap-y-2 text-[24px] font-semibold text-[#11314E]",
"itemClassName": "text-[1rem] font-[400] w-[150px]",
"items": [
{
"text": "Hopfenstr. 10c76185 Karlsruhe Deutschland",
"href": "/"
},
{
"text": "+497271 5970098",
"href": "/categories/shoes"
},
{
"text": "info@vibentec-it.io",
"href": "/categories/accessories"
}
]
}
}
}
],
"right": [
{
"VtMenuItem": {
"config": {
"className": "flex flex-col gap-y-2 text-[24px] font-semibold text-[#11314E]",
"itemClassName": "text-[1rem] font-[400] w-[150px]",
"items": [
{
"text": "Datenschutz",
"href": "/"
},
{
"text": "Impressum",
"href": "/categories/shoes"
},
{
"text": "Installation Info",
"href": "/categories/accessories"
}
]
}
}
}
]
}
}
},
{
"Footer": {
"config": {
"className": "content-container h-[128px] w-full text text-[#11314E] flex items-center justify-between px-20 mt-2",
"left": [
{
"Text": {
"config": {
"label": "©2025 Vibentec IT. All rights reserved",
"className": "text-[14px] font-[400] pt-2"
}
}
}
],
"center": [],
"right": [
{
"Button": {
"config": {
"href": "/",
"icon": "Mastercard",
"className": "shadow-none"
}
}
},
{
"Button": {
"config": {
"href": "/",
"icon": "PayPal",
"className": "shadow-none"
}
}
},
{
"Button": {
"config": {
"href": "/",
"icon": "Visa",
"className": "shadow-none"
}
} }
} }
] ]

View File

@ -24,7 +24,21 @@ export default async function VtFooter({
return ( return (
<footer className={props?.className ?? ""}> <footer className={props?.className ?? ""}>
{props.children && <DynamicLayoutRenderer nodes={props.children} context={context} />} <div className={clx("flex gap-x-4 h-full", props?.leftClassName)}>
{props.left && (
<DynamicLayoutRenderer nodes={props.left} context={context} />
)}
</div>
<div className={clx("flex gap-x-4 h-full", props?.centerClassName)}>
{props.center && (
<DynamicLayoutRenderer nodes={props.center} context={context} />
)}
</div>
<div className={clx("flex gap-x-4 h-full", props?.rightClassName)}>
{props.right && (
<DynamicLayoutRenderer nodes={props.right} context={context} />
)}
</div>
</footer> </footer>
) )
} }

View File

@ -19,6 +19,9 @@ import VtSearchInput from "@modules/layout/templates/vt-search-input"
import VtSection from "@modules/layout/templates/vt-section" import VtSection from "@modules/layout/templates/vt-section"
import VtText from "@modules/layout/templates/vt-text" import VtText from "@modules/layout/templates/vt-text"
import VtInput from "@modules/layout/templates/vt-input" import VtInput from "@modules/layout/templates/vt-input"
import VtCurrencySelect from "@modules/layout/templates/vt-currency-select"
import VtMenuItem from "@modules/layout/templates/vt-menu-item"
import VtCountryCodeSelect from "@modules/layout/templates/vt-country-select/server"
type ComponentConfig = Record<string, any>; type ComponentConfig = Record<string, any>;
@ -64,11 +67,14 @@ export const componentMap: Record<string, ComponentRenderer> = {
Section: nodesContextRenderer(VtSection), Section: nodesContextRenderer(VtSection),
SearchInput: nodesContextRenderer(VtSearchInput), SearchInput: nodesContextRenderer(VtSearchInput),
VtCartButton: nodesContextRenderer(VtCartButton), VtCartButton: nodesContextRenderer(VtCartButton),
VtCurrencySelect: nodesContextRenderer(VtCurrencySelect),
VtCountryCodeSelect: nodesContextRenderer(VtCountryCodeSelect),
Link: nodesContextRenderer(VtLink), Link: nodesContextRenderer(VtLink),
Input: nodesContextRenderer(VtInput), Input: nodesContextRenderer(VtInput),
Image: nodesContextRenderer(VtImage), Image: nodesContextRenderer(VtImage),
Text: nodesContextRenderer(VtText), Text: nodesContextRenderer(VtText),
Dropdown: nodesContextRenderer(VtDropdown), Dropdown: nodesContextRenderer(VtDropdown),
VtMenuItem: nodesContextRenderer(VtMenuItem),
CartMismatchBanner: configOnly(CartMismatchBanner), CartMismatchBanner: configOnly(CartMismatchBanner),
FreeShippingPriceNudge: configOnly(FreeShippingPriceNudge), FreeShippingPriceNudge: configOnly(FreeShippingPriceNudge),
PropsChildren: { PropsChildren: {

View File

@ -3,5 +3,6 @@ export const jsonFileNames = {
stePlayGround: "ste.playground.design.json", stePlayGround: "ste.playground.design.json",
nam3Bear: "nam.3bear.design.json", nam3Bear: "nam.3bear.design.json",
namDrsquatch: "nam.drsquatch.design.json", namDrsquatch: "nam.drsquatch.design.json",
namVibentec: "nam.vibentec.design.json" namVibentec: "nam.vibentec.design.json",
namStarter: "nam.mds-starter-design.json",
}; };