Commit Graph

31 Commits

Author SHA1 Message Date
Aditya Thakral 44af493832 Do not use index: as metadata for OrganizedContent (#468)
continuous-integration/drone/push Build is passing Details
@merenber recently merged this #462

It is a little annoying that we have to manually change the index in literally all the other unrelated files.

This PR introduces an ORDER.json file that orders the sections as an array.

Reviewed-on: #468
Reviewed-by: Shahan Neda <snedadah@csclub.uwaterloo.ca>
Reviewed-by: Amy <a258wang@csclub.uwaterloo.ca>
2022-06-18 23:07:04 -04:00
Jared He e1af564621 Redesign and update 'Meet the Team' data (#452)
continuous-integration/drone/push Build is passing Details
Closes #450. Closes #436.

Co-authored-by: Jared He <66887902+jaredjhe@users.noreply.github.com>
Reviewed-on: #452
Reviewed-by: Amy <a258wang@csclub.uwaterloo.ca>
2022-06-17 19:53:13 -04:00
Mark Chiu f631f4013f Implement dark theme (Closes #287) (#407)
continuous-integration/drone/push Build is passing Details
* The website will have a dark theme or a light theme depending on your OS preferences. You can still customize in the `themer` page to override some properties.
* A toggle button in the footer to toggle between light mode and dark mode.
* Added a "Reset to dark mode" button in the `themer` page.

Staging link: https://csclub.uwaterloo.ca/~a3thakra/csc/dark-theme/

Co-authored-by: Miniapple8888 <miniapple8888@gmail.com>
Reviewed-on: #407
Reviewed-by: Amy <a258wang@csclub.uwaterloo.ca>
2022-06-08 08:45:28 -04:00
Shahan Nedadahandeh f12ffbb925 Add endDate to events (#446)
continuous-integration/drone/push Build is passing Details
Added endDate to events.
2022-05-25 20:58:12 -04:00
Amy Wang 0c94c4b3fb Add CxC Summit and Bonnie's exec blurb (#439)
continuous-integration/drone/push Build is passing Details
Also changed the spelling of a few things.

Staging: https://csclub.uwaterloo.ca/~a3thakra/csc/amy-events-cxc

Co-authored-by: Amy <a258wang@uwaterloo.ca>
Reviewed-on: #439
Reviewed-by: Shahan Nedadahandeh <snedadah@csclub.uwaterloo.ca>
2022-05-13 23:07:14 -04:00
Jared He 0f1e8b7e81 Link from [term] to [term]/[event] (#412)
continuous-integration/drone/push Build is passing Details
Closes #189

https://csclub.uwaterloo.ca/~a3thakra/csc/j285he-term-to-term-event/events/

Co-authored-by: Jared He <66887902+jaredjhe@users.noreply.github.com>
Reviewed-on: #412
Reviewed-by: n3parikh <n3parikh@csclub.uwaterloo.ca>
2022-03-23 20:23:21 -04:00
Beihao Zhou bb073136b0 Use LDAP API to fetch executive members' name (Closes #376) (#396)
continuous-integration/drone/push Build is passing Details
Co-authored-by: Rebecca-Chou <beihaozhou@gmail.com>
Reviewed-on: #396
Reviewed-by: n3parikh <n3parikh@csclub.uwaterloo.ca>
2022-03-16 02:17:32 -04:00
Beihao Zhou d04115fb12 Separate Teams on Meet the Team page (Close #346) (#404)
continuous-integration/drone/push Build is passing Details
Co-authored-by: Rebecca-Chou <beihaozhou@gmail.com>
Reviewed-on: #404
Reviewed-by: n3parikh <n3parikh@csclub.uwaterloo.ca>
2022-03-09 10:03:26 -05:00
Mark Chiu 31c81f8620 Add Multiple News Items on Homepage and Single News Item Page (Closes #281) (#390)
continuous-integration/drone/push Build is passing Details
* 3 News items are displayed on the homepage (`MiniNewsCard` component)
* Single News item path: `/news/20xx/term/20xx-xx-xx` (`NewsCard` component)
	* Purple header for the date
    * News items of the same date are displayed on the same page

Co-authored-by: Miniapple8888 <miniapple8888@gmail.com>
Reviewed-on: #390
Reviewed-by: Amy <a258wang@csclub.uwaterloo.ca>
2022-02-23 00:15:37 -05:00
Shahan Nedadahandeh bb78a3d53d Warning Header (Closes #205) (#394)
continuous-integration/drone/push Build is passing Details
Update:
In order to solve the issues discussed below, we decided to put the warnings in a json file, since they can be easily imported into a javascript file and webpack automatically bundles them with the client side app, so no static props is needed.

__________

To get the warning data, since it is something that needs to be on all pages, it makes sense for the component to go in the app.js file (similar to the nav bar). However, next.js has a cumbersome issue that it does not support getStaticProps in the app.ts file (and getStaticProps only works in page files), thus we have no way of requesting the warning data easily in the \<WarningHeader\> Component. (https://github.com/vercel/next.js/discussions/10949)

Here is my solution:
- Request the warning data on the client side through the use of an api.
    - I made a warning api (/api/currentWarning) which sends a json of the current warning
    - Advantage: warnings will always be up to date since it is recalculated on every request
    - Advantage: It can potentially incorporate with other CSC services who might need to know about the warning (eg linktree?)
    - Disadvantage: can get expensive if we have a lot of warnings, to fix this I can cache the current warning and only re-read the files every 24h if this is a problem, but if we don’t have that many warnings I think it should be fine
    - Disadvantage: listed below:

The current problem with what I implemented is that it doesn’t build in the production environment:
- The way we build the website, when we call “next export” that disables any api endpoints.
- According to this https://github.com/vercel/vercel/discussions/6551, if we want to allow api endpoints, we have to just do “next build”. This has implications that the site won’t be completely static anymore, but the other solutions also have similar problems  ( though the GitHub post says that next will still optimize for static with only next build).

Another advantage of allowing api’s is that maybe in the future we will implement other features where an api might be useful.

If you want to try it out, my branch works fine locally (when just running npm run dev or npm run build”)

Other possible solutions:
- Use getInitialProps inside _app.js, but this has the downside that it will “disable Automatic Static Optimization in pages without Static Generation.” (https://nextjs.org/docs/advanced-features/custom-app), which I believe will slow the whole site down, but, we will be able to still use the old build command I think, I am not sure of the full effect of this.
	- However, implementing this would also be relatively simple.

- Add the warning request to the getStaticProps of every single page, possibly through some wrapper component around every single page, this has the disadvantage that we need to do a lot of refactoring of all the pages of the site and cant use the intended “_app.ts” wrapper.

- Add warning header only to the homepage (or maybe one or two other important pages).

Co-authored-by: shahanneda <shahan.neda@gmail.com>
Reviewed-on: #394
Reviewed-by: Amy <a258wang@csclub.uwaterloo.ca>
2022-02-22 23:29:53 -05:00
Jared He 2264e60852 Add Term Type (#361)
continuous-integration/drone/push Build is passing Details
Co-authored-by: Jared He <66887902+jaredjhe@users.noreply.github.com>
Reviewed-on: #361
Reviewed-by: Amy <a258wang@csclub.uwaterloo.ca>
Reviewed-by: n3parikh <n3parikh@csclub.uwaterloo.ca>
Co-authored-by: j285he <j285he@localhost>
Co-committed-by: j285he <j285he@localhost>
2022-01-19 20:19:13 -05:00
Beihao Zhou fdb6bb1ccf Sort Members by name instead of userid (Fixes #371) (#384)
continuous-integration/drone/push Build is passing Details
Co-authored-by: Rebecca-Chou <beihaozhou@gmail.com>
Reviewed-on: #384
Reviewed-by: j285he <j285he@localhost>
Co-authored-by: Beihao Zhou <b72zhou@csclub.uwaterloo.ca>
Co-committed-by: Beihao Zhou <b72zhou@csclub.uwaterloo.ca>
2022-01-17 00:15:39 -05:00
Jared He e6315cf906 Generate members list (#354)
continuous-integration/drone/push Build is passing Details
#301

https://csclub.uwaterloo.ca/~a3thakra/csc/j285he-ldap/about/members/

Co-authored-by: Jared He <66887902+jaredjhe@users.noreply.github.com>
Co-authored-by: Jared He <j285he@uwaterloo.ca>
Reviewed-on: #354
Reviewed-by: n3parikh <n3parikh@csclub.uwaterloo.ca>
Co-authored-by: j285he <j285he@localhost>
Co-committed-by: j285he <j285he@localhost>
2021-11-22 12:47:00 -05:00
Amy Wang aae5c9adef Image Optimization Script (#348)
continuous-integration/drone/push Build is passing Details
A build-time script to optimize images. Note that going forward, all images should be placed in `images` instead of `public/images`.

Co-authored-by: Amy <a258wang@uwaterloo.ca>
Reviewed-on: #348
Reviewed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Reviewed-by: n3parikh <n3parikh@csclub.uwaterloo.ca>
Co-authored-by: Amy <a258wang@csclub.uwaterloo.ca>
Co-committed-by: Amy <a258wang@csclub.uwaterloo.ca>
2021-10-31 16:58:14 -04:00
Aditya Thakral 47352f4e82 Change date format for events and news (#343)
continuous-integration/drone/push Build is passing Details
https://csclub.uwaterloo.ca/~a3thakra/csc/adi-event-dates

Reviewed-on: #343
Reviewed-by: b38peng <b38peng@uwaterloo.ca>
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
2021-10-13 21:36:08 -04:00
Aditya Thakral 34fb652fb9 Dynamically generate event calendar (#332)
continuous-integration/drone/push Build is passing Details
Closes #134

- Dynamically generates the calendar before the export step
- I tested it with google calendar, updates are propagating as expected (it takes a day for google calendar to get updated)

You can try adding this URL to your calendar to test things out: https://csclub.uwaterloo.ca/~a3thakra/csc/adi-ical/events.ics

Reviewed-on: #332
Reviewed-by: n3parikh <n3parikh@csclub.uwaterloo.ca>
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
2021-09-27 16:20:18 -04:00
Neil Parikh 2f2c032bd7 add news event for resume review event (#313)
continuous-integration/drone/push Build is passing Details
https://csclub.uwaterloo.ca/~a3thakra/csc/n3parikh-resume-news/

Co-authored-by: Neil Parikh <n3parikh@csclub.uwaterloo.ca>
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Reviewed-on: #313
Reviewed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-authored-by: n3parikh <n3parikh@csclub.uwaterloo.ca>
Co-committed-by: n3parikh <n3parikh@csclub.uwaterloo.ca>
2021-09-15 21:25:44 -04:00
Neil Parikh e088ff1f4f Add permalink in event card (#316)
continuous-integration/drone/push Build is passing Details
https://csclub.uwaterloo.ca/~a3thakra/csc/permalink-homepage/

Co-authored-by: Neil Parikh <n3parikh@csclub.uwaterloo.ca>
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Reviewed-on: #316
Reviewed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-authored-by: n3parikh <n3parikh@csclub.uwaterloo.ca>
Co-committed-by: n3parikh <n3parikh@csclub.uwaterloo.ca>
2021-09-12 20:15:31 -04:00
Neil Parikh 71bdeecb77 Add BOT event (#296)
continuous-integration/drone/push Build is passing Details
https://csclub.uwaterloo.ca/~a3thakra/csc/n3parikh-patch-1/

https://csclub.uwaterloo.ca/~a3thakra/csc/n3parikh-patch-1/events/2021/fall/BOT/

Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Reviewed-on: #296
Co-authored-by: n3parikh <n3parikh@csclub.uwaterloo.ca>
Co-committed-by: n3parikh <n3parikh@csclub.uwaterloo.ca>
2021-09-08 13:50:22 -04:00
Aditya Thakral 964b112481 Move content to match routes (#289)
continuous-integration/drone/push Build is passing Details
Make sure that the advice, team, and tech-talk pages are loading properly

Reviewed-on: #289
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
2021-09-03 21:55:23 -04:00
Aditya Thakral a0d0b8e843 🚑️ Simplify getCurrentTerm to fix builds around the end of terms 🚑️ (#244)
continuous-integration/drone/push Build is passing Details
Goodbye date comparison when you can just do string comparison 🙃

Reviewed-on: #244
Reviewed-by: j285he <j285he@localhost>
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
2021-08-31 23:07:50 -04:00
Aditya Thakral 9c6d5ccf16 Remove Bill from Syscom + Fix Andrew's picture (#226)
continuous-integration/drone/push Build is passing Details
Fixes #196

https://csclub.uwaterloo.ca/~a3thakra/csc/adi-fix-syscom/about/team/

Reviewed-on: #226
Reviewed-by: Max Erenberg <merenber@csclub.uwaterloo.ca>
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
2021-08-29 22:42:00 -04:00
Aditya Thakral 6b88cf308b Add mobile styles to the event card (#190)
continuous-integration/drone/push Build is passing Details
closes #160
closes #154

https://csclub.uwaterloo.ca/~a3thakra/csc/adi-mobile-events-card/

Reviewed-on: #190
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
2021-08-28 15:56:23 -04:00
Jared He 5933dd03b8 Add /events page (#159)
continuous-integration/drone/push Build is passing Details
Closes #111

Blocked by !158

Co-authored-by: Jared He <66887902+jaredjhe@users.noreply.github.com>
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Reviewed-on: #159
Reviewed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-authored-by: j285he <j285he@localhost>
Co-committed-by: j285he <j285he@localhost>
2021-08-27 18:37:42 -04:00
Jared He e548bd9c5a Add /events/[year]/[term] page (#158)
continuous-integration/drone/push Build is passing Details
Closes #113

Co-authored-by: Jared He <66887902+jaredjhe@users.noreply.github.com>
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Reviewed-on: #158
Reviewed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-authored-by: j285he <j285he@localhost>
Co-committed-by: j285he <j285he@localhost>
2021-08-27 16:14:53 -04:00
Aditya Thakral eb4f372de7 Add /resources/tech-talks and /resources/tech-talks/[slug] (#180)
continuous-integration/drone/push Build is passing Details
Closes #36
Closes #37

Try it here: https://csclub.uwaterloo.ca/~a3thakra/csc/adi-tech-talks/

Reviewed-on: #180
Reviewed-by: n3parikh <n3parikh@localhost>
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
2021-08-26 00:30:30 -04:00
Amy Wang 490ec7660b Fetch upcoming events and recent news on home page (#162)
continuous-integration/drone/push Build is passing Details
- Home page displays the 2 soonest upcoming events.
    - If there are no upcoming events, displays a short message.
    - If there are 1-2 upcoming events, displays the events.
    - If there are more than 2 upcoming events, displays the events as well as a link to the Events page.
- Home page displays the most recent news.
    - If there is no news, displays a short message.

Closes #149

Co-authored-by: Amy <a258wang@uwaterloo.ca>
Reviewed-on: #162
Reviewed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-authored-by: Amy <a258wang@csclub.uwaterloo.ca>
Co-committed-by: Amy <a258wang@csclub.uwaterloo.ca>
2021-08-23 14:56:11 -04:00
b38peng a8cae99c11 Meet the Team page (#94)
continuous-integration/drone/push Build is passing Details
Includes mobile Team Member Card

Closes #9
Closes #42

Co-authored-by: Bonnie <bonniepeng2002@gmail.com>
Reviewed-on: #94
Reviewed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-authored-by: b38peng <b38peng@uwaterloo.ca>
Co-committed-by: b38peng <b38peng@uwaterloo.ca>
2021-08-23 11:11:42 -04:00
Aditya Thakral d1e6c89a0b Create the constitution page (#165)
continuous-integration/drone/push Build is passing Details
Closes #11
Closes #98

Reviewed-on: #165
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
2021-08-23 09:27:59 -04:00
Aditya Thakral 8b9389885c Add helper functions for news archive (#145) + Add /news/archive and /news/[year]/[term] pages (#146)
continuous-integration/drone/push Build is passing Details
Closes #138

Reviewed-on: #145
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
2021-08-17 15:22:19 -04:00
Jared He 64fbabf204 Add helper functions for fetching events (#115)
continuous-integration/drone/push Build is passing Details
helper functions for [year] and [year]/[term] only

closes #110

Co-authored-by: Jared He <66887902+jaredjhe@users.noreply.github.com>
Reviewed-on: #115
Reviewed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-authored-by: j285he <j285he@localhost>
Co-committed-by: j285he <j285he@localhost>
2021-08-17 14:58:06 -04:00