redesign the homepage
Build & Deploy / Build & Push Docker Image (push) Failing after 47s
Build & Deploy / Deploy to VPS (push) Has been skipped
Test / API Unit Tests (push) Failing after 5m4s
Test / Marketplace Unit Tests (push) Failing after 4m55s
Test / Admin Unit Tests (push) Successful in 9m37s
Test / Dashboard Unit Tests (push) Successful in 9m37s
Test / API Integration Tests (push) Successful in 9m54s

This commit is contained in:
root
2026-06-26 16:27:21 -04:00
parent 256ff0814e
commit d7fb7b7a7b
1030 changed files with 107374 additions and 2657 deletions
@@ -0,0 +1,4 @@
'use client'
// Public marketing footer used by the homepage and other storefront pages.
export { default } from '@/components/MarketplaceFooter'
@@ -0,0 +1,4 @@
'use client'
// Public marketing navbar used by the homepage and other storefront pages.
export { default } from '@/components/MarketplaceHeader'
@@ -0,0 +1,15 @@
import fs from 'node:fs'
import { fileURLToPath } from 'node:url'
import { describe, expect, it } from 'vitest'
describe('storefront public page layout', () => {
it('keeps the navbar and footer in reusable component modules', () => {
const layoutPath = fileURLToPath(new URL('./SitePageLayout.tsx', import.meta.url))
const source = fs.readFileSync(layoutPath, 'utf8')
expect(source).toContain("import SiteNavbar from './SiteNavbar'")
expect(source).toContain("import SiteFooter from './SiteFooter'")
expect(source).toContain('<SiteNavbar')
expect(source).toContain('<SiteFooter')
})
})
@@ -0,0 +1,57 @@
'use client'
import type { ReactNode } from 'react'
import SiteFooter from './SiteFooter'
import SiteNavbar from './SiteNavbar'
import {
getFooterContent,
localeOptions,
useMarketplacePreferences,
} from '@/components/MarketplaceShell'
import { resolveBrowserAppUrl } from '@/lib/appUrls'
export default function SitePageLayout({ children }: { children: ReactNode }) {
const { language, theme, dict, companyName, setLanguage, setTheme } = useMarketplacePreferences()
const dashboardUrl = resolveBrowserAppUrl(
process.env.NEXT_PUBLIC_DASHBOARD_URL ?? 'http://localhost:3000/dashboard',
)
const footerContent = getFooterContent(language)
const available = localeOptions.filter((option) => option.value !== language)
const current = localeOptions.find((option) => option.value === language) ?? localeOptions[0]
return (
<div className="site-page flex min-h-screen flex-col" data-site-page-layout="true">
<SiteNavbar
dict={dict}
theme={theme}
setTheme={setTheme}
companyName={companyName}
dashboardUrl={dashboardUrl}
currentLanguage={{
value: current.value,
flag: current.flag,
shortLabel: current.value.toUpperCase(),
}}
localeOptions={available.map((option) => ({
value: option.value,
flag: option.flag,
shortLabel: option.value.toUpperCase(),
}))}
onSelectLanguage={setLanguage}
/>
<div className="flex flex-1 flex-col">
<div className="flex-1">{children}</div>
<SiteFooter
primaryItems={footerContent.primary}
secondaryItems={footerContent.secondary}
localeLabel={footerContent.localeLabel}
rightsLabel={footerContent.rightsLabel}
localeOptions={available}
currentLocale={current}
onSelectLanguage={setLanguage}
/>
</div>
</div>
)
}
@@ -0,0 +1,5 @@
'use client'
export { default as SiteFooter } from './SiteFooter'
export { default as SiteNavbar } from './SiteNavbar'
export { default as SitePageLayout } from './SitePageLayout'