"use client";
import { useState, useEffect } from "react";
import Link from "next/link";
import { JetBrains_Mono } from "next/font/google";
import { Dictionary } from "@/lib/IDict";
import { cn } from "@/lib/utils";
const jetbrainsMono = JetBrains_Mono({
subsets: ["latin", "cyrillic"],
});
// Кастомные легкие SVG иконки
const Icons = {
Telegram: () => (
),
Youtube: () => (
),
Discord: () => (
),
X: () => (
),
Instagram: () => (
),
Habr: () => (
),
};
const FlickeringSocialIcon = ({ social }: { social: any }) => {
const [opacity, setOpacity] = useState(1);
useEffect(() => {
let timeoutId: NodeJS.Timeout;
const flicker = () => {
if (Math.random() > 0.6) {
setOpacity(Math.random() * 0.5 + 0.1);
setTimeout(() => setOpacity(1), Math.random() * 120 + 30);
}
timeoutId = setTimeout(flicker, Math.random() * 6000 + 1000);
};
timeoutId = setTimeout(flicker, Math.random() * 3000);
return () => clearTimeout(timeoutId);
}, []);
return (
{/* Фоновый отсвет только для темной темы */}
);
};
export function Footer({
dict,
lang,
}: {
dict: Dictionary["footer"];
lang: string;
}) {
const sitemap = [
{
title: dict.sections.product,
links: [
{ name: dict.links.features, href: `/${lang}#features` },
{ name: dict.links.pricing, href: `/${lang}#pricing` },
{ name: dict.links.protocol, href: `/${lang}/docs` },
{ name: dict.links.profile, href: `/${lang}/auth` }, // Добавлена ссылка на профиль
],
},
{
title: dict.sections.resources,
links: [
{ name: dict.links.faq, href: `/${lang}#faq` },
{ name: dict.links.comms, href: `/${lang}/blog` },
],
},
{
title: dict.sections.legal,
links: [
{ name: dict.links.privacy, href: `/${lang}/docs` },
{ name: dict.links.terms, href: `/${lang}/docs` },
],
},
];
const socialLinks = [
{
name: "Telegram",
href: "#",
icon: Icons.Telegram,
color: "text-[#0088cc]", // В светлой теме цвет остается плотным
glow: "dark:drop-shadow-[0_0_8px_rgba(0,136,204,0.8)]", // Ограничиваем свечение только темной темой
bgGlow: "bg-[#0088cc]",
},
// ... аналогично для YouTube, Discord, X, Instagram, Habr (добавь префикс dark: к каждому glow)
{
name: "YouTube",
href: "#",
icon: Icons.Youtube,
color: "text-[#ff0000]",
glow: "dark:drop-shadow-[0_0_8px_rgba(255,0,0,0.8)]",
bgGlow: "bg-[#ff0000]",
},
{
name: "Discord",
href: "#",
icon: Icons.Discord,
color: "text-[#5865F2]",
glow: "dark:drop-shadow-[0_0_8px_rgba(88,101,242,0.8)]",
bgGlow: "bg-[#5865F2]",
},
{
name: "X",
href: "#",
icon: Icons.X,
color: "text-foreground",
glow: "dark:drop-shadow-[0_0_8px_rgba(255,255,255,0.5)]",
bgGlow: "bg-white",
},
{
name: "Instagram",
href: "#",
icon: Icons.Instagram,
color: "text-[#E1306C]",
glow: "dark:drop-shadow-[0_0_8px_rgba(225,48,108,0.8)]",
bgGlow: "bg-[#E1306C]",
},
{
name: "Habr",
href: "#",
icon: Icons.Habr,
color: "text-[#65A3BE]",
glow: "dark:drop-shadow-[0_0_8px_rgba(101,163,190,0.8)]",
bgGlow: "bg-[#65A3BE]",
},
];
return (
);
}