From fbb13ae819e2196eda1ad42a3027a50c222b1b22 Mon Sep 17 00:00:00 2001 From: Nam Doan Date: Thu, 11 Dec 2025 12:59:00 +0700 Subject: [PATCH] refactor: add some component in footer and implement function for component --- config/nam.3bear.design.json | 114 ++-- config/nam.drsquatch.design.json | 623 +++++------------- .../layout/templates/vt-footer/index.tsx | 6 +- .../vt-footer/vt-footer-bottom/index.tsx | 59 +- .../vt-footer/vt-footer-hero/index.tsx | 126 +++- .../vt-footer/vt-footer-signup/index.tsx | 114 ++++ src/vibentec/component-map.tsx | 3 +- 7 files changed, 486 insertions(+), 559 deletions(-) create mode 100644 src/modules/layout/templates/vt-footer/vt-footer-signup/index.tsx diff --git a/config/nam.3bear.design.json b/config/nam.3bear.design.json index fdecf43..e9c9da9 100644 --- a/config/nam.3bear.design.json +++ b/config/nam.3bear.design.json @@ -47,7 +47,7 @@ "className": "h-24 bg-white text-[#003F31] gap-12", "left": [ { - "Image": { + "Logo": { "config": { "src": "/3bear-logo.png", "alt": "MyShop", @@ -197,80 +197,33 @@ { "Footer": { "config": { - "className": "content-container flex w-full bg-[#003f31] text-white border justify-between pb-8 pt-14", + "className": "content-container border-none flex w-full bg-[#003f31] text-white border justify-between pb-8 pt-14", "leftClassName": "flex-col ml-3", "centerClassName": "", - "rightClassName": "flex gap-[12rem] mr-[100px]", + "rightClassName": "flex gap-[10rem] mr-[80px]", "left": [ { - "Image": { + "VtFooterHero": { "config": { - "src": "/3bear-white-logo.avif", - "alt": "MyShop", - "className": "h-full w-[150px] ml-10 pb-6", - "objectFit": "contain" - } - } - }, - { - "Text": { - "config": { - "label": "Melde dich für unsere Oatnews an 💛", - "className": "flex flex-col gap-y-2 ml-10 w-full text-[24px] font-semibold text-white" - } - } - }, - { - "Input": { - "config": { - "placeholder": "E-mail", - "className": "w-[350px] mt-6 border border-gray-200 bg-transparent rounded-md h-[48px] px-[16px] text-[16px] leading-[125%] text-white flex font-bold ml-10" - } - } - }, - { - "VtSocialLinks": { - "config": { - "className": "flex items-center gap-1 ml-6 mt-8" - }, - "children": [ - { - "Button": { - "config": { - "icon": "Twitter", - "iconClassName": "text-white", - "className": "w-[48px] h-[48px] shadow-none hover:bg-transparent bg-transparent text-white rounded-md flex items-center justify-center" - } - } + "logoClassName": "h-[100px] w-[200px]", + "logoSrc": "/3bear-white-logo.avif", + "logoAlt": "3Bear", + "title": "Melde dich für unsere Oatnews an 💛", + "email": { + "emailInputClassName": "w-[300px] ml-8" }, - { - "Button": { - "config": { - "icon": "Twitter", - "iconClassName": "text-white", - "className": "w-[48px] h-[48px] shadow-none hover:bg-transparent bg-transparent text-white rounded-md flex items-center justify-center" - } - } - }, - { - "Button": { - "config": { - "icon": "Twitter", - "iconClassName": "text-white", - "className": "w-[48px] h-[48px] shadow-none hover:bg-transparent bg-transparent text-white rounded-md flex items-center justify-center" - } - } - }, - { - "Button": { - "config": { - "icon": "Twitter", - "iconClassName": "text-white", - "className": "w-[48px] h-[48px] shadow-none hover:bg-transparent bg-transparent text-white rounded-md flex items-center justify-center" - } - } - } - ] + "socials": [ + { "icon": "Twitter", "href": "/", "className": "w-5 h-5 text-white" }, + { "icon": "Twitter", "href": "/", "className": "w-5 h-5 text-white" }, + { "icon": "Twitter", "href": "/", "className": "w-5 h-5 text-white" }, + { "icon": "Twitter", "href": "/", "className": "w-5 h-5 text-white" } + ], + "socialsClassName": "ml-8 mt-10", + "className": "", + "ctaClassName": "ml-8", + "titleClassName": "ml-8 text-white w-full", + "descriptionClassName": "ml-8" + } } } ], @@ -341,7 +294,7 @@ "text": "B2B", "href": "/categories/accessories" }, - { + { "text": "Presse", "href": "/categories/accessories" } @@ -352,5 +305,26 @@ ] } } + }, + { + "Footer": { + "config": { + "className": "content-container bg-[#003f31] w-full text text-[#11314E] flex items-center justify-between", + "leftClassName": "w-full", + "left": [ + ], + "center": [], + "right": [ + { + "VtFooterBottom": { + "config": { + "className": " mr-[80px]", + "icons": ["Mastercard", "PayPal", "Visa", "Mastercard","Mastercard","Mastercard","Mastercard"] + } + } + } + ] + } + } } ] diff --git a/config/nam.drsquatch.design.json b/config/nam.drsquatch.design.json index de83c7e..bcc4e8f 100644 --- a/config/nam.drsquatch.design.json +++ b/config/nam.drsquatch.design.json @@ -48,11 +48,11 @@ "className": "h-24 bg-[#1f3521] text-white gap-12", "left": [ { - "Image": { + "Logo": { "config": { "src": "/drsquatch-logo.webp", "alt": "MyShop", - "className": "h-full w-[180px] mr-24", + "className": "h-auto w-40 mr-24", "objectFit": "contain" } } @@ -98,31 +98,12 @@ ], "right": [ { - "Dropdown": { + "VtCountryCodeSelect": { "config": { "trigger": { - "icon": "https://upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Flag_of_Germany.svg/1200px-Flag_of_Germany.svg.png", - "text": "DE", - "className": "font-bold text-[1rem] text-white flex items-center gap-1 hover:text-[#009b93]", - "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": "/" - }, - { - "icon": "https://cdn.shopify.com/s/files/1/0275/7784/3817/files/EU_Flag.svg?v=1652208424", - "text": "EU", - "href": "/" - }, - { - "icon": "https://cdn.shopify.com/s/files/1/0275/7784/3817/files/Australia_Flag.svg?v=1657674627", - "text": "AU", - "href": "/" - } - ] + "className": "w-auto font-bold text-[13px] text-white flex justify-start items-center gap-1 hover:text-[#009b93] bg-transparent shadow-none hover:bg-transparent", + "isFlag": true + } } } }, @@ -137,8 +118,8 @@ { "VtCartButton": { "config": { - "variant": "cartIconButton", - "className": "shadow-none bg-transparent text-white" + "icon": "ShoppingCart", + "className": "shadow-none bg-transparent text-black w-[50px]" } } } @@ -169,445 +150,163 @@ { "Footer": { "config": { - "className": "content-container flex w-full bg-[#1f3521]", - "children": [ + "className": "content-container border-none bg-[#1f3621] flex w-full border justify-between pb-8 gap-10 pt-16 px-[120px]", + "leftClassName": "flex ml-6 gap-x-24", + "centerClassName": "flex", + "rightClassName": "flex", + "left": [ { - "Section": { + "VtMenuItem": { "config": { - "className": "grid grid-cols-2 w-full py-[40px]" - }, - "children": [ - { - "Section": { - "config": { - "className": "flex mr-8 gap-1 w-full gap-6" - }, - "children": [ - { - "Section": { - "config": { - "className": "flex mr-8 gap-1 w-full flex-col gap-6" - }, - "children": [ - { - "Link": { - "config": { - "label": "Help", - "href": "/", - "className": "text-[16px] leading-[125%] text-white flex hover:text-white font-bold" - } - } - }, - { - "Link": { - "config": { - "label": "FAQ", - "href": "/", - "className": "text-[14px] leading-[160%] text-white flex mr-8 gap-1 hover:bg-transparent hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Track My Order", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Store policies", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Contact us", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Placeholder", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Placeholder", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Placeholder", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Placeholder", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - } - ] - } - }, - { - "Section": { - "config": { - "className": "flex mr-8 gap-1 w-full flex-col gap-6" - }, - "children": [ - { - "Link": { - "config": { - "label": "Shop", - "href": "/", - "className": "text-[16px] leading-[125%] text-white flex hover:text-white font-bold" - } - } - }, - { - "Link": { - "config": { - "label": "FAQ", - "href": "/", - "className": "text-[14px] leading-[160%] text-white flex mr-8 gap-1 hover:bg-transparent hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Track My Order", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Store policies", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Contact us", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Placeholder", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Placeholder", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Placeholder", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Placeholder", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - } - ] - } - }, - { - "Section": { - "config": { - "className": "flex mr-8 gap-1 w-full flex-col gap-6" - }, - "children": [ - { - "Link": { - "config": { - "label": "Info", - "href": "/", - "className": "text-[16px] leading-[125%] text-white flex hover:text-white font-bold" - } - } - }, - { - "Link": { - "config": { - "label": "FAQ", - "href": "/", - "className": "text-[14px] leading-[160%] text-white flex mr-8 gap-1 hover:bg-transparent hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Track My Order", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Store policies", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Contact us", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Placeholder", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Placeholder", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Placeholder", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - }, - { - "Link": { - "config": { - "label": "Placeholder", - "href": "/", - "className": "text-[14px] leading-[125%] text-white flex hover:text-white font-extralight" - } - } - } - ] - } - }, - { - "Section": { - "config": { - "className": "flex mr-8 gap-1 w-full flex-col gap-6" - }, - "children": [ - { - "Image": { - "config": { - "src": "/b-corp-logo.webp", - "alt": "B Corp Logo", - "className": "w-[96px] h-[118px]" - } - } - } - ] - } - } - ] + "title": "Help", + "className": "flex flex-col gap-y-2 text-[16px] font-semibold text-white gap-8", + "itemClassName": "text-[14px] font-[400] mt-3", + "items": [ + { + "text": "FAQ", + "href": "/" + }, + { + "text": "Track my order", + "href": "/categories/shoes" + }, + { + "text": "Placeholder", + "href": "/categories/accessories" + }, + { + "text": "Placeholder", + "href": "/categories/accessories" + }, + { + "text": "Placeholder", + "href": "/categories/accessories" + }, + { + "text": "Placeholder", + "href": "/categories/accessories" } - }, - { - "Section": { - "config": { - "className": "flex mr-8 gap-1 w-full flex-col gap-6" - }, - "children": [ - { - "Text": { - "config": { - "label": "Don't miss out on hot deals! Sign up and get up to 30% off.", - "className": "text-[16px] leading-[125%] text-white flex font-bold" - } - } - }, - { - "Section": { - "config": { - "className": "flex w-full flex gap-6" - }, - "children": [ - { - "Input": { - "config": { - "placeholder": "Enter your email address", - "className": "w-[75%] rounded-md h-[48px] px-[16px] text-[16px] leading-[125%] text-white flex font-bold" - } - } - }, - { - "Button": { - "config": { - "label": "Sign up", - "className": "w-[25%] rounded-md bg-[#cc6328] h-[48px] px-[16px] text-[16px] leading-[125%] text-white flex font-bold" - } - } - } - ] - } - }, - { - "Section": { - "config": { - "className": "flex w-full flex" - }, - "children": [ - { - "Button": { - "config": { - "icon": "Twitter", - "className": "text-white flex justify-start gap-1 shadow-none w-[50px] bg-transparent hover:bg-transparent" - } - } - }, - { - "Button": { - "config": { - "icon": "Twitter", - "className": "text-white flex justify-start gap-1 shadow-none w-[50px] bg-transparent hover:bg-transparent" - } - } - }, - { - "Button": { - "config": { - "icon": "Twitter", - "className": "text-white flex justify-start gap-1 shadow-none w-[50px] bg-transparent hover:bg-transparent" - } - } - }, - { - "Button": { - "config": { - "icon": "Twitter", - "className": "text-white flex justify-start gap-1 shadow-none w-[50px] bg-transparent hover:bg-transparent" - } - } - }, - { - "Button": { - "config": { - "icon": "Twitter", - "className": "text-white flex justify-start gap-1 shadow-none w-[50px] bg-transparent hover:bg-transparent" - } - } - } - ] - } - } - ] - } - }, - { - "Section": { - "config": { - "className": "flex justify-center col-span-full w-full gap-1" - }, - "children": [ - { - "Text": { - "config": { - "label": "DR. SQUATCH is a registered trademark of Dr. Squatch, LLC © 2025, Dr. Squatch, LLC All rights reserved.", - "className": "text-[11px] mt-[3rem] leading-[125%] text-white flex" - } - } - }, - { - "Text":{ - "config":{ - "label":"Terms of Use", - "className":"text-[11px] mt-[3rem] leading-[125%] text-orange-500 flex" - } - } - }, - { - "Text":{ - "config":{ - "label":"|", - "className":"text-[11px] mt-[3rem] leading-[125%] text-white flex" - } - } - }, - { - "Text":{ - "config":{ - "label":"Privacy Policy", - "className":"text-[11px] mt-[3rem] leading-[125%] text-orange-500 flex" - } - } - } - ] - } - } - ] + ] + } } + }, + { + "VtMenuItem": { + "config": { + "title": "Shop", + "className": "flex flex-col gap-y-2 text-[16px] font-semibold text-white", + "itemClassName": "text-[14px] font-[400] flex items-center mt-3", + "items": [ + { + "text": "Twitter", + "href": "/" + }, + { + "text": "Facebook", + "href": "/categories/shoes" + }, + { + "text": "Pinterest", + "href": "/categories/accessories" + }, + { + "text": "Placeholder", + "href": "/categories/accessories" + }, + { + "text": "Placeholder", + "href": "/categories/accessories" + }, + { + "text": "Placeholder", + "href": "/categories/accessories" + }, + { + "text": "Placeholder", + "href": "/categories/accessories" + } + ] + } + } + }, + { + "VtMenuItem": { + "config": { + "title": "Info", + "className": "flex flex-col gap-y-2 text-[16px] font-semibold text-white", + "itemClassName": "text-[14px] font-[400] w-[200px] mt-3", + "items": [ + { + "text": "The Squatch Difference", + "href": "/" + }, + { + "text": "Why Natural Products", + "href": "/categories/shoes" + }, + { + "text": "No Harmful Ingredients", + "href": "/categories/accessories" + } + ] + } + } + } + ], + "center": [ + { + "Logo": { + "config": { + "src": "/b-corp-logo.webp", + "alt": "MyShop", + "className": "h-auto w-[90px] mr-24", + "objectFit": "contain" + } + } + } + ], + "right": [ + { + "VtFooterSignUp": { + "config": { + "title": "Don't miss out on hot deals! Sign up and get up to 30% off.", + "className": "max-w-[760px]", + "titleClassName": "text-white text-[18px]", + "formClassName": "mt-2 w-full", + "inputClassName": "w-full", + "buttonClassName": "bg-[#C4622C] w-[90px]", + "socialsClassName": "mt-4 gap-8", + "socials": [ + { "icon": "Twitter", "href": "/", "className": "w-5 h-5 text-white" }, + { "icon": "Twitter", "href": "/", "className": "w-5 h-5 text-white" }, + { "icon": "Twitter", "href": "/", "className": "w-5 h-5 text-white" }, + { "icon": "Twitter", "href": "/", "className": "w-5 h-5 text-white" } + ] + } + } + } + ] + } + } + }, + { + "VtFooterBottom": { + "config": { + "className": "text-white text-[14px] font-[400] bg-[#1f3621] flex items-center justify-center", + "text": "©2025 Vibentec IT. All rights reserved", + "linksClassName": "flex items-center text-orange-500 mt-2 pl-2", + "links": [ + { + "label": "Privacy Policy", + "href": "/" + }, + { + "label": "Terms of Service", + "href": "/categories/shoes" + }, + { + "label": "Cookie Policy", + "href": "/categories/accessories" } ] } diff --git a/src/modules/layout/templates/vt-footer/index.tsx b/src/modules/layout/templates/vt-footer/index.tsx index 67beee4..1a92223 100644 --- a/src/modules/layout/templates/vt-footer/index.tsx +++ b/src/modules/layout/templates/vt-footer/index.tsx @@ -25,17 +25,17 @@ export default async function VtFooter({ return (