feat: add dynamic site settings, hero media, admin panels, and database integration
This commit is contained in:
+17
-10
@@ -33,7 +33,7 @@ const socials = [
|
||||
},
|
||||
];
|
||||
|
||||
export default function Footer({ dict }: { dict: any }) {
|
||||
export default function Footer({ dict, dbSettings }: { dict: any, dbSettings?: any }) {
|
||||
const links = [
|
||||
{ label: dict.nav.about, href: "#about" },
|
||||
{ label: dict.nav.services, href: "#services" },
|
||||
@@ -41,6 +41,13 @@ export default function Footer({ dict }: { dict: any }) {
|
||||
{ label: dict.nav.contact, href: "#contact" },
|
||||
];
|
||||
|
||||
const dynamicSocials = socials.map(s => {
|
||||
if (s.label === "Instagram" && dbSettings?.instagramUrl) return { ...s, href: dbSettings.instagramUrl };
|
||||
if (s.label === "Facebook" && dbSettings?.facebookUrl) return { ...s, href: dbSettings.facebookUrl };
|
||||
if (s.label === "YouTube" && dbSettings?.youtubeUrl) return { ...s, href: dbSettings.youtubeUrl };
|
||||
return s;
|
||||
});
|
||||
|
||||
return (
|
||||
<footer className="relative bg-sea-dark text-sand-light overflow-hidden">
|
||||
|
||||
@@ -67,7 +74,7 @@ export default function Footer({ dict }: { dict: any }) {
|
||||
|
||||
{/* Social icons */}
|
||||
<div className="flex gap-3">
|
||||
{socials.map((s) => (
|
||||
{dynamicSocials.map((s) => (
|
||||
<a
|
||||
key={s.label}
|
||||
href={s.href}
|
||||
@@ -105,20 +112,20 @@ export default function Footer({ dict }: { dict: any }) {
|
||||
<h4 className="text-[11px] uppercase tracking-[0.25em] text-sand-dark mb-5">{dict.footer.contact}</h4>
|
||||
<ul className="space-y-4 text-sm text-sand-light/65">
|
||||
<li className="leading-relaxed">
|
||||
{dict.contact.address.text1}<br />
|
||||
{dict.contact.address.text2}
|
||||
{dbSettings?.addressText1 || dict.contact.address.text1}<br />
|
||||
{dbSettings?.addressText2 || dict.contact.address.text2}
|
||||
</li>
|
||||
<li>
|
||||
<a href="tel:+905344656235" className="hover:text-white transition-colors">
|
||||
+90 534 465 62 35
|
||||
<a href={`tel:${dbSettings?.phone?.replace(/\s+/g, '') || '+905344656235'}`} className="hover:text-white transition-colors">
|
||||
{dbSettings?.phone || '+90 534 465 62 35'}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="mailto:info@moybeachakyaka.com" className="hover:text-white transition-colors">
|
||||
info@moybeachakyaka.com
|
||||
<a href={`mailto:${dbSettings?.email || 'info@moybeachakyaka.com'}`} className="hover:text-white transition-colors">
|
||||
{dbSettings?.email || 'info@moybeachakyaka.com'}
|
||||
</a>
|
||||
</li>
|
||||
<li className="text-sand-light/45">{dict.contact.hours.text}</li>
|
||||
<li className="text-sand-light/45">{dbSettings?.workingHours || dict.contact.hours.text}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -148,7 +155,7 @@ export default function Footer({ dict }: { dict: any }) {
|
||||
|
||||
{/* Floating WhatsApp Button */}
|
||||
<a
|
||||
href="https://wa.me/905344656235"
|
||||
href={`https://wa.me/${dbSettings?.whatsappNumber || '905344656235'}`}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="fixed bottom-6 right-6 z-50 bg-[#25D366] text-white p-3.5 rounded-full shadow-xl hover:scale-110 transition-transform"
|
||||
|
||||
Reference in New Issue
Block a user