feat: separate settings and gallery config, add impressum page

This commit is contained in:
ralksta
2026-03-07 08:34:05 +01:00
parent 1e079760d8
commit 0fed8e6c78
6 changed files with 307 additions and 124 deletions

View File

@@ -3,21 +3,32 @@
* Reads configuration from gallery.yaml via getConfig().
*/
import Link from 'next/link';
import { getConfig } from '@/lib/config';
export function Footer() {
const config = getConfig();
const { footer } = config;
const { footer, legal } = config;
// Don't render if no footer config
if (!footer || (!footer.name && !footer.instagram && !footer.email && !footer.website)) {
// Don't render if no footer config AND no legal config
if (
!legal.enabled &&
(!footer || (!footer.name && !footer.instagram && !footer.email && !footer.website))
) {
return null;
}
return (
<footer className="footer">
<div className="footer__inner">
{footer.name && <span className="footer__name">{footer.name}</span>}
<div className="footer__left">
{footer?.name && <span className="footer__name">{footer.name}</span>}
{legal.enabled && (
<Link href="/impressum" className="footer__legal-link">
Impressum
</Link>
)}
</div>
<div className="footer__links">
{footer.instagram && (