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

Feature film screenings #145

Merged
merged 4 commits into from
Nov 12, 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
10 changes: 5 additions & 5 deletions components/eventRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,23 @@ export default function EventRow({
<li className="block border-b border-black transition-all duration-100 px-4 sm:px-8">
<details className="group event-accordion" onToggle={handleToggle}>
<summary className="py-5 lg:grid-cols-8 md:flex md:gap-x-6 lg:gap-x-12 xl:gap-x-24 md:items-center cursor-pointer list-none">
<div className="hidden md:block lg:col-span-1 text-small flex-initial md:max-w-[100px] md:min-w-[100px] lg:min-w-[116px] ">
<div className="hidden md:block lg:col-span-1 text-small flex-initial md:max-w-[100px] md:min-w-[135px] ">
{EventDate(event)}
</div>
<div className="flex distance-between md:hidden content-center w-full">
<div className="flex-grow text-left">{EventDate(event)}</div>
<EventBadge eventType={event.eventType} text={event.eventType} />
</div>
<div className="hidden md:block flex-initial max-w-[106px] w-full lg:col-span-1">
<EventBadge eventType={event.eventType} text={event.eventType} />
</div>
<p className="font-medium text-smedium lg:col-span-4 md:text-small flex-grow mb-1 md:mb-0 mr-28 md:mr-0">
{event.title}
</p>
<p className="lg:col-span-1 text-small flex-initial md:min-w-[140px] lg:min-w-[206px]">
{event.location}
</p>
<div className="md:col-span-1 md:justify-self-end flex-initial md:min-w-[106px]">
<div className="hidden md:block flex-initial max-w-[125px] w-full lg:col-span-1">
<EventBadge eventType={event.eventType} text={event.eventType} />
</div>
<div className="md:col-span-1 md:justify-self-end flex-initial md:min-w-[50px]">
<BiPlus className="group-open:hidden ml-auto text-medium md:text-base -mt-9 md:mt-0" />
<BiMinus className="hidden group-open:block ml-auto text-medium md:text-base -mt-9 md:mt-0" />
</div>
Expand Down
12 changes: 4 additions & 8 deletions pages/events/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,18 @@ export default function NewsPage({
label: "Concerts",
value: "Concert",
},
{
label: "Film screenings",
value: "Film screening",
},
];

const updateFilter = (value: string, label) => () => {
if (value == filter) {
// router.push(`/events`, undefined, {
// shallow: true,
// });
setFilter("");
setTitle("events");
sortEvents(events);
} else {
// router.push(`/events?type=${encodeURIComponent(value)}`, undefined, {
// shallow: true,
// });
setFilter(value);
setTitle(label.toLowerCase());
sortEvents(filterEvents(value));
Expand Down Expand Up @@ -187,8 +185,6 @@ export default function NewsPage({

<div className="">
<div className="max-w-screen-xl mx-auto">
{/* <pre>{JSON.stringify(upcomingEvents, null, 2)}</pre> */}
{/* <pre>{JSON.stringify(pastEvents, null, 2)}</pre> */}
{Object.keys(upcomingEvents).length > 0 ? (
<UpcomingEvents events={upcomingEvents} />
) : (
Expand Down
3 changes: 2 additions & 1 deletion types/shared.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ export type EventType =
| "Hang out"
| "Exhibition"
| "Festival"
| "Concert";
| "Concert"
| "Film screening";
export interface EventInterface {
title: string;
coverImage?: CoverImage;
Expand Down
Loading