Skip to content
Open

psh #18

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Electhon - 2023

#### Team Name -
#### Team Name - Technocracy
#### Problem Statement -
#### Team Leader Email -
#### Team Leader Email - maazngcc@gmail.com

## A Brief of the Prototype:
What is your solution? and how it works.
Our goal is to develop an interface/website that rates a user's participation in election activities. This includes creating a leaderboard that ranks users and assigns badges, providing them with a sense of pride and satisfaction.
To increase confidence in the election process, we aim to develop a modern electronic voting machine (EVM) that is connected to a network of EVMs. This will provide real-time updates and vote counting, reducing vote tampering and ensuring instant results.

## Code Execution Instruction:
*[If your solution is **not** application based, you can ignore this para]
Expand Down
23 changes: 23 additions & 0 deletions electhon/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
70 changes: 70 additions & 0 deletions electhon/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.

The page will reload when you make changes.\
You may also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can't go back!**

If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.

You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

### Code Splitting

This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)

### Analyzing the Bundle Size

This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)

### Making a Progressive Web App

This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)

### Advanced Configuration

This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)

### Deployment

This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)

### `npm run build` fails to minify

This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
18 changes: 18 additions & 0 deletions electhon/components/About.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react'

function About() {
return (
<>
<br />
<br />
<center>
<div className='text-5xl font-serif w-5/6'><h1>About Us</h1>
<p className='text-3xl pt-8'>
"Hello and welcome to our team's page! We are a group of four tech enthusiasts who share a passion for innovation and problem-solving. We come from diverse backgrounds, each bringing our unique skillsets to the table. Our team is driven by a common goal to create technology that makes a positive impact on society. With our combined expertise in software development, hardware engineering, and design, we are excited to take on the challenges presented by the hackathon and create a cutting-edge solution. Thank you for your interest in our team and stay tuned for more updates on our progress!"
</p></div>
</center>
</>
)
}

export default About
40 changes: 40 additions & 0 deletions electhon/components/Activities.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React from 'react'

function Activities() {
return (
<div>
<center>
<div>
<br />
<br />
<h1 className='text-5xl font-serif font-bold'>
Activities
</h1>
<div>
<br />
<p className='text-3xl'>1.Registering to vote (5Pts)</p>
<br />
<p className='text-3xl'>2.Casting a vote (10Pts)</p>
<br />
<p className='text-3xl'>3.Recruiting friends and family to register and vote (7Pts)</p>
<br />
<p className='text-3xl'>4.Sharing information about the election on social media (7Pts)</p>
<br />
<p className='text-3xl'>5.Participating in political surveys or polls (6Pts)</p>
<br />
<p className='text-3xl'>6.Volunteering at a polling station or for a political campaign (5Pts)</p>
<br />
</div>
<br />
<br />
<br />
<div className='text-5xl font-extrabold'>
"Become a driving a force in your community by participating in electoral process and climbs the ranks of a dynamic leader board"
</div>
</div>
</center>
</div>
)
}

export default Activities
153 changes: 153 additions & 0 deletions electhon/components/Carousel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
import React from 'react'
import Table from './Table'
import first from '../img/first.jpeg'
import second from '../img/second.jpeg'
import third from '../img/third.jpeg'

