-
Notifications
You must be signed in to change notification settings - Fork 2
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
IH Schedule Page 2025 #581
Open
Bl20052005
wants to merge
11
commits into
main
Choose a base branch
from
feat/schedule-countdown-timer-2025
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c0ff448
initial commit
Bl20052005 e050263
Merge branch 'main' into feat/schedule-countdown-timer-2025
Bl20052005 00098be
rest of schedule page
Bl20052005 02d85b2
ui and logic addons
Bl20052005 6550fcd
final animations
Bl20052005 6d3290a
removed unused imports
Bl20052005 cf8c8d7
mobile view changes
Bl20052005 043e563
some time fixes
Bl20052005 4c5edd2
spacing fix
Bl20052005 19c0c4f
stop ending anim after feb 3
Bl20052005 c2f8b0a
some minor fixes
Bl20052005 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 77 additions & 41 deletions
118
apps/site/src/app/(main)/schedule/components/EventCard.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,89 @@ | ||
import EventRegular from "./EventRegular"; | ||
import EventAnnouncement from "./EventAnnouncement"; | ||
import EventMiscellaneous from "./EventMiscellaneous"; | ||
import { SwordsIcon } from "lucide-react"; | ||
import { motion } from "framer-motion"; | ||
|
||
import EventProps from "../EventProps"; | ||
import getTimeAndDates from "@/lib/utils/getTimeAndDates"; | ||
|
||
IanWearsHat marked this conversation as resolved.
Show resolved
Hide resolved
|
||
interface EventCardProps extends EventProps { | ||
isHappening: boolean; | ||
} | ||
|
||
export default function EventCard({ | ||
now, | ||
title, | ||
eventType, | ||
location, | ||
virtual, | ||
startTime, | ||
endTime, | ||
organization, | ||
hosts, | ||
description, | ||
}: EventProps) { | ||
if (eventType === "Announcement") { | ||
// description is used as the prop as opposed to title because description is a Portable Text object | ||
// that can reflect all text formats put in Sanity | ||
return ( | ||
<EventAnnouncement | ||
description={description} | ||
startTime={startTime} | ||
endTime={endTime} | ||
/> | ||
); | ||
} else if (eventType === "Miscellaneous") { | ||
return ( | ||
<EventMiscellaneous | ||
title={title} | ||
startTime={startTime} | ||
endTime={endTime} | ||
description={description} | ||
/> | ||
); | ||
} else { | ||
return ( | ||
<EventRegular | ||
now={now} | ||
title={title} | ||
eventType={eventType} | ||
location={location} | ||
virtual={virtual} | ||
startTime={startTime} | ||
endTime={endTime} | ||
organization={organization} | ||
hosts={hosts} | ||
description={description} | ||
/> | ||
); | ||
} | ||
isHappening, | ||
}: EventCardProps) { | ||
return ( | ||
<div | ||
className={`w-[90%] min-w-[200px] h-full bg-black border-4 border-white relative p-16 font-display max-lg:w-full ${ | ||
isHappening && | ||
"max-lg:bg-blue-100 max-lg:border-blue-900 max-lg:text-blue-950 max-lg:top-[-8px] max-lg:left-[-8px]" | ||
}`} | ||
> | ||
{title ? ( | ||
<> | ||
<div> | ||
<div className="flex justify-between gap-5 max-lg:flex-col"> | ||
<div className="h-fit w-full flex justify-between items-center"> | ||
<h1 className="text-4xl max-w-[80%] max-sm:text-3xl"> | ||
{title} | ||
</h1> | ||
{isHappening && ( | ||
<motion.div | ||
className="min-w-[50px] max-[400px]:hidden" | ||
animate={{ y: ["0%", "-10%", "0%"] }} | ||
transition={{ | ||
repeat: Infinity, | ||
duration: 2, | ||
ease: "easeInOut", | ||
}} | ||
> | ||
<SwordsIcon width={50} height={50} color="rgb(23 37 84)" /> | ||
</motion.div> | ||
)} | ||
</div> | ||
<p className="text-2xl">{getTimeAndDates(startTime).day}</p> | ||
</div> | ||
<div className="pt-5"> | ||
<div className="w-full flex justify-between gap-5 max-lg:flex-col "> | ||
<p className="text-2xl"> | ||
<span>Location: </span> | ||
{virtual ? <a>Zoom</a> : location} | ||
</p> | ||
{organization && <p className="text-xl">By: {organization}</p>} | ||
</div> | ||
<p className="text-xl">{`Time: ${ | ||
getTimeAndDates(startTime).compositeTimeHourMinute | ||
} - ${getTimeAndDates(endTime).compositeTimeHourMinute} ${ | ||
getTimeAndDates(endTime).amPm | ||
}`}</p> | ||
</div> | ||
</div> | ||
<div | ||
className={`w-full h-[2px] ${ | ||
isHappening ? "bg-blue-900" : "bg-white" | ||
} mt-4 mb-4`} | ||
/> | ||
<div> | ||
{hosts && ( | ||
<div className="text-2xl">{`Hosted By: ${hosts?.join( | ||
", ", | ||
)}`}</div> | ||
)} | ||
<div className="text-xl pt-5">{description}</div> | ||
</div> | ||
</> | ||
) : ( | ||
<div className="text-4xl w-full h-full flex justify-center items-center"> | ||
No Event Selected... | ||
</div> | ||
)} | ||
</div> | ||
); | ||
} |
7 changes: 7 additions & 0 deletions
7
apps/site/src/app/(main)/schedule/components/EventPlaque.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.plaqueHover { | ||
transform: translate(-3px, -3px); | ||
} | ||
|
||
.decorHover { | ||
transform: translate(4px, 4px); | ||
} |
86 changes: 86 additions & 0 deletions
86
apps/site/src/app/(main)/schedule/components/EventPlaque.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/* eslint-disable no-mixed-spaces-and-tabs */ | ||
"use client"; | ||
|
||
import { useState } from "react"; | ||
import { forwardRef } from "react"; | ||
IanWearsHat marked this conversation as resolved.
Show resolved
Hide resolved
|
||
import { SwordsIcon } from "lucide-react"; | ||
import { motion } from "framer-motion"; | ||
|
||
import getTimeAndDates from "@/lib/utils/getTimeAndDates"; | ||
|
||
import styles from "./EventPlaque.module.scss"; | ||
|
||
interface EventPlaqueProps { | ||
title: string; | ||
startTime: Date; | ||
endTime: Date; | ||
isHappening: boolean; | ||
onClick: (title: string) => void; | ||
} | ||
|
||
export default forwardRef(function EventPlaque( | ||
{ title, startTime, endTime, isHappening, onClick }: EventPlaqueProps, | ||
ref: React.LegacyRef<HTMLDivElement>, | ||
) { | ||
const [hovered, setHovered] = useState(false); | ||
|
||
const start = getTimeAndDates(startTime); | ||
const end = getTimeAndDates(endTime); | ||
|
||
return ( | ||
<div | ||
className="duration-500 relative min-w-[200px] h-fit cursor-pointer" | ||
onMouseEnter={() => setHovered(true)} | ||
onMouseLeave={() => setHovered(false)} | ||
ref={ref} | ||
onClick={() => onClick(title)} | ||
> | ||
<div | ||
className={ | ||
isHappening | ||
? "duration-500 font-display p-5 w-full h-fit border-4 bg-blue-100 border-blue-900 text-blue-950 top-[-8px] left-[-8px]" | ||
: `duration-500 font-display p-5 w-full h-fit border-4 top-0 left-0 ${ | ||
hovered | ||
? `bg-white border-black text-black top-[-5px] left-[-5px] ${styles.plaqueHover}` | ||
: "bg-black border-white" | ||
}` | ||
} | ||
> | ||
<div | ||
className={ | ||
isHappening | ||
? "text-2xl flex justify-between min-h-[50px] gap-5 items-center" | ||
: `text-2xl` | ||
} | ||
> | ||
<span>{title}</span> | ||
{isHappening && ( | ||
<motion.div | ||
className="min-w-[50px]" | ||
animate={{ y: ["0%", "-10%", "0%"] }} | ||
transition={{ | ||
repeat: Infinity, | ||
duration: 2, | ||
ease: "easeInOut", | ||
}} | ||
> | ||
<SwordsIcon width={50} height={50} color="rgb(23 37 84)" /> | ||
</motion.div> | ||
)} | ||
</div> | ||
<div className="text-lg"> | ||
<div>{`${start.compositeTimeHourMinute} - ${end.compositeTimeHourMinute} ${end.amPm}`}</div> | ||
</div> | ||
</div> | ||
<div | ||
className={ | ||
isHappening | ||
? "absolute w-full h-full top-[9px] left-[9px] z-[-1] duration-500 bg-blue-100" | ||
: `absolute w-full h-full top-0 left-0 z-[-1] duration-500 bg-white ${ | ||
hovered && styles.decorHover | ||
}` | ||
} | ||
/> | ||
</div> | ||
); | ||
}); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Praise: This loading animation looks great!