diff --git a/.gitignore b/.gitignore index 922d92a5..238e770b 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,4 @@ # debug npm-debug.log* yarn-debug.log* -yarn-error.log* +yarn-error.log* \ No newline at end of file diff --git a/components/EventCard.module.css b/components/EventCard.module.css new file mode 100644 index 00000000..4f4a96f9 --- /dev/null +++ b/components/EventCard.module.css @@ -0,0 +1,43 @@ +.card { + display: flex; + flex-direction: row; + max-width: 1000px; + box-sizing: border-box; + padding: 24px; +} + +.card aside { + flex: 0 0 144px; + margin-right: 24px; +} + +.card aside img { + width: 100%; + margin-bottom: 16px; +} + +.registerButton { + width: 100%; +} + +.content > h2 { + font-size: 24px; + font-weight: 700; + font-style: normal; + margin-top: 0; + margin-bottom: 0; +} + +.content, +.content > h3 { + color: var(--purple-2); + font-size: 14px; + font-weight: 400; + font-style: normal; + margin-top: 0; + margin-bottom: 14px; +} + +.content { + margin-bottom: 0; +} diff --git a/components/EventCard.tsx b/components/EventCard.tsx new file mode 100644 index 00000000..80d7147e --- /dev/null +++ b/components/EventCard.tsx @@ -0,0 +1,45 @@ +import React, { ReactNode } from "react"; +import styles from "./EventCard.module.css"; + +import { EventSetting } from "./EventSetting"; +import { Image } from "./Image"; + +interface EventCardProps { + name: string; + short: string; + date: Date; + online: boolean; + location: string; + poster: string; + registerLink: string; + children: ReactNode; +} + +export function EventCard({ + name, + date, + online, + location, + poster, + registerLink, + children, +}: EventCardProps) { + return ( +
+ +
+

{name}

+

+ +

