diff --git a/OpenCand.UI.dockerfile b/OpenCand.UI.dockerfile index a76841b..a9b49f2 100644 --- a/OpenCand.UI.dockerfile +++ b/OpenCand.UI.dockerfile @@ -20,6 +20,7 @@ RUN rm -rf /usr/share/nginx/html/* # Replace default nginx.conf COPY nginx.conf /etc/nginx/nginx.conf # Copy our built files into nginx’s html folder +COPY ./public/assets /usr/share/nginx/html COPY --from=builder /app/dist /usr/share/nginx/html # (Optional) If you need any custom nginx.conf, COPY it here— diff --git a/public/assets/Congresso_Nacional_hero.jpg b/public/assets/Congresso_Nacional_hero.jpg new file mode 100644 index 0000000..6554ab4 Binary files /dev/null and b/public/assets/Congresso_Nacional_hero.jpg differ diff --git a/src/App.tsx b/src/App.tsx index 11c76fb..42a9bdd 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -8,6 +8,7 @@ import Footer from './components/Footer'; import CandidatePage from './components/CandidatePage/CandidatePage'; import DataStatsPage from './components/DataStatsPage'; import StatisticsPage from './components/StatisticsPage'; +import SobrePage from './components/SobrePage'; import NotFound from './components/NotFound'; import MatrixBackground from './components/MatrixBackground'; import './App.css'; @@ -34,6 +35,7 @@ function App() { } /> } /> } /> + } /> } /> diff --git a/src/components/DataStatsPage.tsx b/src/components/DataStatsPage.tsx index f88d65b..9e47ea5 100644 --- a/src/components/DataStatsPage.tsx +++ b/src/components/DataStatsPage.tsx @@ -28,10 +28,10 @@ const DataStatsPage: React.FC = () => { if (loading) { return ( -
-
-
-

Carregando dados...

+
+
+
+

Carregando dados...

); diff --git a/src/components/FeaturesSection.tsx b/src/components/FeaturesSection.tsx index 57b0383..b725af7 100644 --- a/src/components/FeaturesSection.tsx +++ b/src/components/FeaturesSection.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ArrowDownOnSquareStackIcon, BookOpenIcon, ChartBarIcon, DocumentTextIcon, LightBulbIcon } from '@heroicons/react/24/outline'; +import { ArrowDownOnSquareStackIcon, BookOpenIcon, ChartBarIcon, ChartBarSquareIcon, DocumentMagnifyingGlassIcon, DocumentTextIcon, IdentificationIcon, LightBulbIcon, MagnifyingGlassIcon } from '@heroicons/react/24/outline'; import Card from '../shared/Card'; const FeatureCard: React.FC<{ icon: React.ElementType, title: string, children: React.ReactNode }> = ({ icon: Icon, title, children }) => { @@ -23,14 +23,17 @@ const FeaturesSection: React.FC = () => { Navegue facilmente por dados complexos do TSE com uma interface limpa e amigável. - - Entenda as tendências e padrões com gráficos e resumos visuais dos dados eleitorais. + + Visualização detalhada de perfis, redes sociais e histórico eleitoral. - - Obtenha informações relevantes sobre candidatos, partidos e financiamento de campanhas. + + Visualização acerca de bens declarados para cada candidato. - - Contribua para um projeto aberto e transparente, ajudando a melhorar a plataforma para todos. + + Análise de receitas e despesas de campanha quando disponível. + + + Estatísticas e gráficos interativos para entender melhor o cenário eleitoral. Os dados são acessíveis através do TSE e também disponibilizados em nosso repositório GitHub, garantindo transparência e confiabilidade. diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 1a5ed4e..fb3d3a4 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -8,7 +8,7 @@ const Footer: React.FC = () => { © {new Date().getFullYear()} OpenCand. Todos os direitos reservados.

- Democratizando o acesso à informação eleitoral. + Não nos responsabilizamos por quaisquer erros ou inconsistências nos dados apresentados, pois estes são de livre interpretação da plataforma e devem ser verificados com os dados oficiais do TSE.

diff --git a/src/components/HeroSection.tsx b/src/components/HeroSection.tsx index 57ea308..03878d3 100644 --- a/src/components/HeroSection.tsx +++ b/src/components/HeroSection.tsx @@ -6,7 +6,7 @@ const HeroSection: React.FC = () => { return (
@@ -26,6 +26,18 @@ const HeroSection: React.FC = () => { />
+ {/* Image credit */} + + Edilson Rodrigues/Agência Senado. Senado Federal, + + CC BY 2.0 + , via Wikimedia Commons + ); }; diff --git a/src/components/SobrePage.tsx b/src/components/SobrePage.tsx new file mode 100644 index 0000000..91c7bb7 --- /dev/null +++ b/src/components/SobrePage.tsx @@ -0,0 +1,120 @@ +import React from 'react'; +import { FaGithub, FaLinkedin } from 'react-icons/fa'; + +const SobrePage: React.FC = () => { + return ( +
+
+
+

+ O OpenCand é uma plataforma que visa explorar de forma intuitiva os dados eleitorais brasileiros e possui + o objetivo de ser uma alternativa para o acesso às informações públicas do Tribunal Superior Eleitoral (TSE). +

+ +

+ O projeto foi desenvolvido por + ivanch + + + + + + + como hobby, o código é semi-aberto e está disponível no GitHub. + Atualmente apenas o ETL (Extract-Transform-Load) está disponível, juntamente com o banco de dados final. +

+ +

+ A API também pode ser utilizada para acessar os dados de forma pública, porém ainda não está documentada. A documentação da API será disponibilizada em breve. +

+ +
+ +

+ Não nos responsabilizamos por quaisquer erros ou inconsistências nos dados apresentados, pois estes são de livre interpretação da plataforma e devem ser verificados com os dados oficiais do TSE. +
+ A plataforma é uma iniciativa independente e não possui qualquer vínculo com o TSE ou órgãos governamentais. +

+ +
+ + + +
+ +

+ Contato: {[ + 'opencand', + @, + 'ivanch', + ., + 'me' + ]} +

+ +
+

+ Desenvolvido com .NET, PostgreSQL, React (TypeScript/Tailwind CSS) e dados abertos do TSE.
+ + +

+
+
+
+
+ ); +}; + +export default SobrePage; diff --git a/src/shared/RandomCandButton.tsx b/src/shared/RandomCandButton.tsx index 32d9d10..53cfd38 100644 --- a/src/shared/RandomCandButton.tsx +++ b/src/shared/RandomCandButton.tsx @@ -9,30 +9,44 @@ interface RandomCandButtonProps { hasAnimation?: boolean; } + const RandomCandButton: React.FC = ({ className = '', hasAnimation = false }) => { const navigate = useNavigate(); + const [loading, setLoading] = React.useState(false); const handleRandomCandidate = async () => { + setLoading(true); try { const randomCandidate = await openCandApi.getRandomCandidate(); navigate(`/candidato/${randomCandidate.idCandidato}`); } catch (error) { console.error('Erro ao buscar candidato aleatório:', error); // You might want to show a toast notification or error message to the user + } finally { + setLoading(false); } }; return ( ); };