added packages to support markdown

added dummy pages for about and contact.
updated tailwind.config.js to include config/*.json to scan for classes.
refactored system basics. Removed component-props, using generic LayoutComponentDefinition and LayoutContext. cleanup component-map. Updated renderer to be more failsafe.

new abstracted components:
 vt-mega-menu,
vt-sidemenu,
vt-banner with 3 variants,
vt-header,
vt-homebutton,
vt-cartbutton,
vt-accountbutton,
vt-linkbutton,
This commit is contained in:
2025-11-25 15:17:18 +01:00
parent 51d6ee2051
commit 39fe0c81e5
30 changed files with 2849 additions and 142 deletions
+25 -58
View File
@@ -1,68 +1,35 @@
[
{
"Nav": {
"props": {},
"children": [
{
"Header" : {
"config" : {"sticky": true},
"children" : [
{
"Div": {
"props": { "className": "flex items-center h-full" },
"children": [
{
"LocalizedClientLink": {
"props": {
"href": "/",
"label": "Medusa Store",
"className": "bg-black txt-compact-xlarge-plus hover:text-ui-fg-base uppercase",
"data-testid": "nav-store-link"
"Nav": {
"config": {
"left": [
{ "VtSideMenu": {} }
],
"center": [
{ "HomeButton": { "config" : {"label":"Medusa Store"}} }
],
"right": [
{ "AccountButton": {
"config": {
"label": "Account",
"className": "hover:text-ui-fg-base"
}
}
}
}
]
}
},
{
"Div": {
"props": { "className": "flex items-center gap-x-6 h-full flex-1 basis-0 justify-end" },
"children": [
{
"LocalizedClientLink": {
"props": {
"href": "/account",
"label": "Account",
"className": "hover:text-ui-fg-base bg-black",
"data-testid": "nav-account-link"
}
}
},
{
"Suspense": {
"props": {
"fallback": [
{
"LocalizedClientLink": {
"props": {
"href": "/cart",
"label": "Cart (0)",
"className": "bg-black hover:text-ui-fg-base flex gap-2",
"data-testid": "nav-cart-link"
}
}
}
]
},
"children": [
{ "CartButton": {} }
]
}
}
]
},
{ "VtCartButton" : {} }
]
}
}
}
]
}
},
{ "CartMismatchBanner": { "show": true } },
{ "FreeShippingPriceNudge": { "variant": "popup" } },
{ "CartMismatchBanner": { "config": {"show": true} } },
{ "FreeShippingPriceNudge": { "config": {"variant": "popup" }} },
{ "PropsChildren" : {}},
{ "Footer": { "copyrightText": "© 2025 MyShop" } }
{ "Footer": { "config" : {"copyrightText": "© 2025 MyShop"} } }
]
+70
View File
@@ -0,0 +1,70 @@
[
{
"Header" : {
"config" : {"sticky": true},
"children" : [
{
"Banner": {
"config": {
"variant": "nav",
"className": "h-12 bg-[#E6EFFC] text-[#285A86]",
"left":[ { "Link": { "config" : {"label":"About us", "href":"/vt-about"}} }],
"center":[ { "Link": { "config" : {"label":"Contact", "href":"/vt-contact"}} }],
"right":[ { "HomeButton": { "config" : {"label":"Vibentec IT"}} }]
}
}
},
{
"Banner": {
"config": {
"variant": "ticker",
"speed":24,
"className": "h-12 bg-[#E6EFFC] text-[#285A86]",
"items":[ {
"Link": { "config" : {"label":"Vibentec IT"}}
}]
}
}
},
{
"Banner": {
"config": {
"variant": "cta",
"text": "**Black Friday Vorverkauf**\nKOSTENLOSES MISTERY GESCHENK ab 60€ <u>jetzt shoppen</u>",
"href" : "/",
"className": "h-12 bg-[#E6EFFC] text-[#285A86]"
}
}
},
{
"Nav": {
"config": {
"left": [
{ "VtMegaMenu": {} } ,
{ "HomeButton": { "config" : {"label":"Vibentec IT"}} }
],
"center": [
{ "AccountButton": {
"config": {
"label": "Accounto",
"bgColor": "#123456",
"textColor": "#abcdef",
"className": "hover:text-ui-fg-base"
}
}
}
],
"right": [
{ "VtCartButton" : {} }
]
}
}
}
]
}
},
{ "CartMismatchBanner": { "config": {"show": true} } },
{ "FreeShippingPriceNudge": { "config": {"variant": "popup" }} },
{ "PropsChildren" : {}},
{ "Footer": { "config" : {"copyrightText": "© 2025 MyShop"} } }
]