function Carousel() {
return (
<>
<center>
<br />
<div
id="carouselExampleCaptions"
className="relative w-5/6 border-double border-8 border-gray-400"
data-te-carousel-init
data-te-carousel-slide>
<div
className="absolute bottom-0 left-0 right-0 z-[2] mx-[15%] mb-4 flex list-none justify-center p-0"
data-te-carousel-indicators>
<button
type="button"
data-te-target="#carouselExampleCaptions"
data-te-slide-to="0"
data-te-carousel-active
className="mx-[3px] box-content h-[3px] w-[30px] flex-initial cursor-pointer border-0 border-y-[10px] border-solid border-transparent bg-white bg-clip-padding p-0 -indent-[999px] opacity-50 transition-opacity duration-[600ms] ease-[cubic-bezier(0.25,0.1,0.25,1.0)] motion-reduce:transition-none"
aria-current="true"
aria-label="Slide 1"></button>
<button
type="button"
data-te-target="#carouselExampleCaptions"
data-te-slide-to="1"
className="mx-[3px] box-content h-[3px] w-[30px] flex-initial cursor-pointer border-0 border-y-[10px] border-solid border-transparent bg-white bg-clip-padding p-0 -indent-[999px] opacity-50 transition-opacity duration-[600ms] ease-[cubic-bezier(0.25,0.1,0.25,1.0)] motion-reduce:transition-none"
aria-label="Slide 2"></button>
<button
type="button"
data-te-target="#carouselExampleCaptions"
data-te-slide-to="2"
className="mx-[3px] box-content h-[3px] w-[30px] flex-initial cursor-pointer border-0 border-y-[10px] border-solid border-transparent bg-white bg-clip-padding p-0 -indent-[999px] opacity-50 transition-opacity duration-[600ms] ease-[cubic-bezier(0.25,0.1,0.25,1.0)] motion-reduce:transition-none"
aria-label="Slide 3"></button>
</div>
<div
className="relative w-full overflow-hidden after:clear-both after:block after:content-['']">
<div
className="relative float-left -mr-[100%] w-full transition-transform duration-[600ms] ease-in-out motion-reduce:transition-none"
data-te-carousel-active
data-te-carousel-item
align="backface-visibility: hidden">
<img
src={third}
className="block w-full"
alt="..." />
</div>
<div
className="relative float-left -mr-[100%] hidden w-full transition-transform duration-[600ms] ease-in-out motion-reduce:transition-none"
data-te-carousel-item
align="backface-visibility: hidden">
<img
src={first}
className="block w-full"
alt="..." />
</div>
<div
className="relative float-left -mr-[100%] hidden w-full transition-transform duration-[600ms] ease-in-out motion-reduce:transition-none"
data-te-carousel-item
align="backface-visibility: hidden">
<img
src={second}
className="block w-full"
alt="..." />
</div>
</div>
<button
className="absolute bottom-0 left-0 top-0 z-[1] flex w-[15%] items-center justify-center border-0 bg-none p-0 text-center opacity-50 transition-opacity duration-150 ease-[cubic-bezier(0.25,0.1,0.25,1.0)] hover:text-white hover:no-underline hover:opacity-90 hover:outline-none focus:no-underline focus:opacity-90 focus:outline-none motion-reduce:transition-none"
type="button"
data-te-target="#carouselExampleCaptions"
data-te-slide="prev">
<span className="inline-block h-8 w-8">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth="1.5"
stroke="currentColor"
className="h-6 w-6">
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M15.75 19.5L8.25 12l7.5-7.5" />
</svg>
</span>
<span
className="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)">Previous</span>
</button>
<button
className="absolute bottom-0 right-0 top-0 z-[1] flex w-[15%] items-center justify-center border-0 bg-none p-0 text-center opacity-50 transition-opacity duration-150 ease-[cubic-bezier(0.25,0.1,0.25,1.0)] hover:text-white hover:no-underline hover:opacity-90 hover:outline-none focus:no-underline focus:opacity-90 focus:outline-none motion-reduce:transition-none"
type="button"
data-te-target="#carouselExampleCaptions"
data-te-slide="next">
<span className="inline-block h-8 w-8">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth="1.5"
stroke="currentColor"
className="h-6 w-6">
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M8.25 4.5l7.5 7.5-7.5 7.5" />
</svg>
</span>
<span
className="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]">Next</span>
</button>
</div>
</center>


<br />
<br />
<center>
<div className='bg-sky-200 rounded-full w-5/6'>
<h1 className='text-5xl font-serif pt-3'>"Join the ranks of responsible voters-register now"</h1>
<br />
<br />
<button className='rounded-full bg-sky-500 text-white text-3xl px-4 py-4 animate-bounce font-serif' >Call To Action</button>
</div>
</center>
<br />
<br />
<center>
<div className='w-5/6'>
<hr />
</div>
</center>
<br />
<center>
<h1 className='text-5xl w-5/6 pt-8 font-Helvetica'>
Our Leadership is more than just a ranking system-it's community of people who care about making their voice heard and shaping the future of our society.
</h1>
</center>

<center>
<div className='w-5/6 py-16'>
<Table />
</div>
</center>
</>
)
}
export default Carousel

39 changes: 39 additions & 0 deletions electhon/components/Demoboard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React, { useState } from "react";
import { useEffect } from "react";
const Demoboard = () => {
const [rank, setRank] = useState([]);
useEffect(() => {
getData();
}, []);

async function getData() {
const data = await fetch("http://localhost:5000/user/getall");
const c = await data.json();
setRank(c.feed.slice(0, 4));
}

const renderList = rank.map((item, index) => (
// <div key={index}>{item.title}<img src={item.banner_image}></img></div>
<tr className="border-b dark:border-neutral-500">
<td className="whitespace-nowrap px-6 py-4 font-medium">1</td>
<td className="whitespace-nowrap px-6 py-4">{item.name}</td>
<td className="whitespace-nowrap px-6 py-4">{item.totalPoints}</td>
<td className="whitespace-nowrap px-6 py-4">silver</td>
</tr>
));
/////////////////////////////////
// <tr className="border-b dark:border-neutral-500">
// <td className="whitespace-nowrap px-6 py-4 font-medium">3</td>
// <td className="whitespace-nowrap px-6 py-4">Larry</td>
// <td className="whitespace-nowrap px-6 py-4">Wild</td>
// <td className="whitespace-nowrap px-6 py-4">@twitter</td>
// </tr>
/////////////////////////////////
return (
<>
{renderList}
</>
)
}

export default Demoboard
Loading