Skip to content

Commit ed19504

Browse files
committed
Create Right to Trial Act components
Add components for displaying the Right to Trial Act, including headers, navigation, cards, and sections for overview, platform, access, and incentives. Implement petition signing and GitHub edit features to allow user interaction and contributions. Took 39 seconds
1 parent e9ba4c7 commit ed19504

File tree

7 files changed

+544
-0
lines changed

7 files changed

+544
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'use client'
2+
3+
import { SignPetitionButton } from './SignPetitionButton'
4+
5+
export function FloatingPetitionButton() {
6+
return (
7+
<div className="fixed bottom-8 right-8 z-50">
8+
<SignPetitionButton />
9+
</div>
10+
)
11+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
'use client'
2+
3+
import { FaGithub } from 'react-icons/fa'
4+
5+
export function GitHubEditButton() {
6+
return (
7+
<a
8+
href="https://github.com/wishonia/wishonia/edit/main/content/globalSolutions/dfda/right-to-trial-act-1.md"
9+
target="_blank"
10+
rel="noopener noreferrer"
11+
className="inline-flex items-center gap-2 px-6 py-3 text-lg font-bold
12+
bg-[#f0ebea] text-black rounded-none
13+
border-4 border-black shadow-[4px_4px_0px_0px_rgba(0,0,0,1)]
14+
hover:translate-x-[3px] hover:translate-y-[3px] hover:shadow-none
15+
transition-all duration-200
16+
focus:outline-none"
17+
>
18+
<FaGithub className="text-2xl" />
19+
<span className="font-mono uppercase tracking-wider">
20+
Make Improvements
21+
</span>
22+
</a>
23+
)
24+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
'use client'
2+
3+
import { SignPetitionButton } from './SignPetitionButton'
4+
5+
export function PetitionSection() {
6+
return (
7+
<div className="mb-16 text-center">
8+
<h2 className="text-4xl font-black mb-6 font-mono text-black">Show Your Support</h2>
9+
<p className="text-xl mb-8 text-black">
10+
Sign the petition to support the Right to Trial Act and help end the suffering of billions of people.
11+
</p>
12+
<SignPetitionButton />
13+
</div>
14+
)
15+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
'use client'
2+
3+
import { useSession, signIn } from 'next-auth/react'
4+
import { Button } from '@/components/ui/button'
5+
6+
export function SignPetitionButton() {
7+
const { data: session } = useSession()
8+
9+
const handleClick = async () => {
10+
if (!session) {
11+
signIn()
12+
return
13+
}
14+
// TODO: Implement petition signing
15+
console.log('Signing petition...')
16+
}
17+
18+
return (
19+
<Button
20+
onClick={handleClick}
21+
className="bg-black hover:bg-gray-800 text-white font-bold py-4 px-8 text-xl
22+
border-[4px] border-black shadow-[4px_4px_0px_0px_rgba(0,0,0,1)]
23+
hover:translate-x-[3px] hover:translate-y-[3px] hover:shadow-none
24+
transition-all duration-200"
25+
>
26+
{session ? 'Sign the Petition' : 'Sign in to Sign Petition'}
27+
</Button>
28+
)
29+
}

0 commit comments

Comments
 (0)