partido + melhorias
Some checks failed
Frontend Build and Deploy / build (push) Failing after 11s

This commit is contained in:
José Henrique 2025-05-31 20:45:39 -03:00
parent 88afb7b453
commit 98b104b573
8 changed files with 50 additions and 16 deletions

View File

@ -29,6 +29,7 @@ export interface Election {
nrCandidato: string;
nomeCandidato: string;
resultado: string;
partido: Partido;
}
export interface CandidateAssets {
@ -65,4 +66,10 @@ export interface PlatformStats {
export interface CpfRevealResult {
cpf: string;
}
export interface Partido {
nome: string;
sigla: string;
numero: number;
}

View File

@ -42,6 +42,7 @@ const ElectionsComponent: React.FC<ElectionsComponentProps> = ({ elections, isLo
<th className="text-left py-3 px-2 font-semibold text-gray-700">Cargo</th>
<th className="text-left py-3 px-2 font-semibold text-gray-700">UF</th>
<th className="text-left py-3 px-2 font-semibold text-gray-700">Localidade</th>
<th className="text-left py-3 px-2 font-semibold text-gray-700">Partido</th>
<th className="text-left py-3 px-2 font-semibold text-gray-700">Número</th>
<th className="text-left py-3 px-2 font-semibold text-gray-700">Resultado</th>
</tr>
@ -54,6 +55,7 @@ const ElectionsComponent: React.FC<ElectionsComponentProps> = ({ elections, isLo
<td className="py-3 px-2 text-gray-900">{election.cargo}</td>
<td className="py-3 px-2 text-gray-900">{election.siglaUF}</td>
<td className="py-3 px-2 text-gray-900">{election.nomeUE}</td>
<td className="py-3 px-2 text-gray-900">{election.partido.sigla}</td>
<td className="py-3 px-2 text-gray-900">{election.nrCandidato}</td>
<td className="py-3 px-2">
<Tooltip

View File

@ -3,8 +3,8 @@ import { ChartBarIcon, DocumentTextIcon, LightBulbIcon } from '@heroicons/react/
const FeatureCard: React.FC<{ icon: React.ElementType, title: string, children: React.ReactNode }> = ({ icon: Icon, title, children }) => {
return (
<div className="bg-gray-800/40 p-6 rounded-lg">
<Icon className="h-10 w-10 text-indigo-400 mb-4" />
<div className="bg-gray-800/30 p-6 rounded-lg backdrop-blur-xs">
<Icon className="h-10 w-10 text-indigo-400 mb-4 mx-auto" />
<h3 className="text-xl font-semibold text-white mb-2">{title}</h3>
<p className="text-gray-400">{children}</p>
</div>

View File

@ -34,7 +34,7 @@ const MatrixBackground: React.FC = () => {
connectionDistance: 150,
dotSpeed: 0.3,
hoverRadius: 120,
baseBrightness: 0.25, // Reduced to 30% opacity (0.3 * 0.3)
baseBrightness: 0.3, // Reduced to 30% opacity (0.3 * 0.3)
hoverBrightness: 0.6, // Reduced hover brightness
baseThickness: 0.5,
hoverThickness: 1.5,

View File

@ -0,0 +1,33 @@
import React from 'react';
interface NavButtonProps {
href: string;
children: React.ReactNode;
className?: string;
}
const NavButton: React.FC<NavButtonProps> = ({ href, children, className = '' }) => {
return (
<a
href={href}
className={`
inline-block px-4 py-2
rounded-full
backdrop-blur-sm
bg-gray-800/30
border border-gray-600/50
text-gray-100
hover:bg-gray-700/40
hover:border-gray-500/60
hover:text-white
transition-all duration-300 ease-in-out
cursor-pointer
${className}
`.trim()}
>
{children}
</a>
);
};
export default NavButton;

View File

@ -1,4 +1,5 @@
import React from 'react';
import NavButton from './NavButton';
const Navbar: React.FC = () => {
return (
@ -8,9 +9,9 @@ const Navbar: React.FC = () => {
OpenCand
</a>
<div className="space-x-4">
<a href="#stats" className="hover:text-indigo-300 transition-colors">Estatíscas</a>
<a href="#features" className="hover:text-indigo-300 transition-colors">Recursos</a>
<a href="/about" className="hover:text-indigo-300 transition-colors">Sobre</a>
<NavButton href="#stats">Estatíscas</NavButton>
<NavButton href="#features">Recursos</NavButton>
<NavButton href="/about">Sobre</NavButton>
</div>
</div>
</nav>

View File

@ -10,7 +10,7 @@ interface StatCardProps {
const StatCard: React.FC<StatCardProps> = ({ title, value, description, isLoading = false }) => {
return (
<div className="bg-gray-800/50 backdrop-blur-md p-6 rounded-lg shadow-xl hover:shadow-indigo-500/30 transform hover:-translate-y-1 transition-all duration-300">
<div className="bg-gray-800/10 backdrop-blur-xs p-6 rounded-lg shadow-xl hover:shadow-indigo-500/30 transform hover:-translate-y-1 transition-all duration-300">
<h3 className="text-indigo-400 text-xl font-semibold mb-2">{title}</h3>
{isLoading ? (
<div className="h-12 flex items-center">

View File

@ -18,15 +18,6 @@
-moz-osx-font-smoothing: grayscale;
}
a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
}
a:hover {
color: #535bf2;
}
body {
margin: 0;
padding: 0;