Skip to content

Commit

Permalink
Merge pull request #67 from zwenie-tech/resultpage
Browse files Browse the repository at this point in the history
Resultpage
  • Loading branch information
Rohith272 authored Aug 18, 2024
2 parents b72d530 + df78f42 commit 7009fba
Show file tree
Hide file tree
Showing 37 changed files with 125 additions and 101 deletions.
2 changes: 1 addition & 1 deletion src/app/Instruction/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Instruction = () => {
return (
<>
<NavigationBar/>
<div className="flex justify-center items-center" style={{ marginTop: '50px' }}>
<div className="flex justify-center items-center mt-6 mb-3">
<h1 className="text-3xl font-bold">വിത്തുകള് നടുന്ന വിധം</h1>
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/app/Join/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const JoinNow = () => {
return (
<div>
<Navigation />
<div className="flex justify-center items-center" style={{ marginTop: '40px', height: '60px' }}>
<div className="flex justify-center items-center mt-6" style={{ height: '60px' }}>
<h1 className="text-4xl font-bold text-center item-center" >ഹരിത കേരളം വൃക്ഷത്തൈ പരിപാലന മത്സരം.</h1>
</div>
<div className="mt-8 flex justify-center items-center" >
Expand Down
2 changes: 1 addition & 1 deletion src/app/Latest/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface NewsCardProps {

const NewsCard: React.FC<NewsCardProps> = ({ title, image, smallHeading, paragraph }) => {
return (
<div className="flex flex-col p-4 mb-6 shadow-md rounded-lg bg-light-gray">
<div className="flex flex-col p-4 mb-6 shadow-md rounded-lg bg-light-gray mt-6">
<h2 className="text-xl font-bold mb-2">{title}</h2>
<div className="flex">
<img src={image} alt="news" className="w-1/3 object-cover mr-4 rounded-lg" />
Expand Down
2 changes: 1 addition & 1 deletion src/app/about-us/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const AboutUs = () => {
return (
<>
<NavigationBar />
<div className="flex justify-center items-center mt-10">
<div className="flex justify-center items-center mt-6 m-3">
<h1 className="text-3xl font-bold text-center">About Us</h1>
</div>
<div className="bg-[#D9E4C1] p-10 text-center">
Expand Down
2 changes: 1 addition & 1 deletion src/app/competition/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Competition = () => {
return (
<div>
<NavigationBar />
<div className="mt-7 flex justify-center items-center">
<div className="mt-6 mb-3 flex justify-center items-center">
<h1 className="text-4xl font-bold text-center items-center">Competition</h1>
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/app/contact/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const Contact = () => {
return (
<main className='min-h-screen flex flex-col'>
<NavigationBar/>
<div className='mx-2'>
<div className='mx-2 mt-2'>
<PageTitle title='Get in touch with us' />
<div className="mx-4 mb-10 flex flex-col gap-4 md:flex md:flex-row-reverse">
<div className='mx-8'>
Expand Down
4 changes: 2 additions & 2 deletions src/app/coordinator-dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ function CoordinatorDashBoardContent() {
<div className="bg-green-50 dark:bg-gray-900">
<NavigationBar />

<div className="container mx-auto md:max-w-5xl min-h-screen mt-4">
<h1 className="text-3xl my-4 font-bold mt-8 pb-4 border-b-2">Coordinator Dashboard</h1>
<div className="container mx-auto md:max-w-5xl min-h-screen mt-6">
<h1 className="text-3xl my-4 font-bold pb-4 border-b-2 mb-3">Coordinator Dashboard</h1>
<p>താഴെക്കൊടുത്ത ലിങ്ക് കോപ്പി ചെയ്തു എല്ലാ ക്ലാസ് ടീച്ചർമാർക്കും അയച്ചു കൊടുക്കുക.
അവരോട് സ്വന്തം മൊബൈൽ നമ്പറും പേരും വെച്ച് ക്ലാസിന്റെ പേരിൽ രജിസ്റ്റർ ചെയ്യുവാൻ പറയുക.
യൂസർനേമും പാസ്സ്‌വേർഡും എല്ലാ കുട്ടികൾക്കും അയച്ചു കൊടുക്കുവാനും പറയുക.
Expand Down
6 changes: 3 additions & 3 deletions src/app/dashboard/dashboard-PlantUploads/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ const PlantuploadContent = () => {
<>
<NavigationBar />
<div className='relative flex p-4'>
<div className='absolute left-1/2 transform -translate-x-1/2 w-full md:w-auto'>
<h1 className='text-2xl m-3 text-left md:text-center md:text-4xl font-bold'>Dashboard</h1>
<div className='absolute left-1/2 transform -translate-x-1/2 w-full md:w-auto mt-3'>
<h1 className='text-xl mb-3 text-left md:text-center md:text-xl font-bold'>Dashboard</h1>
</div>
<div className='ml-auto'>
<button
Expand All @@ -104,7 +104,7 @@ const PlantuploadContent = () => {
</div>
</div>
<div className='text-center'>
<h1 className='text-xl mt-2 font-bold'>Our Plant Uploads</h1>
<h1 className='text-3xl mt-2 font-bold'>Our Plant Uploads</h1>
</div>
<div className="container mx-auto p-6">
<div className="overflow-x-auto">
Expand Down
6 changes: 3 additions & 3 deletions src/app/dashboard/dashboard-activities/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ const DashboardActivity = () => {
<>
<NavigationBar />
<div className='relative flex p-4'>
<div className='absolute left-1/2 transform -translate-x-1/2 w-full md:w-auto'>
<h1 className='text-2xl m-3 text-left md:text-center md:text-4xl font-bold'>Dashboard</h1>
<div className='absolute left-1/2 transform -translate-x-1/2 w-full md:w-auto mt-3'>
<h1 className='text-xl mb-3 text-left md:text-center md:text-xl font-bold'>Dashboard</h1>
</div>
<div className='ml-auto'>
<button
Expand All @@ -102,7 +102,7 @@ const DashboardActivity = () => {
</div>
</div>
<div className='text-center'>
<h1 className='text-xl mt-2 font-bold'>Our Activities</h1>
<h1 className='text-3xl mt-2 font-bold'>Our Activities</h1>
</div>

{/* Table */}
Expand Down
6 changes: 3 additions & 3 deletions src/app/dashboard/dashboard-userlist/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ const DashboardUserList = () => {
<>
<NavigationBar />
<div className='relative flex p-4'>
<div className='absolute left-1/2 transform -translate-x-1/2 w-full md:w-auto'>
<h1 className='text-2xl m-3 text-left md:text-center md:text-4xl font-bold'>Dashboard</h1>
<div className='absolute left-1/2 transform -translate-x-1/2 w-full md:w-auto mt-3 mb-3'>
<h1 className='text-xl text-left md:text-center md:text-xl font-bold'>Dashboard</h1>
</div>
<div className='ml-auto'>
<button
Expand All @@ -95,7 +95,7 @@ const DashboardUserList = () => {
</div>
</div>
<div className='text-center'>
<h1 className='text-xl mt-2 font-bold'>Users List</h1>
<h1 className='text-3xl mt-2 font-bold'>Users List</h1>
</div>

<div className="container mx-auto p-4">
Expand Down
2 changes: 1 addition & 1 deletion src/app/dashboard/details-edit/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ const DetailsEdit: React.FC = () => {
return (
<>
<NavigationBar />
<div className="container w-full justify-center">
<div className="container w-full justify-center mt-6">
<div className="md:flex gap-6">
{/* Form 1 */}
<Form {...form}>
Expand Down
6 changes: 3 additions & 3 deletions src/app/dashboard/invite-institute/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ const Invite: React.FC = () => {
<>
<NavigationBar />
<div className='relative flex flex-col md:flex-row md:justify-between p-4'>
<div className='md:absolute md:left-1/2 md:transform md:-translate-x-1/2 w-full md:w-auto'>
<h1 className='text-2xl m-3 text-left md:text-center md:text-4xl font-bold'>Dashboard</h1>
<div className='md:absolute md:left-1/2 md:transform md:-translate-x-1/2 w-full md:w-auto mt-6 mb-3'>
<h1 className='text-xl m-2 text-left md:text-center md:text-xl font-bold'>Dashboard</h1>
</div>
<div className='ml-auto md:mr-0 md:mt-0 mt-4'>
<button
Expand All @@ -95,7 +95,7 @@ const Invite: React.FC = () => {
</div>
</div>
<div className='text-center'>
<h1 className='text-xl mt-2 font-bold'>Invite Institution</h1>
<h1 className='text-3xl mt-2 font-bold'>Invite Institution</h1>
</div>
<div className="container mx-auto p-6">
<div className="overflow-x-auto">
Expand Down
2 changes: 1 addition & 1 deletion src/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const Dashboard=()=>{
<div style={{background: 'rgba(3, 18, 20, 0.1)'}}>
<NavigationBar/>
<div className='relative flex items-center p-4'>
<div className='absolute left-1/2 transform -translate-x-1/2'>
<div className='absolute left-1/2 mt-6 mb-3 transform -translate-x-1/2'>
<h1 className='text-xl font-bold'>Dashboard</h1>
</div>
<div className='ml-auto'>
Expand Down
6 changes: 3 additions & 3 deletions src/app/dashboard/youtube-earnings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ const DashboardActivity = () => {
return (
<>
<NavigationBar />
<div className='relative flex p-4'>
<div className='relative flex p-4mt-6 mb-3'>
<div className='absolute left-1/2 transform -translate-x-1/2 w-full md:w-auto'>
<h1 className='text-2xl m-3 text-left md:text-center md:text-4xl font-bold'>Dashboard</h1>
<h1 className='text-xl text-left md:text-center md:text-xl font-bold'>Dashboard</h1>
</div>
<div className='ml-auto'>
<button
Expand All @@ -105,7 +105,7 @@ const DashboardActivity = () => {
</div>
</div>
<div className='text-center'>
<h1 className='text-xl mt-2 font-bold'>Youtube earnings</h1>
<h1 className='text-3xl mt-2 font-bold'>Youtube earnings</h1>
</div>
{/* Table */}
<div className="container mx-auto p-6">
Expand Down
2 changes: 1 addition & 1 deletion src/app/district/district-page/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const ButtonDisplayFn: React.FC = () => {
return (
<div>
<NavigationBar />
<div className='w-full flex flex-col items-center gap-4'>
<div className='w-full flex flex-col items-center gap-4 mt-6'>
<div className='w-full flex justify-between items-center gap-3 '>
<p className='text-right font-bold w-1/2'>District Name:</p>
<p className='w-1/2 font-bold'>{dname}</p>
Expand Down
2 changes: 1 addition & 1 deletion src/app/district/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const DistrictPage = () => {
<>
<NavigationBar />
<div className='justify-center sw-full md:w-auto'>
<h1 className='m-3 text-center text-2xl font-bold'>District List</h1>
<h1 className='mt-6 mb-3 text-center text-2xl font-bold'>District List</h1>
</div>
<div className="w-3/4 mx-auto flex justify-center items-center p-7">
<p className="text-center">
Expand Down
2 changes: 1 addition & 1 deletion src/app/events/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const Events = () => {
return (
<main className='min-h-screen flex flex-col'>
<NavigationBar />
<div className='mx-2'>
<div className='mx-2 mt-6'>
<PageTitle title='Events and News' />
<div className="flex flex-col gap-4">
<div className="">
Expand Down
2 changes: 1 addition & 1 deletion src/app/faq/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Faq = () => {
return (
<main className='min-h-screen flex flex-col'>
<NavigationBar/>
<div>
<div className='mt-6'>
<PageTitle title='FAQ' />
<div className="max-w-screen-xl mx-auto p-4 mb-6">
<Accordion type="single" collapsible className='flex flex-col gap-6'>
Expand Down
2 changes: 1 addition & 1 deletion src/app/group-list/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const GroupList = () => {
return (
<>
<NavigationBar />
<div className='justify-center sw-full md:w-auto'>
<div className='justify-center sw-full md:w-auto mt-6'>
<h1 className='m-3 text-center text-2xl font-bold'>Group List</h1>
</div>
<div className='border border-black m-5 p-7 rounded-lg'>
Expand Down
2 changes: 1 addition & 1 deletion src/app/group-page/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const ButtonDisplayFn: React.FC = () => {
return (
<div>
<NavigationBar />
<div className="w-full flex flex-col items-center gap-4">
<div className="w-full flex flex-col items-center gap-4 mt-6">
<div className="w-full flex justify-between items-center gap-3 ">
<p className="text-right font-bold w-1/2">Group Name:</p>
<p className="w-1/2 font-bold">{grpname}</p>
Expand Down
2 changes: 1 addition & 1 deletion src/app/participant-list/page copy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const ParticipantList: React.FC = () => {
return (
<div className="">
<Navigationbar />
<div>
<div className="mt-6 mb-3">
<h1 className="text-2xl my-4 text-center font-bold">Participant List</h1>
</div>
<div className="m-2 flex justify-center items-center space-x-4">
Expand Down
110 changes: 65 additions & 45 deletions src/app/participant-list/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const ParticipantList: React.FC = () => {
const [currentPage, setCurrentPage] = useState(1);
const [totalPages, setTotalPages] = useState(1);
const itemsPerPage = 10;
const [challenge,setchallenge]=useState(false)


useEffect(() => {
Expand Down Expand Up @@ -71,7 +72,7 @@ const ParticipantList: React.FC = () => {
return (
<div className="">
<Navigationbar />
<div>
<div className="mt-6 mb-3">
<h1 className="text-2xl my-4 text-center font-bold">Participant List</h1>
</div>
<div className="m-2 flex justify-center items-center space-x-4">
Expand All @@ -87,55 +88,74 @@ const ParticipantList: React.FC = () => {
Old participants
</a>
</div>
{
participants ? (
<div className="participant-container">
{participants.map((participant) => (
<div key={participant.up_id} className="participant-item" style={{ maxHeight: '400px', boxSizing: 'border-box' }}>
<Link
href={{
pathname: 'participant-list/item',
query: { id: participant.up_id },
}}
>
<div className="rounded-lg shadow-lg border p-1 hover:shadow-2xl hover:border-gray-400 h-full flex flex-col">
<img
className="w-full h-48 object-cover"
src={`${imageURL}${participant.up_file}`}
alt="Image"
/>
<div className="flex justify-center mt-2 gap-1">
<div className="text-md text-center font-bold">Tree number:</div>
<div className="text-md">{participant.up_id}</div>
{
participants ? (
<div className="participant-container flex justify-center">
{participants.map((participant) => (
<div
key={participant.up_id}
className="participant-item relative group" // Add `group` here
style={{ maxHeight: '400px', boxSizing: 'border-box' }}
>
<Link
href={{
pathname: 'participant-list/item',
query: { id: participant.up_id },
}}
>
<div className="rounded-lg shadow-lg border hover:shadow-2xl hover:border-gray-400 h-full flex flex-col">
<img
className="w-full h-48 object-cover rounded-tl-lg rounded-tr-lg"
src={`${imageURL}${participant.up_file}`}
alt="Image"
/>
<div className="flex justify-center mt-2 gap-1">
<div className="text-md text-center font-bold">Tree number:</div>
<div className="text-md">{participant.up_id}</div>
</div>
<div className="flex justify-center mt-2 text-gray-600 gap-2">
<div className="text-md">{formatDate(participant.up_date)}</div>
<div className="text-md">{formatTime(participant.up_date)}</div>
</div>
<hr className="my-2" />
<div className="flex-grow flex flex-col justify-between">
<div className="flex ml-2 gap-1">
<div className="text-sm pl-1">Tree name:</div>
<div className="text-sm">{participant.up_tree_name}</div>
</div>
<div className="flex justify-center mt-2 text-gray-600 gap-2">
<div className="text-md">{formatDate(participant.up_date)}</div>
<div className="text-md">{formatTime(participant.up_date)}</div>
<div className="flex ml-2 gap-1">
<div className="text-sm pl-1">Planter name:</div>
<div className="text-sm">{participant.up_planter}</div>
</div>
<hr className="my-2" />
<div className="flex-grow flex flex-col justify-between">
<div className="flex ml-2 gap-1">
<div className="text-sm pl-1">Tree name:</div>
<div className="text-sm">{participant.up_tree_name}</div>
</div>
<div className="flex ml-2 gap-1">
<div className="text-sm pl-1">Planter name:</div>
<div className="text-sm">{participant.up_planter}</div>
<div className="flex ml-2 gap-1">
<div className="text-sm pl-1">Uploader name:</div>
<div className="text-sm">{participant.up_name}</div>
</div>
{challenge ? (
<div className="flex ml-2">
<div className="text-sm pl-1 text-primary">This image has been challenged</div>
</div>
<div className="flex ml-2 gap-1">
<div className="text-sm pl-1">Uploader name:</div>
<div className="text-sm">{participant.up_name}</div>
) : (
<div className="flex justify-center">
<button
className="bg-primary m-1 text-white text-sm py-1 px-2 rounded hidden group-hover:block mx-auto" // Updated to `hidden` by default and `group-hover:block`
>
Challenge
</button>
</div>
</div>
)}
</div>
</Link>
</div>
))}
</div>
) : (
<Loading />
)
}
</div>
</Link>
</div>
))}
</div>
) : (
<Loading />
)
}



<div className="flex justify-center items-center space-x-2 my-4">
<button
Expand Down
4 changes: 2 additions & 2 deletions src/app/participants/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ const Participant = () => {
return (
<>
<NavigationBar />
<div>
<h2 className="m-5 text-2xl font-bold text-center items-center text-[#3C6E1F]">Participants list</h2>
<div className="mt-6 mb-3">
<h2 className="text-2xl font-bold text-center items-center text-[#3C6E1F]">Participants list</h2>
</div>
<form onSubmit={onSubmit}>
<div className="flex flex-wrap p-2 md:p-4">
Expand Down
Loading

0 comments on commit 7009fba

Please sign in to comment.