Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added become a sponsor, volunteer and partner buttons. #181

Merged
merged 2 commits into from
Oct 5, 2024
Merged
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: 5 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ API_URL=http://djangoindia-backend:8000/api/v1
# Client-side URL (prefixed with NEXT_PUBLIC_)
NEXT_PUBLIC_API_URL=http://localhost:8000/api/v1
NEXT_PUBLIC_FRONTEND_URL=http://localhost:3000
NEXT_PUBLIC_NODE_ENV=development
NEXT_PUBLIC_NODE_ENV=development

COMMUNITY_PARTNER_FORM =
SPONSOR_FORM =
EVENT_VOLUNTEER_FORM =
DevilsAutumn marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const REGISTER_FORM_FIELDS: (FieldType | Array<FieldType>)[] = [
[
{
name: 'include_in_attendee_list',
label: 'I would like to be included in the attendee list',
label: "I would like to be included in the attendee's list",
placeholder: '',
type: 'checkbox',
},
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/containers/RegisterEvent/RegisterEvent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export const RegisterEvent = ({ eventId, seats_left, registration_end_date }: {
{...rest}
>
<form
className='sm:w-2/4 w-5/6 flex flex-col mx-auto gap-6 mt-10 h-full' // Added h-full and overflow-y-auto
className='sm:w-2/4 w-5/6 flex flex-col mx-auto gap-6 mt-10 h-full'
onSubmit={handleSubmit(onSubmit)}
>
{REGISTER_FORM_FIELDS.map((item, i) =>
Expand All @@ -146,11 +146,11 @@ export const RegisterEvent = ({ eventId, seats_left, registration_end_date }: {
render={({ field }) => (
<FormItem>
{type === 'checkbox' ? (
<div className='flex items-center gap-2'>
<FormLabel>{label}</FormLabel>
<div className='flex items-center gap-0'>
<FormControl>
<Input type='checkbox' onChange={field.onChange} />
</FormControl>
<FormLabel className='mb-0'>{label}</FormLabel>
</div>
):(
<>
Expand Down
26 changes: 24 additions & 2 deletions frontend/src/sections/CommunityPartners/CommunityPartners.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
'use client';
import React from 'react';
import Image from 'next/image';
import { Button } from '@components'
import Link from 'next/link';
import { FaArrowRight } from "react-icons/fa";

type Partner = {
name?: string;
Expand All @@ -17,15 +19,35 @@ const CommunityPartners: React.FC<CommunityPartnersProps> = ({ partners = [] })
if (partners.length === 0) {
return (
<div className='flex flex-col items-left justify-left py-10'>
<h4 className='text-2xl font-bold'>Community Partners</h4>
<div className='flex items-center'>
<h4 className='text-2xl font-bold'>Community Partners</h4>
<Link href={process.env.COMMUNITY_PARTNER_FORM || '#'} target='_blank' passHref>
<Button className='ml-2 group transition-all linear overflow-hidden'>
<span className='w-0 group-hover:w-auto overflow-hidden whitespace-nowrap transition-all linear'>
Become a community partner
</span>
<FaArrowRight className='ml-0 group-hover:ml-2 transition-all linear' />
</Button>
</Link>
</div>
<p className='text-gray-500 mt-4'>No community partners are available at the moment.</p>
</div>
);
}

return (
<div className='flex flex-col gap-6 py-10'>
<h4 className='text-2xl font-bold flex items-center'>Community Partners</h4>
<div className='flex items-center'>
<h4 className='text-2xl font-bold'>Community Partners</h4>
<Link href={process.env.COMMUNITY_PARTNER_FORM || '#'} target='_blank' passHref>
<Button className='ml-2 group transition-all linear overflow-hidden'>
<span className='w-0 group-hover:w-auto overflow-hidden whitespace-nowrap transition-all linear'>
Become a community partner
</span>
<FaArrowRight className='ml-0 group-hover:ml-2 transition-all linear' />
</Button>
</Link>
</div>
<p className='font-medium text-gray-700'>
We are proud to collaborate with our community partners who share our vision of making Django famous in India.
</p>
Expand Down
26 changes: 24 additions & 2 deletions frontend/src/sections/EventSponsors/EventSponsors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
import Image from 'next/image';
import React from 'react';
import splitAndCapitalize from '../../utils/formatKey'
import { Button } from '@components'
import Link from 'next/link';
import { FaArrowRight } from "react-icons/fa";

type SponsorDetails = {
name?: string;
Expand Down Expand Up @@ -82,7 +84,17 @@ const EventSponsors: React.FC<EventSponsorsProps> = ({ sponsors = [] }) => {
if (sponsors.length === 0) {
return (
<div className='flex flex-col items-left justify-left py-10'>
<h4 className='text-2xl font-bold'>Event Sponsors</h4>
<div className='flex items-center'>
<h4 className='text-2xl font-bold'>Event Sponsors</h4>
<Link href={process.env.SPONSOR_FORM || '#'} target='_blank' passHref>
<Button className='ml-2 group transition-all linear overflow-hidden'>
<span className='w-0 group-hover:w-auto overflow-hidden whitespace-nowrap transition-all linear'>
Become a sponsor
</span>
<FaArrowRight className='ml-0 group-hover:ml-2 transition-all linear' />
</Button>
</Link>
</div>
<p className='text-gray-500 mt-4'>No sponsors are available at the moment.</p>
</div>
);
Expand Down Expand Up @@ -113,7 +125,17 @@ const EventSponsors: React.FC<EventSponsorsProps> = ({ sponsors = [] }) => {

return (
<div className='flex flex-col gap-6 py-10'>
<h4 className='text-2xl font-bold flex items-center'>Event Sponsors</h4>
<div className='flex items-center'>
<h4 className='text-2xl font-bold'>Event Sponsors</h4>
<Link href={process.env.SPONSOR_FORM || '#'} target='_blank' passHref>
<Button className='ml-2 group transition-all linear overflow-hidden'>
<span className='w-0 group-hover:w-auto overflow-hidden whitespace-nowrap transition-all linear'>
Become a sponsor
</span>
<FaArrowRight className='ml-0 group-hover:ml-2 transition-all linear' />
</Button>
</Link>
</div>
<p className='font-medium'>
Support the Django India community and connect with a passionate, skilled audience. Join us in driving innovation and making an impact within the Django ecosystem.
</p>
Expand Down
28 changes: 25 additions & 3 deletions frontend/src/sections/EventVolunteers/EventVolunteers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
import React from 'react';
import Image from 'next/image';
import { FaTwitter, FaLinkedin, FaEnvelope } from 'react-icons/fa';
import account from '../../../public/account.png';
import account from '../../../public/account.png'
import { Button } from '@components'
import Link from 'next/link';
import { FaArrowRight } from "react-icons/fa";

type Volunteer = {
name?: string;
Expand All @@ -22,15 +24,35 @@ const EventVolunteers: React.FC<EventVolunteersProps> = ({ volunteers = [] }) =>
if (volunteers.length === 0) {
return (
<div className='flex flex-col items-left justify-left py-10'>
<h4 className='text-2xl font-bold'>Event Volunteers</h4>
<div className='flex items-center'>
<h4 className='text-2xl font-bold'>Event Volunteers</h4>
<Link href={process.env.EVENT_VOLUNTEER_FORM || '#'} target='_blank' passHref>
<Button className='ml-2 group transition-all linear overflow-hidden'>
<span className='w-0 group-hover:w-auto overflow-hidden whitespace-nowrap transition-all linear'>
Become a volunteer
</span>
<FaArrowRight className='ml-0 group-hover:ml-2 transition-all linear' />
</Button>
</Link>
</div>
<p className='text-gray-500 mt-4'>No volunteers are available at the moment.</p>
</div>
);
}

return (
<div className='flex flex-col gap-8 py-10'>
<h4 className='text-2xl font-bold'>Event Volunteers</h4>
<div className='flex items-center'>
<h4 className='text-2xl font-bold'>Event Volunteers</h4>
<Link href={process.env.EVENT_VOLUNTEER_FORM || '#'} target='_blank' passHref>
DevilsAutumn marked this conversation as resolved.
Show resolved Hide resolved
<Button className='ml-2 group transition-all linear overflow-hidden'>
<span className='w-0 group-hover:w-auto overflow-hidden whitespace-nowrap transition-all linear'>
Become a volunteer
</span>
<FaArrowRight className='ml-0 group-hover:ml-2 transition-all linear' />
</Button>
</Link>
</div>
<p className='font-medium text-gray-700'>
Our volunteers are the heart of this event, working behind the scenes to make everything run seamlessly.
</p>
Expand Down