Commit Graph

19 Commits

Author SHA1 Message Date
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 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
William Tran 4237da76e3 Mobile Organized Content (#79)
continuous-integration/drone/push Build is passing Details
Co-authored-by: William Tran <william.tran1@uwaterloo.ca>
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Reviewed-on: #79
Reviewed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-authored-by: w25tran <w25tran@localhost>
Co-committed-by: w25tran <w25tran@localhost>
2021-08-27 15:18:55 -04:00
Aditya Thakral dc114f742e Add /resources/services page (#169)
continuous-integration/drone/push Build is passing Details
Closes #17

https://csclub.uwaterloo.ca/~a3thakra/csc/adi-resources-services-page

Reviewed-on: #169
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
2021-08-25 15:12:09 -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 af8c750c0c Change CSS variable names + create a themer (#109)
continuous-integration/drone/push Build is passing Details
Try it out at https://csclub.uwaterloo.ca/~a3thakra/website-demo/themer/

- Themes persist across website reloads
- Individual color reset buttons
- Reset all colors button

Reviewed-on: #109
Reviewed-by: n3parikh <n3parikh@localhost>
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-08-03 19:37:02 -04:00
Aditya Thakral 1fb308327f TechTalk Card + mini tech card (#71)
continuous-integration/drone/push Build is passing Details
fixes #35 and #34
- extra padding below poster image

Co-authored-by: catherine-w <37776108+catherine-w@users.noreply.github.com>
Co-authored-by: c29wan <c29wan@localhost>
Reviewed-on: #71
Reviewed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
2021-07-29 16:56:47 -04:00
Amy Wang 6a64013e5c Home Page UI (#88)
continuous-integration/drone/push Build is passing Details
Desktop and Mobile versions of the home page UI.

Closes #4 (we can create new issues for the remaining tasks)

Co-authored-by: Amy <minds10@hotmail.com>
Reviewed-on: #88
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-07-27 02:13:34 -04:00
Aditya Thakral ed3c3939e5 Standardize h1, h2, h3, h4, p margins (#90)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #90
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
2021-07-25 10:59:40 -04:00
Aditya Thakral 360d9e4b6f Get Involved Page! (#76)
continuous-integration/drone/push Build is passing Details
closes #13 and #24

- added the `<EmailSignup>` and `<ConnectWithUs>` components!
- adds the Get Involved Page

Co-authored-by: dora <d43su@uwaterloo.ca>
Co-authored-by: dora <d43su@csclub.uwaterloo.ca>
Reviewed-on: #76
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
2021-07-22 14:42:38 -04:00
Aditya Thakral b8a7957beb Mobile Navbar (#75)
continuous-integration/drone/push Build is passing Details
The mobile navbar is done (finally!), except for a swipe gesture to close the navbar.

Closes #30 and #2

Co-authored-by: Amy
Reviewed-on: #75
Reviewed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
2021-07-07 18:13:39 -04:00
Adi Thakral 93ede558a4 Fix font-size, line-height, and some other smaller changes 2021-06-27 03:33:09 +00:00
Linhui Luo 7a08e0c331 Footer 2021-06-13 23:55:25 +00:00
William Tran dc0cc390c1 OrganizedContent 2021-06-10 01:12:44 +00:00
Aditya Thakral 4f5496ba8c Use 16px as default font-size for desktops 2021-05-24 15:27:44 -04:00
Amy Wang 4393037e94 Navbar 2021-05-18 03:16:32 -04:00
Linhui Luo efd9eecdca Create MiniEventCard 2021-05-12 00:34:49 -04:00
Amy abf75af472 Add Poppins font family 2021-05-09 00:35:57 -04:00
Aditya Thakral eddce7c909 Add ThemeContext
This implementation uses CSS variables, and not CSS in JS. This is done
so that we can support users who disable JS on their browsers.

Fixes #20
2021-04-28 04:22:30 -04:00