footer
This commit is contained in:
parent
d2d84a2bfb
commit
8df66d3245
1 changed files with 15 additions and 11 deletions
|
|
@ -1,28 +1,32 @@
|
||||||
import { getCachedGlobal } from '@/utilities/getGlobals'
|
import { getCachedGlobal } from '@/utilities/getGlobals'
|
||||||
|
import Link from 'next/link'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
import { CMSLink } from '@/components/Link'
|
import { CMSLink } from '@/components/Link'
|
||||||
|
|
||||||
export async function Footer() {
|
export async function Footer() {
|
||||||
const footerData = await getCachedGlobal('footer', 1)()
|
const footerData = await getCachedGlobal('footer', 1)()
|
||||||
|
|
||||||
const navItems = footerData?.navItems || []
|
const navItems = footerData?.navItems || []
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<footer className="mt-auto relative z-10">
|
<footer className="mt-auto border-t border-foreground/10 relative z-10">
|
||||||
<div className="container py-8 flex flex-col sm:flex-row items-center justify-between gap-4">
|
<div className="container py-8 flex flex-col items-center gap-4">
|
||||||
<p className="text-foreground/30 text-xs">© {new Date().getFullYear()} ByMackie</p>
|
<nav className="flex flex-wrap justify-center gap-6">
|
||||||
|
{navItems.map(({ link }, i) => {
|
||||||
{navItems.length > 0 && (
|
return (
|
||||||
<nav className="flex flex-wrap justify-center gap-5">
|
|
||||||
{navItems.map(({ link }, i) => (
|
|
||||||
<CMSLink
|
<CMSLink
|
||||||
|
className="text-foreground/60 hover:text-foreground transition-colors text-sm"
|
||||||
key={i}
|
key={i}
|
||||||
{...link}
|
{...link}
|
||||||
className="text-foreground/40 hover:text-foreground/70 transition-colors text-xs"
|
|
||||||
/>
|
/>
|
||||||
))}
|
)
|
||||||
|
})}
|
||||||
</nav>
|
</nav>
|
||||||
)}
|
|
||||||
|
<p className="text-foreground/40 text-sm text-center">
|
||||||
|
© {new Date().getFullYear()} ByMackie. All rights reserved.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue