feat: create footer vibentec design and common component text

This commit is contained in:
Nam Doan 2025-12-02 10:59:28 +07:00
parent 154d52732d
commit efe48a200f
4 changed files with 42 additions and 5 deletions

View File

@ -263,7 +263,7 @@
{
"Section": {
"config": {
"className": "flex mt-[2rem]"
"className": "flex items-start mt-[2rem]"
},
"children": [
{
@ -314,7 +314,7 @@
{
"Section": {
"config": {
"className": "flex flex-col gap-[16px]"
"className": "flex flex-col gap-[6px]"
},
"children": [
{
@ -322,7 +322,7 @@
"config": {
"label": "Social Media",
"href": "/",
"className": "text-[24px] leading-[125%] text-[#11314E] flex mr-8 gap-1 hover:underline font-bold w-[200px] pl-[2rem] mt-[-15px] mb-[-16px]"
"className": "text-[24px] leading-[125%] text-[#11314E] flex mr-8 mb-[2px] gap-1 hover:underline font-bold w-[200px] pl-[2rem]"
}
}
},
@ -415,7 +415,7 @@
"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"
"className": "text-[13px] leading-[160%] text-[#11314E] flex items-center mr-8 gap-1 w-full pl-[2rem] hover:no-underline"
}
}
}
@ -424,6 +424,23 @@
}
]
}
},
{
"Section": {
"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"
},
"children": [
{
"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]"
}
}
}
]
}
}
]
}

View File

@ -23,7 +23,7 @@ export default async function VtFooter({
const props = nodes?.config ?? {}
return (
<footer className="relative mx-auto border-b duration-200 bg-white border-ui-border-base border-t-2">
<footer className="relative mx-auto duration-200 bg-white border-ui-border-base border-t-2">
{props.children && <DynamicLayoutRenderer nodes={props.children} context={context} />}
</footer>
)

View File

@ -0,0 +1,18 @@
import { LayoutComponentDefinition } from "@vibentec/component-map"
import { LayoutContext } from "@vibentec/component-map"
export default function VtText({
nodes,
context,
}: {
nodes: LayoutComponentDefinition
context: LayoutContext
}) {
const props = nodes.config || {}
return (
<span className={props?.className ?? ""}>
{props?.label && <span>{props.label}</span>}
</span>
)
}

View File

@ -17,6 +17,7 @@ import VtDropdown from "@modules/layout/templates/vt-dropdown"
import VtButton from "@modules/layout/templates/vt-button"
import VtSearchInput from "@modules/layout/templates/vt-search-input"
import VtSection from "@modules/layout/templates/vt-section"
import VtText from "@modules/layout/templates/vt-text"
type ComponentConfig = Record<string, any>;
@ -64,6 +65,7 @@ export const componentMap: Record<string, ComponentRenderer> = {
VtCartButton: nodesContextRenderer(VtCartButton),
Link: nodesContextRenderer(VtLink),
Image: nodesContextRenderer(VtImage),
Text: nodesContextRenderer(VtText),
Dropdown: nodesContextRenderer(VtDropdown),
CartMismatchBanner: configOnly(CartMismatchBanner),
FreeShippingPriceNudge: configOnly(FreeShippingPriceNudge),