Skip to content

Commit

Permalink
Feature/2024 prep (#46)
Browse files Browse the repository at this point in the history
* Preparation for 2024

* Preparation for 2024

* Preparation for 2024
  • Loading branch information
3bobchen authored Sep 21, 2024
1 parent 0560f15 commit 7207255
Show file tree
Hide file tree
Showing 11 changed files with 2,045 additions and 164 deletions.
31 changes: 18 additions & 13 deletions components/Speaker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface SpeakerProps {
speaker: string;
speakerName?: string;
text: ReactNode;
video: string;
video: string | null;
focusedPage: number;
}
const Speaker = ({
Expand Down Expand Up @@ -39,6 +39,9 @@ const Speaker = ({
const page = idx + 1;
const video = videoRef.current!;
const text = textRef.current!;
if (!video) {
return;
}

if (previousFocusedPage.current === page) {
const rotate = focusedPage > previousFocusedPage.current ? 1 : -1;
Expand Down Expand Up @@ -138,17 +141,19 @@ const Speaker = ({
{text}
</section>
<aside className="-z-10 mx-auto hidden max-h-[50%] max-w-2xl flex-col justify-center md:flex xl:max-h-[75%] xl:max-w-none xl:flex-[4]">
<video
ref={videoRef}
loop
controls
playsInline
controlsList="nodownload noplaybackrate nofullscreen"
disablePictureInPicture
className="mx-auto max-h-full w-auto rounded-sm shadow-xl"
>
<source src={video} type="video/mp4" />
</video>
{video ? (
<video
ref={videoRef}
loop
controls
playsInline
controlsList="nodownload noplaybackrate nofullscreen"
disablePictureInPicture
className="mx-auto max-h-full w-auto rounded-sm shadow-xl"
>
<source src={video} type="video/mp4" />
</video>
) : null}
</aside>
<Transition show={showVideo} as={Fragment}>
<Dialog
Expand Down Expand Up @@ -188,7 +193,7 @@ const Speaker = ({
controlsList="nodownload noplaybackrate nofullscreen"
disablePictureInPicture
>
<source src={video} type="video/mp4" />
{video ? <source src={video} type="video/mp4" /> : null}
</video>
</Dialog.Panel>
</Transition.Child>
Expand Down
11 changes: 11 additions & 0 deletions components/Speakers/Placeholder.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const Placeholder = () => {
return (
<>
<p style={{ width: "80vw" }}>
Check back later for more updates to the list of speakers for this year.
</p>
</>
);
};

export default Placeholder;
2 changes: 1 addition & 1 deletion components/Thingy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface Props {
[speaker: string]: {
speakerName?: string;
text: ReactNode;
video: string;
video: string | null;
};
};
focusedPage: number;
Expand Down
2 changes: 1 addition & 1 deletion components/ThingyNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ interface Props {
[speaker: string]: {
speakerName?: string;
text: ReactNode;
video: string;
video: string | null;
};
};
focusedPage: number;
Expand Down
Empty file removed components/test.tsx
Empty file.
Loading

0 comments on commit 7207255

Please sign in to comment.