Skip to content

Commit

Permalink
Sponsorship: Media Partner (#49)
Browse files Browse the repository at this point in the history
* feat: add media partner.

* fix: change main event time.
  • Loading branch information
dewodt authored Feb 21, 2024
1 parent 4287784 commit 7af5821
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/api/feedback/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { appendGoogleSheets } from "@/lib/google-sheets";
import PostHogClient from "@/lib/posthog-server";
import { prisma } from "@/lib/prisma";
import { isUserAllowedFeedback, isUserFeedbacked } from "@/lib/query";
import { feedbackEndDate, feedbackStartDate } from "@/lib/special-date";
import { feedbackStartDate } from "@/lib/special-date";
import { feedbackSchema } from "@/lib/zod";
import { getServerSession } from "next-auth";
import { type NextRequest, NextResponse } from "next/server";
Expand Down
2 changes: 1 addition & 1 deletion app/main-event/announcement/accepted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async function Accepted(props: { session: Session }) {
<p className="text-sm lg:text-xl">
Location: Cornerstone Auditorium, Paskal 23
</p>
<p className="text-sm lg:text-xl">Time: 15:00 - 21:10 WIB</p>
<p className="text-sm lg:text-xl">Time: 15:00 - 21:00 WIB</p>
<p className="text-sm lg:text-xl">
Contact Person: @mulan19aja (Line ID)
</p>
Expand Down
2 changes: 1 addition & 1 deletion app/main-event/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ async function page() {
data-aos="fade-right"
className="text-3xl italic text-[#FDB10E] lg:text-5xl"
>
15.00 WIB - 21:10 WIB
15.00 WIB - 21:00 WIB
</p>
<div data-aos="fade-right" className="flex gap-2 align-middle">
<MapPin className="h-4 w-4 lg:h-8 lg:w-8" />
Expand Down
100 changes: 95 additions & 5 deletions app/sponsorship/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@ export default async function Sponsorship() {
sponsorshipTags
);
const {
sponsorship: { xlSponsor, lSponsor, mSponsor, sSponsor },
sponsorship: {
xlSponsor,
lSponsor,
mSponsor,
sSponsor,
mMediaPartner,
lMediaPartner,
xlMediaPartner,
},
} = sponsorshipQueryResult;

return (
Expand Down Expand Up @@ -66,9 +74,17 @@ export default async function Sponsorship() {
<div className="relative flex w-full flex-col items-center gap-24 overflow-hidden bg-[#1C1C1C] px-4 py-28 sm:py-32 lg:gap-32 lg:py-52">
{/* Sponsors Div Group */}
<div className="z-20 flex w-full max-w-[287px] flex-col gap-12 sm:max-w-[620px] lg:max-w-[990px] lg:gap-16">
{/* Title */}
<h2
data-aos="zoom-in-up"
className="stroke-ted-white text-center font-anderson text-4xl font-bold text-ted-white drop-shadow-[2px_4px_25px_rgba(255,255,255,0.9)] lg:text-6xl"
>
SPONSORS
</h2>

{/* First Class */}
<section className="flex w-full flex-row flex-wrap items-center justify-center gap-4 sm:gap-6 lg:gap-8">
{xlSponsor.map((data, index) => {
{xlSponsor.map((data) => {
return (
<div
key={data.id}
Expand All @@ -89,7 +105,7 @@ export default async function Sponsorship() {

{/* Second Class */}
<section className="flex w-full flex-row flex-wrap items-center justify-center gap-4 sm:gap-5 lg:gap-6">
{lSponsor.map((data, index) => {
{lSponsor.map((data) => {
return (
<div
key={data.id}
Expand All @@ -110,7 +126,7 @@ export default async function Sponsorship() {

{/* Third Class */}
<section className="flex w-full flex-row flex-wrap items-center justify-center gap-4 lg:gap-6">
{mSponsor.map((data, index) => {
{mSponsor.map((data) => {
return (
<div
key={data.id}
Expand All @@ -131,7 +147,81 @@ export default async function Sponsorship() {

{/* Fourth Class */}
<section className="flex w-full flex-row flex-wrap items-center justify-center gap-4 lg:gap-6">
{sSponsor.map((data, index) => {
{sSponsor.map((data) => {
return (
<div
key={data.id}
data-aos="zoom-in-up"
className="flex h-[75px] w-[85px] items-center justify-center overflow-hidden rounded-md bg-white p-2 shadow-[2px_4px_25px_0px_rgba(255,255,255,0.25)] lg:h-[115px] lg:w-[140px] lg:p-4"
>
<Image
src={data.url}
width={data.width}
height={data.height}
alt={data.alt}
className="h-full w-full object-contain object-center transition duration-300 ease-in-out hover:scale-110"
/>
</div>
);
})}
</section>
</div>

{/* Media Partner Div Group */}
<div className="z-20 flex w-full max-w-[287px] flex-col gap-12 sm:max-w-[620px] lg:max-w-[990px] lg:gap-16">
{/* Title */}
<h2
data-aos="zoom-in-up"
className="stroke-ted-white text-center font-anderson text-4xl font-bold text-ted-white drop-shadow-[2px_4px_25px_rgba(255,255,255,0.9)] lg:text-6xl"
>
MEDIA PARTNER
</h2>

{/* First Class */}
<section className="flex w-full flex-row flex-wrap items-center justify-center gap-4 sm:gap-5 lg:gap-6">
{xlMediaPartner.map((data) => {
return (
<div
key={data.id}
data-aos="zoom-in-up"
className="flex h-[125px] w-[135px] items-center justify-center overflow-hidden rounded-md bg-white p-2 shadow-[2px_4px_25px_0px_rgba(255,255,255,0.25)] sm:h-[125px] sm:w-[140px] sm:p-4 lg:h-[200px] lg:w-[225px]"
>
<Image
src={data.url}
width={data.width}
height={data.height}
alt={data.alt}
className="h-full w-full object-contain object-center transition duration-300 ease-in-out hover:scale-110"
/>
</div>
);
})}
</section>

{/* Second Class */}
<section className="flex w-full flex-row flex-wrap items-center justify-center gap-4 lg:gap-6">
{lMediaPartner.map((data) => {
return (
<div
key={data.id}
data-aos="zoom-in-up"
className="flex h-[75px] w-[85px] items-center justify-center overflow-hidden rounded-md bg-white p-2 shadow-[2px_4px_25px_0px_rgba(255,255,255,0.25)] sm:h-[95px] sm:w-[110px] sm:p-4 lg:h-[150px] lg:w-[175px]"
>
<Image
src={data.url}
width={data.width}
height={data.height}
alt={data.alt}
className="h-full w-full object-contain object-center transition duration-300 ease-in-out hover:scale-110"
/>
</div>
);
})}
</section>

{/* Third Class */}
<section className="flex w-full flex-row flex-wrap items-center justify-center gap-4 lg:gap-6">
{mMediaPartner.map((data) => {
return (
<div
key={data.id}
Expand Down
21 changes: 21 additions & 0 deletions lib/cms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,27 @@ export const sponsorshipQuery = `{
width
height
}
mMediaPartner {
id
url
alt
width
height
}
lMediaPartner {
id
url
alt
width
height
}
xlMediaPartner{
id
url
alt
width
height
}
}
}`;

Expand Down
2 changes: 1 addition & 1 deletion lib/special-date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ export const endVotingDate = new Date("February 7, 2024 13:00:00").getTime();

export const feedbackStartDate = new Date("March 9, 2024 11:00:00").getTime();

export const feedbackEndDate = new Date("March 9, 2024 11:00:00").getTime();
// export const feedbackEndDate = new Date("March 9, 2024 11:00:00").getTime();
3 changes: 3 additions & 0 deletions types/cms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export interface SponsorshipQueryResult {
lSponsor: ImageCMS[];
mSponsor: ImageCMS[];
sSponsor: ImageCMS[];
mMediaPartner: ImageCMS[];
lMediaPartner: ImageCMS[];
xlMediaPartner: ImageCMS[];
};
}

Expand Down

0 comments on commit 7af5821

Please sign in to comment.