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

ui fixes #147

Merged
merged 2 commits into from
Dec 13, 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
2 changes: 1 addition & 1 deletion src/app/events/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const Events = () => {
<p className='text-left md:text-center'>{new Date(event.created_time).toLocaleDateString()}</p>
</div>
<div className="flex flex-col">
<p className=' text-justify p-2 md:p-5'>{event.event_body}</p>
<p className=' text-justify p-2 md:p-5 line-clamp-5'>{event.event_body}</p>
{event.event_body.length > 100 && (
<a href={`/events/${event.id}?slug=${event.id}`} className='self-start bg-white px-5 py-2 rounded-2xl'>Read more</a>
)}
Expand Down
5 changes: 3 additions & 2 deletions src/app/home/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ interface Events {
created_time: string;
is_deleted: string;
show_in_main: string;

id:number
}


Expand Down Expand Up @@ -472,7 +472,8 @@ const cards = [
</div>
</div>
<h2 className="mt-4 text-2xl font-bold">{card.event_heading}</h2>
<p className="mt-2 text-gray-700">{card.event_body}</p>
<p className="my-2 text-gray-700 line-clamp-4">{card.event_body}</p>
<a href={`/events/${card.id}?slug=${card.id}`} className='self-start bg-white px-5 py-2 rounded-2xl'>Read more</a>
</div>
))}
</div>
Expand Down
18 changes: 9 additions & 9 deletions src/app/participant-list/item/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,31 +63,31 @@ const Item: React.FC = () => {
return (
<>
<PageTitle title={`Tree number: ${treeDetails.up_id}`} />
<div className="rounded-lg shadow-lg max-w-screen-lg mx-auto">
<div className="rounded-lg shadow-lg max-w-screen-xl mx-auto">
<div className="rounded-lg border">
<div className='flex flex-col flex-wrap md:flex-row gap-3 p-4 overflow-hidden justify-center'>
{treeDetails.up_file ? (
<img src={`${imageURL}${treeDetails.up_file}`} className='' alt='' width={200} height={200} />
<img src={`${imageURL}${treeDetails.up_file}`} className='object-cover h-80 w-60' alt='Image'/>
):
<div className="size-48 bg-light-gray grid place-content-center">To be Uploaded</div>
<div className="h-80 w-60 bg-light-gray grid place-content-center">To be Uploaded</div>
}

{treeDetails.up_file_2 ? (
<img src={`${imageURL}${treeDetails.up_file_2}`} className='' alt='' width={200} height={200} />
<img src={`${imageURL}${treeDetails.up_file_2}`} className='object-cover h-80 w-60' alt='Image'/>
):
<div className="size-48 bg-light-gray grid place-content-center">To be Uploaded</div>
<div className="h-80 w-60 bg-light-gray grid place-content-center">To be Uploaded</div>
}

{treeDetails.up_file_3 ? (
<img src={`${imageURL}${treeDetails.up_file_3}`} className='' alt='' width={200} height={200} />
<img src={`${imageURL}${treeDetails.up_file_3}`} className='object-cover h-80 w-60' alt='Image'/>
):
<div className="size-48 bg-light-gray grid place-content-center">To be Uploaded</div>
<div className="h-80 w-60 bg-light-gray grid place-content-center">To be Uploaded</div>
}

{treeDetails.up_file_4 ? (
<img src={`${imageURL}${treeDetails.up_file_4}`} className='' alt='' width={200} height={200} />
<img src={`${imageURL}${treeDetails.up_file_4}`} className='object-cover h-80 w-60' alt='Image'/>
):
<div className="size-48 bg-light-gray grid place-content-center">To be Uploaded</div>
<div className="h-80 w-60 bg-light-gray grid place-content-center">To be Uploaded</div>
}
</div>
<hr className="my-2" />
Expand Down
32 changes: 16 additions & 16 deletions src/app/participant-list/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const ParticipantList: React.FC = () => {
<div
key={participant.up_id}
className="participant-item relative group" // Add `group` here
style={{ maxHeight: '450px', boxSizing: 'border-box' }}

>
{/* Conditional image for challenged status */}
{participant.is_challenged == 1 && (
Expand All @@ -132,41 +132,41 @@ const ParticipantList: React.FC = () => {
}}
>
<img
className="w-full h-48 object-cover rounded-tl-lg rounded-tr-lg"
className="w-full h-80 object-cover rounded-tl-lg rounded-tr-lg"
src={`${imageURL}${participant.up_file}`}
//src="/images/image1.jpeg"
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 className="text-md font-bold">{participant.up_id}</div>
</div>
<div className="flex justify-center mt-2 text-gray-600 gap-2">
<div className="flex justify-center mt-2 text-sm text-gray-500 gap-2">
<div className="text-md">{formatDate(participant.up_date)}</div>
<div className="text-md">{formatTime(participant.up_date)}</div>
</div>
</Link>
<hr className="my-2" />
<div className="flex-grow flex flex-col justify-between">
<div className="flex gap-3">
<div className="flex-grow flex flex-col gap-3 justify-normal p-4">
{/* <div className="flex gap-3">
<div className="text-sm text-left pl-8" style={{width:'45%'}}>Tree name:</div>
<div className="text-sm">{participant.up_tree_name}</div>
</div>
<div className="flex gap-3">
</div> */}
{/* <div className="flex gap-3">
<div className="text-sm text-left pl-8" style={{width:'45%'}}>Planter name:</div>
<div className="text-sm">{participant.up_planter}</div>
</div> */}
<div className="">
{/* <div className="text-sm text-left pl-8" style={{width:'45%'}}>Uploader name:</div> */}
<div className="text-base font-bold text-center">{participant.up_name}</div>
</div>
<div className="flex gap-3">
<div className="text-sm text-left pl-8" style={{width:'45%'}}>Uploader name:</div>
<div className="text-sm">{participant.up_name}</div>
</div>
<div className="flex gap-3">
<div className="text-sm text-left pl-8" style={{width:'45%'}}>Group name:</div>
<div className="text-sm">{participant.gp_name}</div>
<div className="flex gap-3 justify-center">
{/* <div className="text-sm" style={{width:'45%'}}>Group name:</div> */}
<div className="text-sm text-center">{participant.gp_name}</div>
</div>
{participant.is_challenged == 1 ? (
<div className="flex m-auto">
<div className="text-sm text-center text-primary">This image has been challenged</div>
<div className="text-sm py-2 text-center text-primary">This image has been challenged</div>
</div>
) : token!=null ? (
<div className="flex justify-center">
Expand Down