Make registerLink and poster optional for events
This commit is contained in:
parent
04736be3b6
commit
7f88950f78
|
@ -16,6 +16,10 @@
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.spacer {
|
||||||
|
margin-top: 76px;
|
||||||
|
}
|
||||||
|
|
||||||
.registerButton {
|
.registerButton {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,8 +10,8 @@ interface EventCardProps {
|
||||||
date: Date;
|
date: Date;
|
||||||
online: boolean;
|
online: boolean;
|
||||||
location: string;
|
location: string;
|
||||||
poster: string;
|
poster?: string;
|
||||||
registerLink: string;
|
registerLink?: string;
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,11 +27,14 @@ export function EventCard({
|
||||||
return (
|
return (
|
||||||
<article className={styles.card}>
|
<article className={styles.card}>
|
||||||
<aside>
|
<aside>
|
||||||
<Image alt={name} src={poster} />
|
{poster && <Image alt={name} src={poster} />}
|
||||||
|
{!poster && <div className={styles.spacer}></div>}
|
||||||
{/* TODO: use the <Button /> component */}
|
{/* TODO: use the <Button /> component */}
|
||||||
|
{registerLink && (
|
||||||
<button className={styles.registerButton}>
|
<button className={styles.registerButton}>
|
||||||
<a href={registerLink}>Register</a>
|
<a href={registerLink}>Register</a>
|
||||||
</button>
|
</button>
|
||||||
|
)}
|
||||||
</aside>
|
</aside>
|
||||||
<section className={styles.content}>
|
<section className={styles.content}>
|
||||||
<h2>{name}</h2>
|
<h2>{name}</h2>
|
||||||
|
|
|
@ -9,7 +9,7 @@ interface Props {
|
||||||
online: boolean;
|
online: boolean;
|
||||||
location: string;
|
location: string;
|
||||||
date: Date;
|
date: Date;
|
||||||
poster: string;
|
poster?: string;
|
||||||
registerLink?: string;
|
registerLink?: string;
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ export function EventDescriptionCard({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<article className={styles.card}>
|
<article className={styles.card}>
|
||||||
<Image className={styles.poster} src={poster} alt={name} />
|
{poster && <Image className={styles.poster} src={poster} alt={name} />}
|
||||||
|
|
||||||
<div className={styles.details}>
|
<div className={styles.details}>
|
||||||
<h3 className={styles.name}>{name}</h3>
|
<h3 className={styles.name}>{name}</h3>
|
||||||
|
|
|
@ -24,8 +24,8 @@ import { EventDescriptionCard } from "./EventDescriptionCard";
|
||||||
import { TeamMember } from "./TeamMember";
|
import { TeamMember } from "./TeamMember";
|
||||||
|
|
||||||
const events = [
|
const events = [
|
||||||
{ Content: AfterHoursContent, metadata: afterHoursMetadata },
|
|
||||||
{ Content: OOTBReact, metadata: OOTBReactEventMetadata },
|
{ Content: OOTBReact, metadata: OOTBReactEventMetadata },
|
||||||
|
{ Content: AfterHoursContent, metadata: afterHoursMetadata },
|
||||||
{ Content: AltTab, metadata: altTabEventMetadata },
|
{ Content: AltTab, metadata: altTabEventMetadata },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ export const metadata = {
|
||||||
date: new Date("2021-03-02 2:00 PM"),
|
date: new Date("2021-03-02 2:00 PM"),
|
||||||
online: false,
|
online: false,
|
||||||
location: "MC",
|
location: "MC",
|
||||||
poster: "/images/playground/intro-ootb.jpg",
|
|
||||||
registerLink: "http://csclub.uwaterloo.ca/",
|
registerLink: "http://csclub.uwaterloo.ca/",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ export const metadata = {
|
||||||
online: true,
|
online: true,
|
||||||
location: "Twitch",
|
location: "Twitch",
|
||||||
poster: "/images/playground/alt-tab.jpg",
|
poster: "/images/playground/alt-tab.jpg",
|
||||||
registerLink: "http://google.com/",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
CSC is proud to present to you Alt-Tab! Join us in a lightning tech talk series presented to you by our very own students. Alt-Tab consists of 10 to 15-minute talks about anything related to tech. Learn more about exciting topics that range from competitive programming to cryptography!
|
CSC is proud to present to you Alt-Tab! Join us in a lightning tech talk series presented to you by our very own students. Alt-Tab consists of 10 to 15-minute talks about anything related to tech. Learn more about exciting topics that range from competitive programming to cryptography!
|
||||||
|
|
|
@ -10,8 +10,8 @@ declare module "*.event.mdx" {
|
||||||
date: Date;
|
date: Date;
|
||||||
online: boolean;
|
online: boolean;
|
||||||
location: string;
|
location: string;
|
||||||
poster: string;
|
poster?: string;
|
||||||
registerLink: string;
|
registerLink?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ReactComponent: ComponentType;
|
const ReactComponent: ComponentType;
|
||||||
|
|
Loading…
Reference in New Issue