Skip to content

Commit

Permalink
feat: trigger deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
tefkah committed Mar 20, 2024
1 parent 6e52c74 commit 27895e0
Showing 1 changed file with 31 additions and 34 deletions.
65 changes: 31 additions & 34 deletions apps/next-blog/src/app/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,40 +26,37 @@ export async function Footer() {
<div className="mx-auto px-4 py-12 sm:px-6 md:max-w-7xl lg:px-8 lg:py-16 xl:max-w-[100rem]">
<div className="pb-8 xl:grid xl:grid-cols-5 xl:gap-8">
<div className="grid grid-cols-2 flex-wrap gap-4 md:flex md:gap-8 xl:col-span-4">
{
// TODO: [blog] clean up the footer
new Array(Math.floor(((footer?.length ?? 0) - 0.1) / 2) + 1).fill(0).map((_, idx) => (
<div
key={_ + idx}
className={`flex-wrap md:flex md:grid-cols-${
Math.floor(((footer?.length ?? 0) - 0.1) / 2) + 1
} md:gap-8`}
>
{[footer?.[idx * 2], footer?.[idx * 2 + 1]]?.map((section, ix) => (
<div
className={ix % 2 ? 'mt-12 md:mt-0' : ''}
key={section?.title ?? section?.url ?? section?.createdAt?.toString() ?? ix}
>
<h3 className="text-sm font-semibold uppercase tracking-wider text-white transition-colors hover:text-orange-500 dark:text-slate-200">
{section?.url ? <a href={section.url}>{section?.title}</a> : section?.title}
</h3>
<ul className="mt-4 space-y-4">
{section?.children?.map((item, indx) => (
<li key={item.title}>
<a
href={item.url ?? '/'}
className="sleek-underline text-base text-white dark:text-slate-100 dark:hover:text-white"
>
{item.title}
</a>
</li>
))}
</ul>
</div>
))}
</div>
))
}
{new Array(Math.floor(((footer?.length ?? 0) - 0.1) / 2) + 1).fill(0).map((_, idx) => (
<div
key={_ + idx}
className={`flex-wrap md:flex md:grid-cols-${
Math.floor(((footer?.length ?? 0) - 0.1) / 2) + 1
} md:gap-8`}
>
{[footer?.[idx * 2], footer?.[idx * 2 + 1]]?.map((section, ix) => (
<div
className={ix % 2 ? 'mt-12 md:mt-0' : ''}
key={section?.title ?? section?.url ?? section?.createdAt?.toString() ?? ix}
>
<h3 className="text-sm font-semibold uppercase tracking-wider text-white transition-colors hover:text-orange-500 dark:text-slate-200">
{section?.url ? <a href={section.url}>{section?.title}</a> : section?.title}
</h3>
<ul className="mt-4 space-y-4">
{section?.children?.map((item, indx) => (
<li key={item.title}>
<a
href={item.url ?? '/'}
className="sleek-underline text-base text-white dark:text-slate-100 dark:hover:text-white"
>
{item.title}
</a>
</li>
))}
</ul>
</div>
))}
</div>
))}
</div>
</div>
<div className="lg:items-top flex flex-col gap-4 border-t border-white pt-8 dark:border-white lg:flex-row lg:justify-between xl:mt-0">
Expand Down

0 comments on commit 27895e0

Please sign in to comment.