Merge branch 'main' of https://git.csclub.uwaterloo.ca/www/www-new into add-unix-101

This commit is contained in:
Bonnie Peng 2022-05-22 21:50:56 -04:00
commit 2a4fb1fc96
46 changed files with 525 additions and 91 deletions

View File

@ -31,6 +31,10 @@
margin-bottom: 0;
}
.content > h1 a {
color: var(--primary-heading);
}
.content,
.content > h2 {
font-weight: 400;

View File

@ -18,6 +18,10 @@ interface EventCardProps {
permaLink: string;
showDescription?: boolean;
children: ReactNode;
year: string;
term: string;
slug: string;
titleLinked: boolean;
}
export function EventCard({
@ -30,6 +34,10 @@ export function EventCard({
registerLink,
children,
showDescription = false,
year,
term,
slug,
titleLinked,
}: EventCardProps) {
return (
<article className={styles.card}>
@ -54,7 +62,13 @@ export function EventCard({
showDescription ? styles.mobileShowDescriptionContent : "",
].join(" ")}
>
<h1>{name}</h1>
<h1>
{titleLinked ? (
<Link href={`/events/${year}/${term}/${slug}`}>{name}</Link>
) : (
name
)}
</h1>
<h2>
<EventSetting date={date} online={online} location={location} />
</h2>

View File

@ -14,6 +14,10 @@
margin: 0;
}
.name a {
color: var(--primary-heading);
}
.nameSpacer {
width: calc(140rem / 16);
}

View File

@ -1,32 +1,39 @@
import React, { ReactNode } from "react";
import { EventSetting } from "./EventSetting";
import { Link } from "./Link";
import styles from "./MiniEventCard.module.css";
interface Props {
interface MiniEventCardProps {
name: string;
description: ReactNode;
short: string;
online: boolean;
location: string;
date: Date;
year: string;
term: string;
slug: string;
}
export const MiniEventCard: React.FC<Props> = ({
export const MiniEventCard: React.FC<MiniEventCardProps> = ({
name,
short,
description,
location,
date,
online,
year,
term,
slug,
}) => {
return (
<details className={styles.card}>
<summary>
<div onClick={(event) => event.preventDefault()}>
<h2 className={styles.name}>
<div>{name}</div>
<Link href={`/events/${year}/${term}/${slug}`}>{name}</Link>
<div className={styles.nameSpacer}></div>
</h2>
<div className={styles.info}>

View File

@ -24,6 +24,9 @@
.image {
width: calc(126rem / 16);
height: calc(126rem / 16);
clip-path: circle();
object-fit: cover;
}
.name {

View File

@ -0,0 +1,19 @@
---
name: 'BOT: In-person Speed-Friending + CSC Circles Intro'
short: 'Kick off the spring term with CSCs BOT event and meet others in the CS community!'
date: 'May 12 2022 19:00'
online: false
location: 'DC 1350'
poster: 'images/events/2022/spring/BOT.png'
registerLink: https://bit.ly/s22-bot-signup
---
📢 Kick off the spring term with CSCs BOT event! Are you interested in attending upcoming CSC events? Want to meet others in the CS community now that school is finally in-person? Come to our FIRST event of this term: In-person Speed-Friending event and the CSC circles kickoff!
📌 You will be able to meet others in groups of 3 or 4, with around 10 minutes to talk. 🎤 An optional prompt will act as an icebreaker, but feel free to discuss anything you want! Before the speed-friending event, the details of CSC Circles will be discussed along with our quick intro, so if youre interested in participating or learning more about CSC, be sure to attend! Even if you dont want to be part of CSC Circles, you should join us for the speed-friending event 🥰
👀 Just like last term, CSC Circles will consist of groups of 4-6 participants who will be matched to create recurring social circles based on your interests. CSC Circles will help you build meaningful connections over the course of a semester and beyond 🚀
📆 When? May 12th 2022 at 7-9pm EST, in DC 1350
👉 Register at https://bit.ly/s22-bot-signup. Alternatively, you can also email us at exec@csclub.uwaterloo.ca to sign up.

View File

@ -0,0 +1,21 @@
---
name: 'Bootcamp: Mock Interviews'
short: 'Come to practice your interview skills with experienced mentors!'
date: 'May 21 2022 18:00'
online: true
location: 'Discord'
poster: 'images/events/2022/spring/Bootcamp-Mentee-Applications.png'
registerLink: https://bit.ly/s22-bootcamp-mentee-signup!
---
📢 Applications for Bootcamp are now OPEN! 📢 CSC is bringing back Bootcamp to gear you up for your next recruiting season, partnered with @uwaterloodsc, @uwblueprint, @uwaterloowics, @uwaterloopm, @uw_ux, and @techplusuw! 💻 Mock interviews take place May 21st 6:00 - 10:00 PM EST.
💁‍♀️ Sign up as a mentee, and join our experienced mentors in Resume Reviews and Mock Interviews (virtual 1:1 sessions) to receive feedback from various tech backgrounds 📃 You will be paired with a mentor who is knowledgeable in the same or a similar career path to yours to ensure relevant feedback! 👌
A mentor will be paired with you based on your career interests to provide insightful feedback and advice to rock your job search - dont miss out! If youre interested, please sign up! We would love to help you feel ready and confident for the upcoming job hunt. After signing up, youll soon receive a link to the Discord server in which this event takes place. Our collaborating clubs are excited to bring you this opportunity to sharpen your job hunting skills 🧠 If youre interested, please apply!
👉 Apply using this link https://bit.ly/s22-bootcamp-mentee-signup!
Alternatively, you can email us at exec@csclub.uwaterloo.ca with the year and program youre in, along with interested job paths.
📅 Deadline to Apply: May 12th 2022, 11:59 PM EST

View File

@ -0,0 +1,21 @@
---
name: 'Bootcamp: Resume Reviews'
short: 'Come to receive insightful feedback and advice on your resume to rock your job search!'
date: 'May 14 2022 18:00'
online: true
location: 'Discord'
poster: 'images/events/2022/spring/Bootcamp-Mentee-Applications.png'
registerLink: https://bit.ly/s22-bootcamp-mentee-signup
---
📢 Applications for Bootcamp are now OPEN! 📢 CSC is bringing back Bootcamp to gear you up for your next recruiting season, partnered with @uwaterloodsc, @uwblueprint, @uwaterloowics, @uwaterloopm, @uw_ux, and @techplusuw! 💻 The drop-in resume review event takes place May 14th 6:00 - 10:00 PM EST.
💁‍♀️ Sign up as a mentee, and join our experienced mentors in Resume Reviews and Mock Interviews (virtual 1:1 sessions) to receive feedback from various tech backgrounds 📃 You will be paired with a mentor who is knowledgeable in the same or a similar career path to yours to ensure relevant feedback! 👌
A mentor will be paired with you based on your career interests to provide insightful feedback and advice to rock your job search - dont miss out! If youre interested, please sign up! We would love to help you feel ready and confident for the upcoming job hunt. After signing up, youll soon receive a link to the Discord server in which this event takes place. Our collaborating clubs are excited to bring you this opportunity to sharpen your job hunting skills 🧠 If youre interested, please apply!
👉 Apply using this link https://bit.ly/s22-bootcamp-mentee-signup!
Alternatively, you can email us at exec@csclub.uwaterloo.ca with the year and program youre in, along with interested job paths.
📅 Deadline to Apply: May 12th 2022, 11:59 PM EST

View File

@ -0,0 +1,21 @@
---
name: 'CxC Summit - ML Edition'
short: 'Join CSCs first Clubs x Companies Summit to learn about Machine Learning and network with some UW tech clubs and prestigious companies!'
date: 'May 19 2022 18:00'
online: true
location: 'Online'
poster: 'images/events/2022/spring/CxC-Summit.png'
registerLink: https://bit.ly/3KMDftE
---
📣 CxC Summit - ML Edition 📣
🤩 Interested in learning about Machine Learning? Want to gain more experience by deploying NLP or image processing projects? Join CSC's first Clubs x Companies Summit to learn and network with some UW tech clubs and prestigious companies!
💻 This weeklong online learnathon will include beginner-friendly workshops and networking events. Participants can tackle different ML challenges created by the clubs and companies, ranging from binary classification to sequential image prediction. There are prizes too!
📅 Event Date: Thursday, May 19th - Sunday, May 29th
👉 Register using this link: https://bit.ly/3KMDftE!
Hope to see you there!

View File

@ -0,0 +1,14 @@
---
name: 'Spring 2022 Elections'
short: 'CS Club will be holding elections for the Spring 2022 term on Thursday, May 5th at 5:30 pm in DC 1351.'
date: 'May 5 2022 17:30'
online: false
location: 'DC 1351'
poster: 'images/events/2022/spring/Spring-2022-Elections.png'
---
CS Club will be holding elections for the Spring 2022 term on Thursday, May 5th at 5:30 pm in DC 1351.
Come to learn more about CSC, sign up for membership, and vote on our new execs!
The president, vice-president, treasurer, and assistant vice-president will be elected, and the sysadmin will be appointed.
If you have any questions about elections, please email cro@csclub.uwaterloo.ca.

View File

@ -0,0 +1,17 @@
---
name: "Code Party"
short: "CS Club is hosting our first Code Party since the pandemic started. Come code and chill (in-person!) with us!"
date: "March 25 2022 18:00"
online: false
location: "STC 0060"
poster: "images/events/2022/winter/Code-Party.png"
registerLink: "https://forms.gle/M4YzJeHpt2RiY1HHA"
---
CS Club is hosting our first Code Party since the pandemic started, from 6 pm until 9 pm in STC 0060, on Friday, March 25. Come code and chill (in-person!) with us!
Personal projects you want to work on? Homework assignments you need to finish? Or want some time to explore new technology and meet new people in a casual, minimal-stress environment? You can do all this and more at our Code Party! All experience levels are welcome.
Come any time after 6 pm. Food will be provided.
Registration is not required, but it is highly recommended. Register at https://forms.gle/M4YzJeHpt2RiY1HHA. Alternatively, you can also email us at exec@csclub.uwaterloo.ca to let us know you're interested.

View File

@ -0,0 +1,25 @@
---
name: 'CSC EOT Social Night'
short: 'CSC is hosting a fun night of activities to celebrate the end of the term, with scavenger hunts, trivia, paint night sessions, board games, charades and more! '
date: 'April 03 2022 18:00'
online: false
location: 'DC 1351'
poster: 'images/events/2022/winter/EOT.png'
registerLink: https://bit.ly/w22-eot-signup
---
📢 Phew, what a term! CSC is hosting a fun night of activities to celebrate the end of the term, with scavenger hunts, trivia, paint night sessions, board games, charades and more!
🎉 Come join us on Sunday April 3rd, from 6-7PM for the Scavenger Hunt, and 7-9PM for our night of activities!
✨Some reminders before attending our event:
1. Registration is required to attend our in-person event - register at https://bit.ly/w22-eot-signup!
2. Please remember to keep face coverings on at all times when youre indoors.
3. There are limited quantities for paint supplies! First come, first serve 🎨
4. Make sure to bring your WATcard in order to win prizes! Only those that have paid MathSoc fees in their tuition will be able to receive the prizes for activities.
🥳 This event is limited to those with a CSC membership. If youd like to sign up for one, visit https://csclub.uwaterloo.ca/get-involved/ or come with your watcard on the day of to sign up for FREE!
📆 Event Date: April 3rd at 6-9PM ET at DC 1351
👉 Register at https://bit.ly/w22-eot-signup. Alternatively, you can email us at exec@csclub.uwaterloo.ca to sign up.

View File

@ -0,0 +1,19 @@
---
name: "Unix 101: FS/Perms & vim"
short: "Join CSC's Systems Committee (syscom) for the second session of an introductory series on GNU/Linux!"
date: "March 26 2022 14:00"
online: true
location: "Twitch"
poster: 'images/events/2022/winter/Unix-101-2.png'
---
Do you want to start editing with vim? Looking to learn about the Unix file system? Youve come to the right place! ✍ CSCs Systems Committee (syscom) is back with a workshop on File Systems, Permissions, and a tutorial on vim for our 2nd session of Unix 101! 💻
🙆‍♂️ Unix 101 is a 4-part, beginner-friendly series on the Unix operating system. Attendance in previous sessions is not required to understand the proceeding ones, but is strongly encouraged to make sure you get the most out of our workshops! ✨
👆 We additionally recommend joining CSC to access our machines for more hands-on activity. Learn more about how you can do so at https://csclub.uwaterloo.ca/get-involved/!
🧠 Head over to our Twitch on March 26th from 2-3PM ET for our second session of Unix 101!
📅 Event Date: Saturday March 26th @ 2-3PM ET on Twitch
🔗 Twitch: https://www.twitch.tv/uwcsclub

View File

@ -8,8 +8,8 @@ a bunch of ways you can join and help out.
### General Membership
<details>
<summary>In-person Term</summary>
<details open>
<summary>In-person</summary>
1. Drop by our office in **MC 3036/3037** with
- your WatCard, and
@ -22,12 +22,13 @@ That's all! After your account has been created, you'll have access to all the
#### Membership Renewal
Just drop by the office with $2 for each term which you wish to renew.
You do not need to bring your WatCard or sign the usage agreement again.
You do not need to bring your WatCard or sign the machine usage agreement
again.
</details>
<details open>
<summary>Online Term</summary>
<details>
<summary>Online</summary>
Email the CSC Systems Committee at
[syscom@csclub.uwaterloo.ca](mailto:syscom@csclub.uwaterloo.ca) from your
@ -38,26 +39,15 @@ University of Waterloo email address with the following:
3. your acknowledgement of having read, understood, and agreeing with our
[Machine Usage Agreement](/resources/machine-usage-agreement).
<!--~~You will need to pay the membership fee of $2 through WUSA store.~~-->
MathSoc has waived membership fees for the Winter 2022 term, so just send syscom
an email and we'll be happy to register your CSC account for free this term.
**Note: we no longer use Paypal to process memberships.**
We are currently working on an alternative solution for processing membership
fees online. Please check back later!
#### Membership Renewal
**Membership renewals for the Winter 2022 term are free.**
**Note: we no longer use Paypal to process memberships.**
For all other terms...
<!--<p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick"/>
<input type="hidden" name="hosted_button_id" value="9065852"/>
<button size="small" name="submit">Renew by PayPal</button>
</form>
</p>-->
We are currently working on an alternative solution for processing membership
fees online. Please check back later!
Contact syscom to renew your membership for as many terms
as you wish. You do not need to send us your WatCard or sign the usage
@ -65,11 +55,11 @@ agreement again.
</details>
### Executive Committees
### Organizing Committees
Are you interested in using your skills to get involved with CSC? We have
committees covering everything from design to development, so no matter your
interests, weve got a place for you.
Are you interested in using your skills to get involved with CSC and help make
an impact on our community? We have committees covering everything from design
to development, so no matter your interests, weve got a place for you.
**CSC hires at the end of every term\***, so make sure to stay connected through
social media to keep up to date on when applications open!
@ -93,9 +83,12 @@ mail, configuration for IRC, Mattermost, Git hosting.
- Managing mirrors used by large public organizations and thousands of people
internationally.
Syscom is always looking for new members! If you'd like to join, just send an email to syscom@csclub.uwaterloo.ca containing a brief introduction about yourself and any experience you have with GNU/Linux.
Syscom is always looking for new members! If you'd like to join, just send an
email to syscom@csclub.uwaterloo.ca containing a brief introduction about
yourself and any experience you have with GNU/Linux.
### Elected Roles
Each term, the CSC holds elections to determine the executive council:
- President

View File

@ -0,0 +1,19 @@
---
author: 'a258wang'
date: 'April 28 2022 00:00'
---
📣 The Spring 2022 Bootcamp Event is looking for mentors to take on resume critiques, host mock interviews, and help prepare students for their co-op search! This is an awesome opportunity for anyone to give back to the Waterloo community and make an impact on a students co-op search.
📅 There is a resume review event happening on May 14th from 6:00pm-10:00 PM EST and a mock interview event on May 21st from 6:00pm-10:00 PM EST.
You can choose to participate at either event for a select number of hours!
All sessions will take place virtually on our Bootcamp Discord Server! Students will have a chance to meet with you 1 on 1 to discuss their resumes/conduct their interviews.
👉 Sign up at https://bit.ly/s22-bootcamp-mentor-signup
Alternatively, you can email us at exec@csclub.uwaterloo.ca with the year and program youre in, along with interested job paths.
📅 Deadline to Apply for Resume Reviews: May 11th, 2022, 11:59PM EST
📅 Deadline to Apply for Mock Interviews: May 18th, 2022, 11:59PM EST

View File

@ -0,0 +1,19 @@
---
author: 'a258wang'
date: 'May 02 2022 00:00'
---
CSC Cloud has been released!
Ever wanted a virtual private server (VPS) like GCP or AWS, but balked at the price?
Now you can get FREE cloud computing, included with your CSC membership!
Specs:
- 8 CPU cores
- 8 GB RAM
- 40 GB disk space
Split between up to 8 different VMs, all yours!
Read the documentation at https://docs.cloud.csclub.uwaterloo.ca/ to get started today!
Note: If you need additional resources, email syscom@csclub.uwaterloo.ca with your reasoning and we will do our best to accommodate you.

View File

@ -0,0 +1,26 @@
---
author: 'a258wang'
date: 'May 5 2022 00:00'
---
Spring 2022 elections have concluded. Here are your executives for the term:
- President: Eden Chan (e223chan)
- Vice President: Bonnie Peng (b38peng)
- Assistant Vice President: Haley Song (h79song)
- Treasurer: Sat Arora (s97arora)
- Sysadmin: Raymond Li (r389li)
<!-- -->
Additionally, the following postions were appointed:
- Head Community Coordinator: Sat Arora (s97arora)
- Heads of Discord: Mark Chen (m375chen) and Alex Zhang (xc22zhan)
- Head of Design: Aaryan Shroff (a2shroff)
- Heads of Events: Bonnie Peng (b38peng) and Catherine Wan (c29wan)
- Head of External Affairs: Eric Liu (e59liu)
- Head of Marketing: Haley Song (h79song)
- Office Manager: Sat Arora (s97arora)
<!-- -->

View File

@ -0,0 +1,15 @@
---
author: 'b72zhou'
date: 'March 27 2022 00:00'
---
📣 CS Clubs Internal Committee is hiring for Spring 2022! 📣
Are you interested in organizing program-wide events, reaching out to industry professionals, or being a member of an impactful community? Are you passionate about making a difference in the UW CS and surrounding communities?
Apply for a role on CS Club's Internal Committee for Spring 2022! We are looking for people like you to join our Programme Committee and/or Systems Committee! 🙌
👀 Role descriptions can be found at https://bit.ly/uwcsclub-s22-roles.
⏲️ The form will close on Monday April 11, at 11:59PM EST, so apply ASAP! We'll reach out through email after this date for interview slots/questions.
👉 Apply at https://bit.ly/csc-s22-apply! Alternatively, you can email us at exec@csclub.uwaterloo.ca from your UW email with an introduction of yourself, which positions you're interested in and any questions you might have!

View File

@ -0,0 +1,20 @@
---
author: 'a258wang'
date: 'March 30 2022 00:00'
---
Are you graduating this year and looking back on your time at UW? 💭 Do you want to share your experiences, learn about others experiences and create something youll be able to look back on years from now? Well CSC is launching its first ever Class Profile for the CS Class of 2022! 🎉
🤔 What is a Class Profile?
👉 Its a voluntary and confidential survey that asks questions about YOUR experience as a CS/CFM/CS-BBA student at the University of Waterloo. After the data collection, we will release a summary of the responses in the form of a website so you can learn more about your graduating class.
📌 Why should I fill it out?
👉 To share your experience as a CS Student at UW.
👉 To create a web page that will not only be entertaining for you to view with your friends but also serve as a guide for current and future CS students to get a glimpse into being a CS student.
👉 To be entered in a draw to win 1 of 3 gift cards valued at $25, $25, $50!
👀 How do I fill it out?
👉 Fill the form out at https://bit.ly/uw-cs22-class-profile!
📅 The form must be submitted by April 29, 2022 at 11:59pm EST for your response to be recorded and to be eligible for the giveaway. Make sure to get your fellow CS 22 friends to fill it out as well!
Please note that while this survey is confidential, in order to fulfill the giveaway we need to collect your email; however this will be stored separately from the form. If you have any questions or concerns, feel free to contact us through our Discord or email us at exec@csclub.uwaterloo.ca! 💙

View File

@ -0,0 +1,11 @@
---
index: 63
title: 'Unix 101 Winter 2022 Session 1'
presentors:
- CSC Systems Committee
thumbnails:
small: 'https://mirror.csclub.uwaterloo.ca/csclub/Unix-101-Winter-2022-Session-1.jpg'
links:
- file: 'https://mirror.csclub.uwaterloo.ca/csclub/Unix-101-Winter-2022-Session-1.mp4'
type: 'Talk (mp4)'
---

View File

@ -1,6 +0,0 @@
---
name: Juthika Hoque
role: President
---
Hi!! Im Juthika, a 2B CS student. I joined CSC in Spring 2021, and instantly found the community that I felt had been missing in CS due to an online first year. The visions and the goals of CSC have resonated with me since I joined, and quickly developed into a passion for me. I hope that as President, I can lead CSC while keeping our mission in mind to make the computing community a better place for everyone.

View File

@ -1,6 +0,0 @@
---
name: Eric Huang
role: Vice President
---
Hi! I'm Eric, a 2B CS student. As VP, I help lead our passionate events team that bring lots of wonderful opportunities to the CSC public! The CSC community has helped me grow in lots of ways, and I hope to provide the same experience for anyone interested in Computer Science. Besides doing the non-stop school grind, you can usually find me playing volleyball or watching anime. Don't be afraid to reach out to me on Discord for a chat, or say hi to me in any way! 😁

View File

@ -1,6 +0,0 @@
---
name: Dina Orucevic
role: Assistant Vice President
---
Hi everyone, Im Dina, a rising 1B student in Systems Design Engineering! Im so glad I get the chance to lead a group of interested students to make the CS community even more inclusive, diverse, and engaging! In my free time I love snapping film photos, going to dog parks (even though I dont own a dog) and reading a good novel.

View File

@ -1,11 +0,0 @@
---
name: Eden Chan
role: Treasurer
---
👋 Hello! Im Eden and Im a second year CS student.
As treasurer, I make sure that CSC has the funds to run all the 🔥🔥🔥 initiatives and events throughout the term.
I also help lead our amazing events team plan socials and community-focused events. 🚀🚀 🚀
Joining in Winter 2021, I warmed up to the vision that Kallen, Gordon, and Jason, our former Presidents, had for CSC.
Like them, I saw CSC as a chance to fill the cohort gap that Engineering had and that Computer Science lacked.
Other than grinding the Waterloo CS cycle, you can find me shamelessly plugging my anime piano covers and blog this term :3

View File

@ -1,6 +0,0 @@
---
name: Codey
role: Mascot
---
The one, the only, Codey! Codey is ecstatic to be your mascot for this term. Codey loves programming and playing on their laptop. You can often find Codey posing for event promo graphics, or chilling in the CSC discord.

View File

@ -0,0 +1,6 @@
---
name: Bonnie Peng
role: Vice-President
---
Hi there! I'm Bonnie, a 2B CS student from Nova Scotia! 🐟 CSC has given me so many opportunities to grow and flourish in the community, so I hope to give you the same kind of support, and as much as you need, as this term's VP! In my free time, I love bouncing around town with my camera and taking long walks at the mall 😋

View File

@ -0,0 +1,6 @@
---
name: Codey
role: Mascot
---
The one, the only, Codey! Codey is a friendly and welcoming Shiba who uses they/them pronouns. Codey loves programming and playing on their laptop. You can often find Codey posing for event promo graphics, or chilling in the CSC discord.

View File

@ -0,0 +1,6 @@
---
name: Sat Arora
role: Treasurer
---
Hi, I'm Sat! As a young member of the internal team who loves being around a community, I hope to help facilitate events and initiatives CSC is running this term. You can find me in the CSC Office @ MC3036 on most days, but other than that I love a good bike ride and taking in the fresh air. Come say hi sometime! 😄

View File

@ -22,5 +22,9 @@
{
"name": "Shahan NedaDahandeh",
"role": "Developer"
},
{
"name": "Aditya Thakral",
"role": "Alumni"
}
]

1
images/codey-404.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

View File

@ -53,6 +53,9 @@ interface Metadata {
location: string;
permaLink: string;
registerLink?: string;
year: string;
term: string;
slug: string;
}
export interface Event {
@ -82,6 +85,9 @@ export async function getEventBySlug(
).toString(),
// permaLink is based on the directory structure in /pages
permaLink: `/events/${year}/${term}/${slug}`,
year: year,
term: term,
slug: slug,
} as Metadata,
};
}

View File

@ -1,11 +1,32 @@
import { readFile, readdir, access } from "fs/promises";
import { readFile, access } from "fs/promises";
import path from "path";
import matter from "gray-matter";
import { Client } from "ldapts";
import { serialize } from "next-mdx-remote/serialize";
import { getCurrentTerm } from "@/lib/events";
import { capitalize } from "@/utils";
const EXECS_PATH = path.join("content", "team", "execs");
const fileType = ".md";
const FILETYPE = ".md";
const { year, term } = getCurrentTerm();
const execPositions: { [position: string]: string } = {
president: "President",
"vice-president": "Vice-President",
secretary: "Assistant Vice-President",
treasurer: "Treasurer",
sysadmin: "Systems Administrator",
};
const orderedExecPositions: string[] = [
"president",
"vice-president",
"secretary",
"treasurer",
"sysadmin",
];
export interface Metadata {
name: string;
@ -13,23 +34,93 @@ export interface Metadata {
image: string;
}
export async function getExecNames() {
return (await readdir(EXECS_PATH))
.filter((name) => name.endsWith(fileType))
.map((name) => name.slice(0, -1 * fileType.length));
export async function getExecNamePosPairs() {
if (process.env.USE_LDAP?.toLowerCase() !== "true") {
return [["codey", "mascot"]];
}
export async function getExec(fileName: string, convert = true) {
const raw = await readFile(path.join(EXECS_PATH, `${fileName}${fileType}`));
const { content, data: metadata } = matter(raw);
const image =
(metadata.image as string | undefined) ??
(await getMemberImagePath(metadata.name));
const url = "ldap://ldap1.csclub.uwaterloo.ca";
const searchDN = "ou=People,dc=csclub,dc=uwaterloo,dc=ca";
const client = new Client({ url });
// position: name
const execMembers: { [position: string]: string } = {};
let formattedExec: [string, string][] = [];
try {
await client.bind("", "");
const { searchEntries } = await client.search(searchDN, {
scope: "sub",
filter: `(&(objectClass=member)(term=${(term as string).slice(
0,
1
)}${year}))`,
});
// item.position might be an array if the member has more than one position
searchEntries.forEach((item) => {
if (typeof item.position === "string" && item.position in execPositions) {
execMembers[item.position] = item.cn as string;
} else if (item.position instanceof Array) {
item.position.forEach((p) => {
if ((p as string) in execPositions) {
execMembers[p as string] = item.cn as string;
}
});
}
});
formattedExec = orderedExecPositions.map((position) => {
return [
`${execMembers[position].split(" ")[0].toLowerCase()}-${execMembers[
position
]
.split(" ")[1]
.toLowerCase()}`,
position,
];
});
formattedExec = [...formattedExec, ["codey", "mascot"]];
} finally {
await client.unbind();
}
return formattedExec;
}
export async function getExec(name: string, pos: string, convert = true) {
let content, metadata;
try {
const raw = await readFile(path.join(EXECS_PATH, `${name}${FILETYPE}`));
({ content, data: metadata } = matter(raw));
const image = await getMemberImagePath(metadata.name);
return {
content: convert ? await serialize(content) : content,
metadata: { ...metadata, image } as Metadata,
};
} catch (err) {
// Capitalize the first letter of the first name and last name
const firstName = capitalize(name.split("-")[0]);
const lastName = capitalize(name.split("-")[1]);
const posName = execPositions[pos];
content = "Coming Soon!";
metadata = {
name: `${firstName} ${lastName}`,
role: `${posName}`,
};
const image = await getMemberImagePath(metadata.name);
return {
content: convert ? await serialize(content) : content,
metadata: { ...metadata, image } as Metadata,
};
}
}
async function getImage(imgPath: string) {

27
pages/404.module.css Normal file
View File

@ -0,0 +1,27 @@
.container {
display: flex;
align-items: center;
justify-content: center;
padding-bottom: calc(60rem / 16);
}
.codey {
width: calc(380rem / 16);
padding: calc(20rem / 16);
padding-right: 0;
}
.heading {
margin-top: 0;
}
@media only screen and (max-width: calc(768rem / 16)) {
.container {
flex-direction: column;
padding-bottom: calc(30rem / 16);
}
.codey {
padding: calc(20rem / 16) 0;
}
}

26
pages/404.tsx Normal file
View File

@ -0,0 +1,26 @@
import React from "react";
import { Image } from "@/components/Image";
import { Link } from "@/components/Link";
import { Title } from "@/components/Title";
import styles from "./404.module.css";
export default function Custom404() {
return (
<div className={styles.container}>
<div className={styles.text}>
<Title>404: Page Not Found</Title>
<h2>Error 404</h2>
<h1 className={styles.heading}>
We couldnt find the page youre looking for!
</h1>
<p>
<Link href="/">Click here to go back to the main page.</Link>
</p>
</div>
<Image src="images/codey-404.svg" className={styles.codey} />
</div>
);
}

View File

@ -11,7 +11,7 @@ import { TeamMemberCard } from "@/components/TeamMemberCard";
import { Title } from "@/components/Title";
import {
getExec,
getExecNames,
getExecNamePosPairs,
Metadata,
getMemberImagePath,
} from "@/lib/team";
@ -208,10 +208,12 @@ async function getTeamWithImages(team: TeamMember[]) {
}
export const getStaticProps: GetStaticProps<Props> = async () => {
const execNames = await getExecNames();
const execNamePosPairs = await getExecNamePosPairs();
const execs = (await Promise.all(
execNames.map((name) => getExec(name))
execNamePosPairs.map((namePosPair) =>
getExec(namePosPair[0], namePosPair[1])
)
)) as SerializedExec[];
const [

View File

@ -28,6 +28,7 @@ export default function EventInfoPage({ year, term, event }: Props) {
{...event.metadata}
date={new Date(event.metadata.date)}
showDescription
titleLinked={false}
>
<MDXRemote {...event.content} />
</EventCard>

View File

@ -75,6 +75,7 @@ export default function TermPage(props: Props) {
{...metadata}
date={new Date(metadata.date)}
key={metadata.name + metadata.date.toString()}
titleLinked={true}
>
<MDXRemote {...content} />
</EventCard>

View File

@ -17,8 +17,8 @@ export default function GetInvolved() {
<div className={styles.headerText}>
<h1>Get Involved!</h1>
<p>
If youre interested in helping out with CS Club, dont hesitate to
get in touch with us!
If youre interested in getting involved with CS Club, dont
hesitate to get in touch with us!
</p>
</div>
<Image src="images/get-involved/codey.svg" className={styles.codey} />