+
{children}
+
+
+ ); +} diff --git a/components/EventDescriptionCard.module.css b/components/EventDescriptionCard.module.css index 6037a248..7796e9d8 100644 --- a/components/EventDescriptionCard.module.css +++ b/components/EventDescriptionCard.module.css @@ -47,6 +47,13 @@ right: 0; } +.setting { + margin: 0; + color: var(--blue-1); + font-weight: bolder; + font-size: 0.75rem; +} + @media only screen and (max-width: 768px) { .card { padding: 0; diff --git a/components/EventDescriptionCard.tsx b/components/EventDescriptionCard.tsx index 32fcba15..39ca9cb6 100644 --- a/components/EventDescriptionCard.tsx +++ b/components/EventDescriptionCard.tsx @@ -42,12 +42,13 @@ export function EventDescriptionCard(props: Props) {

{props.name}

- - +

+ +

{props.children}
diff --git a/components/EventSetting.module.css b/components/EventSetting.module.css deleted file mode 100644 index 154bb6fa..00000000 --- a/components/EventSetting.module.css +++ /dev/null @@ -1,5 +0,0 @@ -.setting { - color: var(--blue-1); - font-weight: bolder; - font-size: 0.75rem; -} diff --git a/components/EventSetting.tsx b/components/EventSetting.tsx index 237c5bb4..3dec1cde 100644 --- a/components/EventSetting.tsx +++ b/components/EventSetting.tsx @@ -1,5 +1,4 @@ import React from "react"; -import styles from "./EventSetting.module.css"; interface Props { date: Date; @@ -20,7 +19,7 @@ export function EventSetting(props: Props) { const location = props.online ? `Online - ${props.location}` : props.location; return ( -
+
{` | ${location}`}
diff --git a/components/playground.tsx b/components/playground.tsx index 507e0540..31d23087 100644 --- a/components/playground.tsx +++ b/components/playground.tsx @@ -5,6 +5,13 @@ import styles from "./playground.module.css"; import AfterHoursContent, { metadata as afterHoursMetadata, } from "../content/playground/after-hours.event.mdx"; +import OOTBReact, { + metadata as OOTBReactEventMetadata, +} from "../content/playground/ootb-react.event.mdx"; +import AltTab, { + metadata as altTabEventMetadata, +} from "../content/playground/alt-tab.event.mdx"; + import UnavailableContent, { metadata as unavailableMetadata, } from "../content/playground/unavailable.news.mdx"; @@ -12,6 +19,7 @@ import { metadata as teamMemberMetadata } from "../content/playground/demo.teamm import { MiniEventCard } from "./MiniEventCard"; import { NewsCard } from "./NewsCard"; +import { EventCard } from "./EventCard"; import { EventDescriptionCard } from "./EventDescriptionCard"; import { TeamMember } from "./TeamMember"; @@ -114,6 +122,23 @@ export function EventDescriptionCardDemo() { ); } +export function EventCardDemo() { + const eventCardData = [ + { Content: OOTBReact, metadata: OOTBReactEventMetadata }, + { Content: AltTab, metadata: altTabEventMetadata }, + ]; + + return ( + <> + {eventCardData.map(({ Content, metadata }) => ( + + + + ))} + + ); +} + export function TeamMemberDemo() { return (
diff --git a/content/playground/after-hours.event.mdx b/content/playground/after-hours.event.mdx index 45fdb7d3..a9fbb372 100644 --- a/content/playground/after-hours.event.mdx +++ b/content/playground/after-hours.event.mdx @@ -2,7 +2,10 @@ export const metadata = { name: "Afterhours: Personal Relationships", short: "Learn how React works and make your own version!", date: new Date("2021-03-02 2:00 PM"), - location: "Online - Twitch", + online: false, + location: "MC", + poster: "/images/playground/intro-ootb.jpg", + registerLink: "http://csclub.uwaterloo.ca/", }; The past year has been tough for all of us, having to deal with the pandemic diff --git a/content/playground/alt-tab.event.mdx b/content/playground/alt-tab.event.mdx new file mode 100644 index 00000000..a4ee16dd --- /dev/null +++ b/content/playground/alt-tab.event.mdx @@ -0,0 +1,15 @@ +export const metadata = { + name: "Alt-Tab", + short: "CSC is proud to present to you Alt-Tab!", + date: new Date("March 25, 2021 19:00:00"), + online: true, + location: "Twitch", + poster: "/images/alt-tab.png", + 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! + +We will have four incredible presenters that are eager to share their insights with you. Stay tuned as we'll be introducing them and the topics that they will be discussing soon!. + +Registration is not required to attend! We'll just be sending you an email reminder, as well as inviting you to our calendar even diff --git a/content/playground/ootb-react.event.mdx b/content/playground/ootb-react.event.mdx new file mode 100644 index 00000000..a46427c5 --- /dev/null +++ b/content/playground/ootb-react.event.mdx @@ -0,0 +1,17 @@ +export const metadata = { + name: "Out of the Box: React", + short: "Out of the Box is a series of code-along projects that explore what's under the hood of modern web frameworks.", + date: new Date("March 23, 2021 19:00:00"), + online: true, + location: "Twitch", + poster: "/images/ootb-react.png", + registerLink: "http://google.com/", +}; + +Modern web frameworks are a black-box. They're easy to use, but they have numerous minute details to master in order to apply them to truly scalable websites. Over the last few years, front-end frameworks have absorbed the responsibilities of the back-end, meaning it's become ever more important to dig their details out of the box. + +Out of the Box is a series of code-along projects that explore what's under the hood of modern web frameworks. Nearly 5 million websites use React, including many of the internet's most popular websites. While its simple syntax attracts developers from all over, underneath lies a complex infrastructure of code to manage all elements from caching to hooks. Rishi will bring these ideas to light in our inaugural episode of Out of the Box. Come join him and code your own version of React! + +Only basic web experience is needed. All JavaScript code will be written within a single HTML document for simplicity. Node.js will also be required to participate in the event! + +Registration is not required to attend! We'll just be sending you an email reminder, as well as inviting you to our calendar event. diff --git a/next-env.d.ts b/next-env.d.ts index 2a3d896f..18bf6b5f 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -8,7 +8,10 @@ declare module "*.event.mdx" { name: string; short: string; date: Date; + online: boolean; location: string; + poster: string; + registerLink: string; } const ReactComponent: ComponentType; diff --git a/pages/playground.mdx b/pages/playground.mdx index 4d4a77df..6f7c115f 100644 --- a/pages/playground.mdx +++ b/pages/playground.mdx @@ -2,6 +2,7 @@ import { MiniEventCardDemo, NewsCardDemo, EventDescriptionCardDemo, + EventCardDemo, TeamMemberDemo } from "../components/playground"; @@ -9,7 +10,7 @@ import { ## `` -The `` component has a collapsible description, and it is used +The `` component has a collapsible description, and it is used on the events page. It uses the `
` tag and works without JS! @@ -32,6 +33,16 @@ The `` component is used on the home page, and uses the --- + +## `` + +The `` component is used on the events page, and uses the +`