71 lines
2.2 KiB
Plaintext
71 lines
2.2 KiB
Plaintext
---
|
|
import { Icon } from 'astro-icon/components';
|
|
import { SITE } from 'astrowind:config';
|
|
import { getHomePermalink } from '~/utils/permalinks';
|
|
|
|
interface Link {
|
|
text?: string;
|
|
href?: string;
|
|
ariaLabel?: string;
|
|
icon?: string;
|
|
}
|
|
|
|
interface Links {
|
|
title?: string;
|
|
links: Array<Link>;
|
|
}
|
|
|
|
export interface Props {
|
|
links: Array<Links>;
|
|
secondaryLinks: Array<Link>;
|
|
socialLinks: Array<Link>;
|
|
footNote?: string;
|
|
theme?: string;
|
|
}
|
|
|
|
const { socialLinks = [], secondaryLinks = [], links = [], footNote = '', theme = 'light' } = Astro.props;
|
|
---
|
|
|
|
<footer class:list={[{ dark: theme === 'dark' }, 'relative border-t border-gray-200 dark:border-slate-800 not-prose']}>
|
|
<div class="dark:bg-dark absolute inset-0 pointer-events-none" aria-hidden="true"></div>
|
|
<div
|
|
class="relative max-w-7xl mx-auto px-4 sm:px-6 dark:text-slate-300 intersect-once intersect-quarter intercept-no-queue motion-safe:md:opacity-0 motion-safe:md:intersect:animate-fade"
|
|
>
|
|
|
|
<!-- ✅ Combined Footer Section -->
|
|
<div class="flex flex-col md:flex-row md:items-center md:justify-between py-6 md:py-8space-y-4 md:space-y-0">
|
|
|
|
<!-- Site Title with Terms & Privacy Links -->
|
|
<div class="flex flex-col items-start space-y-2">
|
|
<!-- Site Title -->
|
|
<a class="inline-block font-bold text-xl" href={getHomePermalink()}>
|
|
{SITE?.name}
|
|
</a>
|
|
|
|
<!-- Terms & Privacy Policy Links -->
|
|
<div class="flex items-center space-x-4 text-sm text-muted">
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Social Icons -->
|
|
{
|
|
socialLinks?.length && (
|
|
<ul class="flex space-x-4">
|
|
{socialLinks.map(({ ariaLabel, href, icon }, index) => (
|
|
<li key={index}>
|
|
<a
|
|
class="text-muted dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg p-2 inline-flex items-center"
|
|
aria-label={ariaLabel}
|
|
href={href}
|
|
>
|
|
{icon && <Icon name={icon} class="w-5 h-5" />}
|
|
</a>
|
|
</li>
|
|
))}
|
|
</ul>
|
|
)
|
|
}
|
|
</div>
|
|
</div>
|
|
</footer> |