From d770bd3d432b1a19d71d818388634bddb1d68079 Mon Sep 17 00:00:00 2001 From: REHAAANNN <147967435+REHAAANNN@users.noreply.github.com> Date: Sat, 13 Dec 2025 18:29:34 +0530 Subject: [PATCH] feat: enhance homepage with comprehensive information and improved UX - Added hero section with clear project introduction and mission statement - Implemented features grid highlighting key benefits: * Secure & Transparent blockchain voting * Decentralized architecture * Multiple voting algorithms support * Anonymous & private voting with zero-knowledge proofs - Added voting algorithms section explaining: * Borda Count * Instant Runoff Voting (IRV) * Moore's Method * Oklahoma Method - Created 'How It Works' section with 3-step process: 1. Connect wallet 2. Create or join elections 3. Vote & verify on blockchain - Added multiple call-to-action buttons with 'Connect Wallet' prompt - Implemented smooth animations using Framer Motion - Used engaging visuals with icons from Heroicons - Clean white background for professional look - Made fully responsive for mobile, tablet, and desktop - Fixed scrolling issues by updating overflow properties Benefits: - New users immediately understand the platform's purpose - Clear guidance on next steps (connect wallet to start) - Educational content about voting algorithms and blockchain benefits - Professional and user-friendly design - No more blank homepage Resolves #175 --- client/app/components/Pages/HomePage.tsx | 2 +- client/app/components/Pages/LoginPage.tsx | 258 +++++++++++++++++++++- client/app/globals.css | 2 +- 3 files changed, 250 insertions(+), 12 deletions(-) diff --git a/client/app/components/Pages/HomePage.tsx b/client/app/components/Pages/HomePage.tsx index 54aa1ea1..a1b118d5 100644 --- a/client/app/components/Pages/HomePage.tsx +++ b/client/app/components/Pages/HomePage.tsx @@ -5,7 +5,7 @@ import Dashboard from "./Dashboard"; const HomePage = () => { const { isConnected } = useAccount(); return ( -
+
{isConnected ? : }
); diff --git a/client/app/components/Pages/LoginPage.tsx b/client/app/components/Pages/LoginPage.tsx index f3af82ce..8d1e7e2c 100644 --- a/client/app/components/Pages/LoginPage.tsx +++ b/client/app/components/Pages/LoginPage.tsx @@ -1,16 +1,254 @@ +"use client"; import React from "react"; -import AossieImg from "../../../public/aossie.png"; +import Image from "next/image"; +import { motion } from "framer-motion"; +import { ConnectButton } from "@rainbow-me/rainbowkit"; +import { + ShieldCheckIcon, + LockClosedIcon, + ChartBarIcon, + UserGroupIcon, + CheckBadgeIcon, + ArrowRightIcon, +} from "@heroicons/react/24/outline"; + const LoginPage = () => { + const features = [ + { + icon: ShieldCheckIcon, + title: "Secure & Transparent", + description: + "Blockchain technology ensures every vote is immutable and verifiable, preventing tampering and fraud.", + }, + { + icon: LockClosedIcon, + title: "Decentralized Voting", + description: + "No central authority controls the voting process. Your vote is stored on the blockchain forever.", + }, + { + icon: ChartBarIcon, + title: "Multiple Algorithms", + description: + "Support for various voting methods including Borda Count, Instant Runoff Voting (IRV), and Moore's method.", + }, + { + icon: UserGroupIcon, + title: "Anonymous & Private", + description: + "Zero-knowledge proofs ensure your vote remains private while maintaining the integrity of the election.", + }, + ]; + + const votingMethods = [ + { + name: "Borda Count", + description: "Ranked voting where candidates receive points based on their position in each voter's ranking.", + }, + { + name: "Instant Runoff (IRV)", + description: "Voters rank candidates by preference, and the candidate with majority support wins.", + }, + { + name: "Moore's Method", + description: "A Condorcet method that selects the candidate who wins the most pairwise comparisons.", + }, + { + name: "Oklahoma Method", + description: "A unique voting algorithm designed for fair representation in multi-candidate elections.", + }, + ]; + return ( -
+
+ {/* Hero Section */} +
+ +
+ AOSSIE Logo +
+ +

+ Welcome to{" "} + + Agora Blockchain + +

+ +

+ The Future of Decentralized Voting - Secure, Transparent, and Tamper-Proof +

+ +

+ Agora Blockchain brings democratic voting to Web3, leveraging blockchain technology to ensure every vote + is recorded immutably and transparently. Say goodbye to election fraud and hello to true democracy. +

+ + {/* CTA Button */} + +
+
+ + {({ account, chain, openConnectModal, mounted }) => { + return ( + + ); + }} + +
+
+
+ +

+ Connect your wallet to create elections, vote, and explore blockchain-based democracy +

+
+ + {/* Features Grid */} + +

+ Why Choose Agora Blockchain? +

+ +
+ {features.map((feature, index) => ( + +
+ +
+

{feature.title}

+

{feature.description}

+
+ ))} +
+
+ + {/* Voting Methods Section */} + +

+ Supported Voting Algorithms +

+

+ Choose from multiple proven voting algorithms to ensure fair and accurate election results +

+ +
+ {votingMethods.map((method, index) => ( + +
+ +
+

{method.name}

+

{method.description}

+
+
+
+ ))} +
+
+ + {/* How It Works Section */} + +

How It Works

+ +
+
+
+ 1 +
+

Connect Your Wallet

+

+ Use MetaMask or any Web3 wallet to securely connect to the platform +

+
+ +
+
+ 2 +
+

Create or Join Elections

+

+ Create your own election or participate in existing ones with various voting algorithms +

+
+ +
+
+ 3 +
+

Vote & Verify

+

+ Cast your vote securely and verify it on the blockchain - tamper-proof forever +

+
+
+
+ + {/* Final CTA */} + +

+ Ready to experience the future of democratic voting? +

+
+ +
+
+
+
); }; diff --git a/client/app/globals.css b/client/app/globals.css index c898587a..0b3a94c9 100644 --- a/client/app/globals.css +++ b/client/app/globals.css @@ -5,7 +5,7 @@ body { background-color: #ffffff; margin: 0; - overflow: hidden; + overflow-y: auto; } html {