feat(footer, header, landing): enhance UI components and improve navigation

- Updated Footer component with new links and dynamic year display.
- Refactored Header component to improve mobile navigation and theme toggling.
- Enhanced DonationSection and Features components with improved layout and animations.
- Updated HowItWorks and Impact sections for better user engagement and clarity.
- Improved product page layout and error handling in API interactions.
- General UI refinements across various components for a cohesive user experience.
This commit is contained in:
Evandro Fonseca Junior committed 2026-01-12 19:55:50 -03:00
1 parent b0f95704e1
commit f98c648311
21 files changed
+3335 -12057

No files matched your search

+108 -130
View File
@@ -1,3 +1,8 @@
"use client";
import React from "react";
import Link from "next/link";
import Image from "next/image";
import {
ExternalLink,
Github,
@@ -5,171 +10,144 @@ import {
Globe,
Shield,
ScanLine,
Database,
Lock,
} from "lucide-react";
const FOOTER_LINKS = {
navigation: [
{ href: "/#como-funciona", label: "Protocolo" },
{ href: "/#recursos", label: "Recursos" },
{ href: "/sobre", label: "Sobre o Projeto" },
{ href: "/produto/exemplo", label: "Sandbox (Exemplo)" },
],
resources: [
{ icon: Shield, label: "Dados Colaborativos" },
{ icon: Globe, label: "Rede Global" },
{ icon: ScanLine, label: "Algoritmo de Busca" },
],
};
export function Footer() {
const currentYear = new Date().getFullYear();
return (
<footer className="bg-gray-900 dark:bg-black text-white">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
<div className="grid grid-cols-1 md:grid-cols-4 gap-8">
{/* Brand */}
<div className="md:col-span-1">
<div className="flex items-center gap-3 mb-6">
<img
src="/apple-touch-icon.png"
alt="NutriScan Logo"
className="w-10 h-10 rounded-xl"
/>
<footer className="bg-[#030712] text-gray-400 border-t border-gray-800/50 transition-colors duration-500">
<div className="max-w-7xl mx-auto px-6 py-20">
<div className="grid grid-cols-1 lg:grid-cols-12 gap-16 mb-20">
{/* Brand Identity - 4 Colunas */}
<div className="lg:col-span-4 space-y-8">
<Link href="/" className="flex items-center gap-3 group">
<div className="relative w-10 h-10 bg-blue-600 rounded-xl overflow-hidden shadow-lg shadow-blue-500/10">
<Image src="/icon.png" alt="Logo" fill className="object-contain p-2" priority />
</div>
<div>
<h3 className="text-xl font-bold">NutriScan</h3>
<p className="text-sm text-gray-400">
Informações nutricionais
<h3 className="text-xl font-black text-white tracking-tighter leading-none">
NUTRI<span className="text-blue-500">SCAN</span>
</h3>
<p className="text-[10px] font-bold text-gray-500 uppercase tracking-[0.2em] mt-1">
Data Sovereignty
</p>
</div>
</div>
<p className="text-gray-400 text-sm leading-relaxed mb-6">
Descubra informações nutricionais completas de milhares de
produtos alimentícios com apenas um código de barras.
</Link>
<p className="text-sm leading-relaxed max-w-sm">
Soberania alimentar através da transparência. Extraímos metadados nutricionais complexos para devolver o poder de escolha ao cidadão.
</p>
<div className="flex items-center gap-2 text-sm text-gray-400">
<Heart className="w-4 h-4 text-red-500" />
<span>Feito com amor para uma alimentação mais consciente</span>
<div className="flex items-center gap-2 text-[11px] font-mono uppercase tracking-widest text-gray-500">
<Heart className="w-3 h-3 text-red-500 animate-pulse" />
<span>Engineered in Garuva, SC</span>
</div>
</div>
{/* Links */}
<div>
<h4 className="text-lg font-semibold mb-4">Navegação</h4>
<ul className="space-y-3">
<li>
<a
href="/#como-funciona"
className="text-gray-400 hover:text-white transition-colors"
>
Como funciona
</a>
</li>
<li>
<a
href="/#recursos"
className="text-gray-400 hover:text-white transition-colors"
>
Recursos
</a>
</li>
<li>
<a
href="#sobre"
className="text-gray-400 hover:text-white transition-colors"
>
Sobre
</a>
</li>
<li>
<a
href="/produto/exemplo"
className="text-gray-400 hover:text-white transition-colors"
>
Exemplo de produto
</a>
</li>
{/* Navigation - 2 Colunas */}
<div className="lg:col-span-2">
<h4 className="text-white font-bold text-sm uppercase tracking-widest mb-6">Sitemap</h4>
<ul className="space-y-4">
{FOOTER_LINKS.navigation.map((link) => (
<li key={link.href}>
<Link href={link.href} className="text-sm hover:text-blue-400 transition-colors">
{link.label}
</Link>
</li>
))}
</ul>
</div>
{/* Recursos */}
<div>
<h4 className="text-lg font-semibold mb-4">Recursos</h4>
<ul className="space-y-3">
<li className="flex items-center gap-2 text-gray-400">
<Shield className="w-4 h-4" />
<span>Dados colaborativos</span>
</li>
<li className="flex items-center gap-2 text-gray-400">
<Globe className="w-4 h-4" />
<span>Banco global</span>
</li>
<li className="flex items-center gap-2 text-gray-400">
<ScanLine className="w-4 h-4" />
<span>Busca por código</span>
</li>
<li className="text-gray-400">
<span>Nutri-Score & NOVA</span>
</li>
{/* Logic/Features - 2 Colunas */}
<div className="lg:col-span-2">
<h4 className="text-white font-bold text-sm uppercase tracking-widest mb-6">Infraestrutura</h4>
<ul className="space-y-4">
{FOOTER_LINKS.resources.map((item) => (
<li key={item.label} className="flex items-center gap-3 text-sm">
<item.icon className="w-4 h-4 text-gray-600" />
<span>{item.label}</span>
</li>
))}
<li className="text-[11px] font-mono text-blue-500/80">Nutri-Score v2.1</li>
</ul>
</div>
{/* Open Food Facts */}
<div>
<h4 className="text-lg font-semibold mb-4">Fonte de Dados</h4>
<div className="bg-gray-800 rounded-lg p-4 mb-4">
<div className="flex items-center gap-2 mb-2">
<ExternalLink className="w-4 h-4 text-blue-400" />
<span className="font-medium">Fonte de Dados</span>
{/* Data Source Card - 4 Colunas */}
<div className="lg:col-span-4">
<div className="bg-gray-900/50 border border-gray-800 p-6 rounded-2xl backdrop-blur-sm">
<div className="flex items-center gap-3 mb-4">
<div className="p-2 bg-blue-500/10 rounded-lg">
<Database className="w-5 h-5 text-blue-500" />
</div>
<h4 className="text-white font-bold">Open Food Facts</h4>
</div>
<p className="text-sm text-gray-400 mb-3">
Dados fornecidos pelo Open Food Facts - a maior base de dados
colaborativa de produtos alimentícios do mundo.
<p className="text-xs leading-relaxed text-gray-500 mb-6">
A maior base de dados colaborativa de alimentos do mundo. Dados sob licença ODbL (Open Database License).
</p>
<a
href="https://world.openfoodfacts.org"
target="_blank"
rel="noopener noreferrer"
className="text-blue-400 hover:text-blue-300 text-sm transition-colors"
className="inline-flex items-center gap-2 text-xs font-black text-blue-500 uppercase tracking-widest hover:text-blue-400 transition-all"
>
Visitar Open Food Facts →
Protocolo de Dados <ExternalLink size={12} />
</a>
</div>
<div className="flex items-center gap-2 text-sm text-gray-400">
<Github className="w-4 h-4" />
<span>Código aberto</span>
</div>
</div>
</div>
{/* Disclaimer */}
<div className="bg-gray-800 rounded-lg p-6 my-12">
<p className="text-xs text-gray-400 text-center leading-relaxed">
<strong>Disclaimer:</strong> Os dados apresentados são fornecidos
pelo Open Food Facts, uma base de dados colaborativa. Não garantimos
a precisão, completude ou atualidade das informações. Sempre
verifique as informações na embalagem do produto.
</p>
{/* Disclaimer Técnico - Estilo "Regulatory" */}
<div className="border-t border-gray-800/50 pt-12">
<div className="bg-gray-900/30 border border-gray-800/50 p-6 rounded-2xl flex flex-col md:flex-row items-center gap-6">
<Lock className="w-8 h-8 text-gray-700 shrink-0" />
<p className="text-[10px] md:text-xs text-gray-500 leading-relaxed text-center md:text-left">
<strong className="text-gray-400 uppercase tracking-widest">Aviso Legal (Disclaimer):</strong> Os dados são extraídos de fontes colaborativas. Não garantimos a integridade absoluta das informações nutricionais em comparação com a embalagem física. O uso desta ferramenta é consultivo e não substitui orientação médica ou nutricional profissional.
</p>
</div>
</div>
{/* Bottom */}
<div className="border-t border-gray-800 mt-12 pt-8">
<div className="flex flex-col md:flex-row justify-between items-center gap-4">
<div className="text-sm text-gray-400">
© 2024 NutriScan. Todos os direitos reservados.
<br />
<span className="text-xs">
Desenvolvido por{" "}
<a
href="https://evandro.dev.br"
target="_blank"
rel="noopener noreferrer"
className="text-blue-400 hover:text-blue-300 transition-colors"
>
evandro.dev.br
</a>{" "}
e mantido por NutriScan
</span>
</div>
<div className="flex items-center gap-6 text-sm text-gray-400">
<a href="#" className="hover:text-white transition-colors">
Privacidade
{/* Bottom Bar */}
<div className="mt-12 pt-8 flex flex-col md:flex-row justify-between items-center gap-6">
<div className="text-[11px] font-mono text-gray-600 text-center md:text-left space-y-1">
<p>© {currentYear} NutriScan Systems. Open Source Initiative.</p>
<p>
Lead Architect:{" "}
<a href="https://evandro.dev.br" target="_blank" className="text-blue-500 hover:underline">
evandro.dev.br
</a>
<a href="#" className="hover:text-white transition-colors">
Termos
</a>
<a href="#" className="hover:text-white transition-colors">
Contato
</a>
</p>
</div>
<div className="flex items-center gap-8">
<div className="flex items-center gap-4">
<Link href="/privacidade" className="text-[11px] font-black uppercase tracking-widest hover:text-white transition-colors">Privacidade</Link>
<Link href="/termos" className="text-[11px] font-black uppercase tracking-widest hover:text-white transition-colors">Termos</Link>
</div>
<a href="https://github.com" target="_blank" className="p-2 bg-gray-900 rounded-full hover:bg-gray-800 transition-colors">
<Github className="w-4 h-4 text-white" />
</a>
</div>
</div>
</div>
</footer>
);
}
}