Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 20 additions & 41 deletions web/default/src/components/layout/components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,10 @@ export function Footer(props: FooterProps) {
const { t } = useTranslation()
const {
systemName,
logo: systemLogo,
footerHtml,
demoSiteEnabled,
} = useSystemConfig()

const displayLogo = systemLogo || props.logo || '/logo.png'
const displayName = systemName || props.name || 'New API'
const isDemoSiteMode = Boolean(demoSiteEnabled)
const currentYear = new Date().getFullYear()
Expand Down Expand Up @@ -214,49 +212,30 @@ export function Footer(props: FooterProps) {
<footer
className={cn('border-border/40 relative z-10 border-t', props.className)}
>
<div className='mx-auto max-w-6xl px-6 py-12 md:py-16'>
<div className='flex flex-col justify-between gap-10 md:flex-row md:gap-16'>
{/* Brand column */}
<div className='shrink-0'>
<Link to='/' className='group flex items-center gap-2.5'>
<img
src={displayLogo}
alt={displayName}
className='size-7 rounded-lg object-contain'
/>
<span className='text-sm font-semibold tracking-tight'>
{displayName}
</span>
</Link>
<p className='text-muted-foreground/60 mt-3 max-w-[200px] text-xs leading-relaxed'>
{t('Powerful API Management Platform')}
</p>
<div className='mx-auto max-w-6xl px-6 py-6 md:py-8'>
{/* Links columns (brand column removed) */}
{isDemoSiteMode && (
<div className='mb-12 grid grid-cols-3 gap-8 md:gap-16'>
{displayColumns.map((column, index) => (
<div key={index}>
<p className='text-muted-foreground/50 mb-3 text-xs font-medium tracking-wider uppercase'>
{t(column.title)}
</p>
<ul className='space-y-2.5'>
{column.links.map((link, linkIndex) => (
<li key={linkIndex}>
<FooterLinkItem link={link} />
</li>
))}
</ul>
</div>
))}
</div>

{/* Links columns */}
{isDemoSiteMode && (
<div className='grid grid-cols-3 gap-8 md:gap-16'>
{displayColumns.map((column, index) => (
<div key={index}>
<p className='text-muted-foreground/50 mb-3 text-xs font-medium tracking-wider uppercase'>
{t(column.title)}
</p>
<ul className='space-y-2.5'>
{column.links.map((link, linkIndex) => (
<li key={linkIndex}>
<FooterLinkItem link={link} />
</li>
))}
</ul>
</div>
))}
</div>
)}
</div>
)}

{/* Copyright + optional legal links inline on the left, project
attribution on the right; wraps on narrow screens. */}
<div className='border-border/30 mt-12 flex flex-col items-center justify-between gap-x-3 gap-y-2 border-t pt-6 sm:flex-row'>
<div className='border-border/30 flex flex-col items-center justify-between gap-x-3 gap-y-2 border-t pt-6 sm:flex-row'>
<div className='text-muted-foreground/40 flex flex-wrap items-center justify-center gap-x-2 gap-y-1 text-xs sm:justify-start'>
<span>
&copy; {currentYear} {displayName}.{' '}
Expand Down