Merge branch 'main' of https://git.csclub.uwaterloo.ca/www/www-new into feat/meet-the-team-page

pull/94/head
b38peng 2 years ago
commit b14e196a4f
  1. 2
      components/Bubble.module.css
  2. 6
      components/Button.module.css
  3. 3
      components/ConnectWithUs.module.css
  4. 1
      components/DefaultLayout.module.css
  5. 3
      components/EmailSignup.module.css
  6. 2
      components/EventCard.module.css
  7. 7
      components/EventDescriptionCard.module.css
  8. 4
      components/Footer.module.css
  9. 8
      components/Input.module.css
  10. 4
      components/Link.module.css
  11. 8
      components/MiniEventCard.module.css
  12. 40
      components/MiniTechTalkCard.module.css
  13. 22
      components/MiniTechTalkCard.tsx
  14. 23
      components/Navbar.module.css
  15. 9
      components/NewsCard.module.css
  16. 20
      components/OrganizedContent.module.css
  17. 4
      components/SocialLinks.module.css
  18. 4
      components/TeamMember.module.css
  19. 2
      components/TeamMemberCard.module.css
  20. 34
      components/TechTalkCard.module.css
  21. 24
      components/TechTalkCard.tsx
  22. 178
      components/Theme.tsx
  23. 24
      components/playground.module.css
  24. 33
      components/playground.tsx
  25. 36
      components/theme.tsx
  26. 19
      content/playground/temp.talk.mdx
  27. 7
      deploy-demo.bash
  28. 71
      next-env.d.ts
  29. 1
      next.config.js
  30. 9093
      package-lock.json
  31. 22
      package.json
  32. 116
      pages/_app.css
  33. 4
      pages/_app.tsx
  34. 56
      pages/about/index.module.css
  35. 30
      pages/about/index.tsx
  36. 9
      pages/about/our-supporters.module.css
  37. 11
      pages/font.css
  38. 64
      pages/get-involved.module.css
  39. 6
      pages/get-involved.tsx
  40. 1
      pages/index.mdx
  41. 201
      pages/index.module.css
  42. 91
      pages/index.tsx
  43. 21
      pages/playground.mdx
  44. 38
      pages/themer.module.css
  45. 78
      pages/themer.tsx
  46. BIN
      public/fonts/futura-bold.woff
  47. BIN
      public/fonts/futura-bold.woff2
  48. 27
      public/images/home/codey_sitting.svg
  49. 3
      renovate.json
  50. 1
      tsconfig.json
  51. 84
      types.d.ts

@ -3,5 +3,5 @@
}
.bubble:nth-child(odd) {
background-color: var(--blue-1-20);
background-color: var(--primary-accent-light);
}

@ -2,8 +2,8 @@
.link {
font-family: "Poppins", "sans-serif";
border-radius: calc(20rem / 16);
background-color: var(--blue-2);
color: white;
background-color: var(--primary-accent);
color: var(--primary-background);
border: none;
outline: none;
transition-duration: 0.3s;
@ -13,7 +13,7 @@
.button:hover,
.link:hover {
background-color: var(--teal-2);
background-color: var(--secondary-accent);
cursor: pointer;
}

@ -1,8 +1,7 @@
.header {
color: var(--blue-2);
color: var(--primary-accent);
font-weight: 600;
font-size: calc(36rem / 16);
margin-bottom: calc(12rem / 16);
}
.socialLinks {

@ -2,5 +2,4 @@
margin: 0 auto;
max-width: calc(800rem / 16);
padding: 0 calc(20rem / 16);
padding-bottom: calc(20rem / 16);
}

@ -3,10 +3,9 @@
}
.header {
color: var(--blue-2);
color: var(--primary-accent);
font-weight: 600;
font-size: calc(36rem / 16);
margin-bottom: calc(12rem / 16);
}
.button {

@ -41,7 +41,7 @@
}
.content > h2 {
color: var(--purple-2);
color: var(--primary-heading);
font-size: 1rem;
margin-bottom: calc(14rem / 16);
}

@ -4,7 +4,7 @@
max-width: calc(540rem / 16);
padding: calc(24rem / 16);
border-radius: calc(20rem / 16);
background-color: white;
background-color: var(--primary-background);
}
.poster {
@ -35,7 +35,7 @@
.setting {
margin: 0;
color: var(--blue-2);
color: var(--primary-accent);
font-size: calc(14rem / 16);
font-weight: 600;
}
@ -50,6 +50,7 @@
@media only screen and (max-width: calc(768rem / 16)) {
.card {
max-width: unset;
padding: 0;
background-color: transparent;
}
@ -66,7 +67,7 @@
.poster {
width: calc(95rem / 16);
height: calc(95rem / 16);
border: 1px solid var(--purple-2);
border: 1px solid var(--primary-heading);
box-sizing: border-box;
margin-right: calc(14rem / 16);
}

@ -1,6 +1,6 @@
.footer {
box-sizing: border-box;
background: var(--purple-2);
background: var(--primary-heading);
height: calc(66rem / 16);
padding: calc(14rem / 16) 0;
width: 100%;
@ -18,7 +18,7 @@
}
.text {
color: var(--white);
color: var(--primary-background);
font-style: normal;
text-align: center;
}

@ -8,20 +8,20 @@
border: 0;
border-radius: calc(20rem / 16);
background-color: var(--grey-1-24);
background-color: var(--input-background);
font-size: calc(18rem / 16);
line-height: calc(30rem / 16);
color: var(--grey-3);
color: var(--input-text);
}
.input::placeholder {
color: var(--grey-2);
color: var(--input-placeholder-text);
font-weight: 700;
}
.input:is(:active, :hover, :focus) {
box-sizing: border-box;
border: calc(3rem / 16) solid var(--blue-1);
border: calc(3rem / 16) solid var(--primary-accent-soft);
border-radius: calc(20rem / 16);
outline: none;
padding: calc(7rem / 16) calc(28rem / 16);

@ -1,10 +1,10 @@
.link {
color: var(--blue-2);
color: var(--primary-accent);
transition-duration: 0.3s;
text-decoration: none;
white-space: normal;
}
.link:hover {
color: var(--teal-2);
color: var(--secondary-accent);
}

@ -5,7 +5,7 @@
}
.card:nth-child(odd) {
background-color: var(--teal-2-20);
background-color: var(--secondary-accent-light);
}
.name {
@ -19,7 +19,7 @@
}
.info {
color: var(--purple-2);
color: var(--primary-heading);
margin-bottom: calc(12rem / 16);
}
@ -29,7 +29,7 @@
right: 0;
cursor: pointer;
margin: calc(20rem / 16);
color: var(--blue-2);
color: var(--primary-accent);
font-size: calc(14rem / 16);
}
@ -46,5 +46,5 @@
}
.dropDownIcon {
fill: var(--blue-2);
fill: var(--primary-accent);
}

@ -0,0 +1,40 @@
.card {
display: flex;
flex-direction: row;
box-sizing: border-box;
padding: calc(16rem / 16);
color: var(--purple-2);
font-size: 1rem;
}
.card aside {
max-width: calc(142rem / 16);
margin-right: calc(45rem / 16);
display: flex;
justify-content: center;
align-items: center;
}
.card aside img {
max-width: calc(142rem / 16);
max-height: 100%;
object-fit: cover;
}
.content {
padding: calc(4rem / 16);
}
.content h1 {
margin: 0;
margin-top: calc(4rem / 16);
font-size: calc(18rem / 16);
}
.card section {
padding-bottom: 0;
}
.spacer {
margin-top: calc(76rem / 16);
}

@ -0,0 +1,22 @@
import { DEFAULT_MIN_VERSION } from "node:tls";
import React from "react";
import { Image } from "./Image";
import styles from "./MiniTechTalkCard.module.css";
interface MiniTechTalkProps {
name: string;
short: string;
poster?: string;
}
export function MiniTechTalkCard({ name, poster, short }: MiniTechTalkProps) {
return (
<article className={styles.card}>
<aside>{poster && <Image alt={name} src={poster} />}</aside>
<div className={styles.content}>
<h1>{name}</h1>
<p>{short}</p>
</div>
</article>
);
}

@ -2,8 +2,9 @@
display: flex;
justify-content: center;
align-items: center;
z-index: 10;
background-color: var(--white);
background-color: var(--primary-background);
}
.navContent {
@ -62,16 +63,16 @@
}
.navMenu a {
color: var(--purple-2);
color: var(--primary-heading);
text-decoration: none;
}
.navMenu a.currentPage {
color: var(--blue-2);
color: var(--primary-accent);
}
.navMenu > li > a:hover {
color: var(--blue-2);
color: var(--primary-accent);
font-weight: 600;
}
@ -115,8 +116,8 @@
padding: 0;
border-radius: calc(8rem / 16);
background-color: var(--white);
box-shadow: 0 calc(8rem / 16) 1rem var(--blue-1-20);
background-color: var(--primary-background);
box-shadow: 0 calc(8rem / 16) 1rem var(--primary-accent-light);
font-size: calc(14rem / 16);
}
@ -133,7 +134,7 @@
.dropdown li:hover a,
.dropdown li a:focus {
background-color: var(--blue-1-20);
background-color: var(--primary-accent-light);
}
.dropdown li:first-child a {
@ -154,13 +155,13 @@
/* On a smaller desktop screen, keep the same navbar layout but decrease the
* horizontal padding so it still fits
*/
@media screen and (max-width: calc(960rem / 16)) {
@media only screen and (max-width: calc(960rem / 16)) {
.navContent {
padding: calc(28rem / 16) calc(64rem / 16);
}
}
@media screen and (max-width: calc(768rem / 16)) {
@media only screen and (max-width: calc(768rem / 16)) {
.navContent {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
@ -223,7 +224,7 @@
left: 0;
z-index: 20;
background-color: var(--navbar-gray);
background-color: var(--navbar-page-overlay);
opacity: 0;
transition: 0.5s;
@ -243,7 +244,7 @@
padding: calc(calc(64rem / 16) - 1rem);
padding-left: calc(calc(78rem / 16) - 1rem);
background-color: var(--off-white);
background-color: var(--secondary-background);
transform: translateX(100vw);
transition: 0.5s;

@ -1,7 +1,7 @@
.card {
padding: calc(30rem / 16) calc(40rem / 16);
max-width: calc(524rem / 16);
background-color: var(--white);
background-color: var(--primary-background);
border-radius: calc(20rem / 16);
}
@ -11,7 +11,7 @@
}
.author {
color: var(--purple-1);
color: var(--secondary-heading);
font-style: normal;
}
@ -22,9 +22,14 @@
@media only screen and (max-width: calc(768rem / 16)) {
.card {
padding: 0;
max-width: unset;
background-color: transparent;
}
.date {
font-weight: 600;
}
.content > *:first-child {
margin-top: 1rem;
}

@ -6,7 +6,7 @@
margin: 1rem 0;
font-size: calc(24rem / 16);
font-weight: 600;
color: var(--blue-2);
color: var(--primary-accent);
}
.content {
@ -17,7 +17,7 @@
.nav {
margin: calc(8rem / 16) calc(32rem / 16) 0 0;
color: var(--purple-2);
color: var(--primary-heading);
font-weight: 500;
}
@ -26,7 +26,7 @@
overflow: hidden;
white-space: nowrap;
font-size: calc(14rem / 16);
border-bottom: calc(1rem / 16) solid var(--blue-2-25);
border-bottom: calc(1rem / 16) solid var(--primary-accent-light);
align-items: center;
height: calc(40rem / 16);
width: calc(284rem / 16);
@ -41,8 +41,8 @@
}
.selected {
background-color: var(--blue-1-05);
color: var(--blue-2);
background-color: var(--primary-accent-dim);
color: var(--primary-accent);
font-weight: 700;
}
@ -56,7 +56,7 @@
.selected .marker {
display: inline;
background-color: var(--blue-2);
background-color: var(--primary-accent);
height: calc(24rem / 16);
width: calc(4rem / 16);
margin-right: 1rem;
@ -73,7 +73,7 @@
flex: 1;
display: flex;
cursor: pointer;
color: var(--purple-2);
color: var(--primary-heading);
font-size: calc(12rem / 16);
}
@ -88,15 +88,15 @@
}
.arrowHeading {
color: var(--blue-2);
color: var(--primary-accent);
font-size: calc(14rem / 16);
font-weight: 700;
border-bottom: calc(2rem / 16) solid var(--blue-2);
border-bottom: calc(2rem / 16) solid var(--primary-accent);
padding-bottom: calc(4rem / 16);
}
.arrow {
fill: var(--blue-2);
fill: var(--primary-accent);
margin-top: calc(27rem / 16);
}

@ -18,9 +18,9 @@
}
.blue {
fill: var(--blue-1);
fill: var(--primary-accent-soft);
}
.white {
fill: var(--white);
fill: var(--primary-background);
}

@ -19,12 +19,12 @@
.name {
font-weight: 700;
color: var(--blue-2);
color: var(--primary-accent);
}
.role {
font-weight: 600;
color: var(--purple-2);
color: var(--primary-heading);
}
@media only screen and (max-width: calc(768rem / 16)) {

@ -29,7 +29,7 @@
grid-area: name;
margin: 0;
color: var(--blue-2);
color: var(--primary-accent);
font-size: calc(36rem / 16);
font-weight: 600;
}

@ -0,0 +1,34 @@
.card {
display: flex;
flex-direction: row;
box-sizing: border-box;
}
.card aside {
flex: 0 0 calc(287rem / 16);
margin-right: calc(24rem / 16);
}
.card aside img {
width: 100%;
margin-bottom: 1rem;
}
.spacer {
margin-top: calc(76rem / 16);
}
.card h1 {
font-size: calc(24rem / 16);
font-weight: 700;
font-style: normal;
margin-top: 0;
margin-bottom: 0;
color: var(--blue-2);
}
@media only screen and (max-width: calc(768rem / 16)) {
.card {
flex-direction: column;
}
}

@ -0,0 +1,24 @@
import React, { ReactNode } from "react";
import { Image } from "./Image";
import styles from "./TechTalkCard.module.css";
interface TechTalkProps {
name: string;
poster?: string;
children: ReactNode;
}
export function TechTalkCard({ name, poster, children }: TechTalkProps) {
return (
<article className={styles.card}>
<aside>
{poster && <Image alt={name} src={poster} />}
{!poster && <div className={styles.spacer}></div>}
</aside>
<section className={styles.content}>
<h1>{name}</h1>
<div>{children}</div>
</section>
</article>
);
}

@ -0,0 +1,178 @@
import React, {
createContext,
ReactElement,
useContext,
useEffect,
useState,
} from "react";
type BuiltInThemes = "light" | "dark";
export interface Theme {
name: BuiltInThemes | "custom";
palette: Palette;
}
export type SetThemeInput = BuiltInThemes | Partial<Palette>;
export const PALETTE_NAMES = [
"--primary-background",
"--secondary-background",
"--primary-accent",
"--primary-accent-soft",
"--primary-accent-light",
"--primary-accent-dim",
"--secondary-accent",
"--secondary-accent-light",
"--primary-heading",
"--secondary-heading",
"--text",
"--form-invalid",
"--input-background",
"--input-placeholder-text",
"--input-text",
"--navbar-page-overlay",
] as const;
export const emptyPalette = PALETTE_NAMES.reduce(
(partial, varName) => ({
...partial,
[varName]: "#c4e0f8",
}),
{} as Palette
);
const ThemeContext =
createContext<
| {
theme: Theme;
setTheme(input: SetThemeInput): void;
save(): void;
clearSaved(): void;
}
| undefined
>(undefined);
export interface Props {
children?: ReactElement;
}
export function ThemeProvider(props: Props) {
const update = useForcedUpdate();
const [themeName, setThemeName] =
useState<Theme["name"] | undefined>(undefined);
const setTheme = (input: SetThemeInput) => {
if (typeof input === "string") {
PALETTE_NAMES.forEach((name) =>
document.body.style.setProperty(name, "")
);
if (input === "light") {
document.body.classList.remove("dark");
} else if (input === "dark") {
document.body.classList.add("dark");
}
setThemeName(input);
} else {
const properties = Object.keys(input) as PaletteNames[];
properties.forEach((property) =>
document.body.style.setProperty(
property,
input[property]?.trim() ?? null
)
);
setThemeName("custom");
}
update();
};
useEffect(() => {
const customPalette = getSavedPalette();
if (customPalette == null) {
setThemeName("light");
} else {
setTheme(customPalette);
setThemeName("custom");
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
return (
<ThemeContext.Provider
value={
themeName == null
? undefined
: {
theme: {
name: themeName,
get palette() {
return getCurrentPalette();
},
},
setTheme,
save: () => savePalette(getCurrentPalette()),
clearSaved: clearSavedPalette,
}
}
>
{props.children}
</ThemeContext.Provider>
);
}
export function useThemeContext() {
return useContext(ThemeContext);
}
export type PaletteNames = typeof PALETTE_NAMES[number];
export type Palette = {
[key in PaletteNames]: string;
};
function getCurrentPalette() {
const styles = getComputedStyle(document.body);
return PALETTE_NAMES.reduce(
(partial, varName) => ({
...partial,
[varName]: styles.getPropertyValue(varName).trim(),
}),
{} as Palette
);
}
function useForcedUpdate() {
const [fakeState, setFakeState] = useState(true);
return () => setFakeState(!fakeState);
}
const STORAGE_KEY = "csc-theme-palette";
function getSavedPalette() {
const raw = localStorage.getItem(STORAGE_KEY);
return raw == null ? undefined : (JSON.parse(raw) as Palette);
}
function savePalette(palette: Palette) {
localStorage.setItem(STORAGE_KEY, JSON.stringify(palette));
}
function clearSavedPalette() {
localStorage.removeItem(STORAGE_KEY);
}

@ -1,13 +1,13 @@
.newsDemo {
padding: calc(50rem / 16);
background-color: var(--off-white);
background-color: var(--secondary-background);
display: inline-block;
}
.newsTitle {
font-style: normal;
font-weight: bold;
color: var(--purple-2);
color: var(--primary-heading);
font-size: calc(24rem / 16);
line-height: calc(36 / 24);
margin-bottom: calc(14rem / 16);
@ -19,20 +19,20 @@
font-size: calc(14rem / 16);
line-height: calc(21 / 14);
white-space: pre-line;
color: var(--purple-2);
color: var(--primary-heading);
vertical-align: baseline;
}
.news > hr {
border: none;
height: calc(1rem / 16);
background-color: var(--purple-2);
background-color: var(--primary-heading);
margin: 0 0 calc(13rem / 16) 0;
}
.eventDescriptionCardDemo {
padding: calc(50rem / 16) 0;
background-color: var(--off-white);
background-color: var(--secondary-background);
display: inline-block;
}
@ -54,7 +54,7 @@
.committee {
margin: 0;
color: var(--purple-2);
color: var(--primary-heading);
font-weight: 600;
font-size: calc(24rem / 16);
line-height: calc(36 / 24);
@ -63,7 +63,7 @@
.teamMemberDemo > hr {
border: none;
height: calc(1rem / 16);
background-color: var(--blue-2);
background-color: var(--primary-accent);
width: 100%;
margin-top: calc(24rem / 16);
margin-bottom: calc(46rem / 16);
@ -78,20 +78,24 @@
.linkDemo {
padding: calc(50rem / 16);
background-color: var(--off-white);
background-color: var(--secondary-background);
}
.linkTitle {
font-weight: bold;
color: var(--purple-2);
color: var(--primary-heading);
font-size: calc(24rem / 16);
}
.miniTechTalkDemo > *:nth-child(odd) {
background: var(--secondary-accent-light);
}
@media only screen and (max-width: calc(768rem / 16)) {
.newsDemo,
.eventDescriptionCardDemo {
padding: calc(20rem / 16);
background-color: var(--off-white);
background-color: var(--secondary-background);
}
.eventDescriptionCardDemo > * {

@ -38,6 +38,10 @@ import CodeyInfo, {
metadata as codeyMetadata,
} from "../content/playground/codey.team-member.mdx";
import TempTechTalk, {
metadata as tempTechTalkMetadata,
} from "../content/playground/temp.talk.mdx";
import { MiniEventCard } from "./MiniEventCard";
import { NewsCard } from "./NewsCard";
import { Link } from "./Link";
@ -47,6 +51,9 @@ import { TeamMember } from "./TeamMember";
import { TeamMemberCard } from "./TeamMemberCard";
import { OrganizedContent, LinkProps } from "./OrganizedContent";
import { Button } from "./Button";
import { Footer } from "./Footer";
import { TechTalkCard } from "./TechTalkCard";
import { MiniTechTalkCard } from "./MiniTechTalkCard";
const events = [
{ Content: OOTBReact, metadata: OOTBReactEventMetadata },
@ -217,3 +224,29 @@ export function OrganizedContentDemo() {
<OrganizedContent sections={sections} currentId={id} link={FakeLink} />
);
}
export function TechTalkDemo() {
return (
<div>
<TechTalkCard {...tempTechTalkMetadata}>
<TempTechTalk />
</TechTalkCard>
</div>
);
}
export function MiniTechTalkDemo() {
return (
<div className={styles.miniTechTalkDemo}>
<MiniTechTalkCard {...tempTechTalkMetadata}>
<TempTechTalk />
</MiniTechTalkCard>
<MiniTechTalkCard {...tempTechTalkMetadata}>
<TempTechTalk />
</MiniTechTalkCard>
<MiniTechTalkCard {...tempTechTalkMetadata}>
<TempTechTalk />
</MiniTechTalkCard>
</div>
);
}

@ -1,36 +0,0 @@
import React, { createContext, ReactElement, useEffect, useState } from "react";
type Theme = "light" | "dark";
const ThemeContext = createContext<{
theme: Theme;
setTheme(newTheme: Theme): void;
}>({
theme: "light",
setTheme: () => {
throw new Error("Use ThemeProvider instead.");
},
});
interface Props {
theme: Theme;
children?: ReactElement;
}
export function ThemeProvider({ children, theme }: Props) {
const [currentTheme, setTheme] = useState(theme);
useEffect(() => {
if (currentTheme === "light") {
document.body.classList.remove("dark");
} else if (currentTheme === "dark") {
document.body.classList.add("dark");
}
}, [currentTheme]);
return (
<ThemeContext.Provider value={{ theme: currentTheme, setTheme }}>
{children}
</ThemeContext.Provider>
);
}

@ -0,0 +1,19 @@
export const metadata = {
name: "Tech Talk Title",
short: "Learn how React works and make your own version!",
poster: "/images/playground/alt-tab.jpg",
};
You've got a game, but you didn't write it. You're running it by emulating the machine it was meant to run on, and the machine it was
meant to run on never had support for networking. Now, you want to play with your friend, over the Internet. Oh, and it's not
acceptable to incur any latency between your controller and the game while we're at it. Surely that can't be possible, right?
Wrong. This talk will discuss the re-emulation technique for netplay used commercially by a system called GGPO and freely in
an emulator frontend called RetroArch, and how similar techniques can be applied to make networking work in other scenarios
it was never meant for. This will be an unprepared, impromptu talk with no slides, so it should either be a fascinating dive
into a little-heard-of technique, or an impenetrable mess of jargon and algorithms. Either way, it should be fun. Professor
Richards is the maintainer of the netplay infrastructure for RetroArch, a popular emulator frontend for multiple platforms.
# Download
- BitTorrent:[Netplay in Emulators (mp4)]
- HTTP (web browser):[Netplay in Emulators (mp4)]

@ -0,0 +1,7 @@
#!/bin/bash
export NEXT_PUBLIC_BASE_PATH="/~$USER/website-demo"
rm -rf ~/www/website-demo
npm install
npm run build
npm run export
mv out ~/www/website-demo

71
next-env.d.ts vendored

@ -1,72 +1,3 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
declare module "*.event.mdx" {
import { ComponentType } from "react";
interface EventMetadata {
name: string;
short: string;
date: Date;
online: boolean;
location: string;
poster?: string;
registerLink?: string;
}
const ReactComponent: ComponentType;
export const metadata: EventMetadata;
export default ReactComponent;
}
declare module "*.news.mdx" {
import { ComponentType } from "react";
interface NewsMetadata {
author: string;
date: Date;
}
const ReactComponent: ComponentType;
export const metadata: NewsMetadata;
export default ReactComponent;
}
declare module "*.team-member.mdx" {
import { ComponentType } from "react";
interface TeamMemberMetadata {
name: string;
role: string;
image?: string;
}
const ReactComponent: ComponentType;
export const metadata: TeamMemberMetadata;
export default ReactComponent;
}
declare module "*.section.mdx" {
import { ComponentType } from "react";
interface SectionMetadata {
title: string;
id: string;
}
const ReactComponent: ComponentType;
export const metadata: SectionMetadata;
export default ReactComponent;
}
declare module "*.mdx" {
import { ComponentType } from "react";
const ReactComponent: ComponentType;
export default ReactComponent;
}
/// <reference types="next/image-types/global" />

@ -6,4 +6,5 @@ module.exports = withMDX({
pageExtensions: ["ts", "tsx", "mdx"],
trailingSlash: true,
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
eslint: { ignoreDuringBuilds: true }
});

9093
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -12,32 +12,32 @@
"dependencies": {
"@mdx-js/loader": "^1.6.22",
"@mdx-js/react": "^1.6.22",
"@next/mdx": "^10.1.3",
"@next/mdx": "11.0.1",
"date-fns": "^2.11.1",
"next": "^10.0.0",
"next-mdx-remote": "^3.0.2",
"next": "11.0.1",
"next-mdx-remote": "3.0.4",
"prettier": "^2.3.0",
"react": "17.0.1",
"react-dom": "17.0.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"remark": "^12.0.0",
"remark-html": "^12.0.0"
},
"devDependencies": {
"@types/mdx-js__react": "^1.5.3",
"@types/node": "^14.14.41",
"@types/react": "^17.0.3",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"eslint": "^7.25.0",
"@types/react": "^17.0.14",
"@typescript-eslint/eslint-plugin": "4.28.4",
"@typescript-eslint/parser": "4.28.4",
"eslint": "7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.23.2",
"eslint-plugin-react": "7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"gray-matter": "^4.0.3",
"postcss": "^8.3.0",
"postcss-calc": "^8.0.0",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-preset-env": "^6.7.0",
"typescript": "^4.2.4"
"typescript": "4.3.5"
}
}

@ -4,33 +4,32 @@ html {
body {
/* Default is light theme */
--white: #ffffff;
--off-white: #fdf8f5;
--teal-1: #76ffdc;
--teal-2: #4ed4b2;
--teal-2-20: #4ed4b234;
--blue-1: #5caff9;
--blue-1-05: #5caff90d;
--blue-1-20: #5caff934;
--blue-2: #1482e3;
--blue-2-25: #1482e340;
--purple-1: #525284;
--purple-2: #2a2a62;
--black: #000000;
--grey-1: #c4c4c4;
--grey-1-24: #c4c4c440;
--grey-2: #bbbbbb;
--grey-3: #6b6b6b;
--red: #9f616a;
--gradient-blue-green: linear-gradient(
99.94deg,
#1481e3 -17.95%,
#4ed4b2 172.82%
);
/* used in mobile navbar background */
--navbar-gray: #787878b2;
color: var(--black);
--primary-background: #ffffff;
--secondary-background: #fdf8f5;
--primary-accent: #1482e3;
--primary-accent-soft: #5caff9;
--primary-accent-light: #c4e0f8;
--primary-accent-dim: #f7fbff;
--secondary-accent: #4ed4b2;
--secondary-accent-light: #dcf6f0;
--primary-heading: #2a2a62;
--secondary-heading: #525284;
--text: #000000;
--form-invalid: #9f616a;
--input-background: #f0f0f0;
--input-placeholder-text: #bbbbbb;
--input-text: #6b6b6b;
--navbar-page-overlay: #787878b2;
background-color: var(--primary-background);
color: var(--text);
font-family: "Poppins", "sans-serif";
font-size: 1rem;
font-weight: 400;
@ -39,25 +38,12 @@ body {
margin: 0;
}
/* FIXME: Dark theme is the same as light theme right now */
input {
font-family: "Poppins", "sans-serif";
}
.dark {
--white: #ffffff;
--off-white: #fdf8f5;
--teal-1: #76ffdc;
--teal-2: #4ed4b2;
--blue-1: #5caff9;
--blue-1-05: #5caff90d;
--blue-1-20: #5caff934;
--blue-2: #1482e3;
--purple-1: #525284;
--purple-2: #2a2a62;
--gradient-blue-green: linear-gradient(
99.94deg,
#1481e3 -17.95%,
#4ed4b2 172.82%
);
/* used in mobile navbar background */
--navbar-gray: #787878b2;
/* FIXME: Implement dark theme */
}
h1,
@ -68,7 +54,13 @@ h5,
h6 {
font-style: normal;
line-height: 1.5;
color: var(--purple-2);
color: var(--primary-heading);
}
h1,
h2 {
margin-top: calc(32rem / 16);
margin-bottom: calc(16rem / 16);
}
h1 {
@ -78,19 +70,45 @@ h1 {
h2 {
font-size: calc(36rem / 16);
font-weight: 700;
font-weight: 600;
}
h3 {
margin-top: calc(24rem / 16);
margin-bottom: calc(16rem / 16);
font-size: calc(24rem / 16);
font-weight: 600;
}
h4 {
margin-top: calc(24rem / 16);
margin-bottom: calc(8rem / 16);
font-size: calc(18rem / 16);
font-weight: 600;
}
input {
font-family: "Poppins", "sans-serif";
p {
margin: 1rem 0;
}
/*
* A lot of elements right next to an h4 (eg p, ol, ul, etc) have a 16px margin.
* We need to make sure that the next item has an 8px margin-top.
*/
h4 + * {
margin-top: calc(8rem / 16);
}
@media only screen and (max-width: calc(768rem / 16)) {
/* h1, h2 = h3 on mobile */
h1,
h2 {
margin-top: calc(24rem / 16);
margin-bottom: calc(16rem / 16);
font-size: calc(24rem / 16);
font-weight: 600;
}
}

@ -2,7 +2,7 @@ import React, { ComponentType, ReactNode } from "react";
import { NextComponentType, NextPageContext } from "next";
import { AppProps as DefaultAppProps } from "next/app";
import { MDXProvider } from "@mdx-js/react";
import { ThemeProvider } from "../components/theme";
import { ThemeProvider } from "../components/Theme";
import { Navbar } from "../components/Navbar";
import { Footer } from "../components/Footer";
import { Link } from "../components/Link";
@ -16,7 +16,7 @@ export default function App({ Component, pageProps }: AppProps): JSX.Element {
const Layout = Component.Layout ?? DefaultLayout;
return (
<ThemeProvider theme="light">
<ThemeProvider>
<MDXProvider components={{ a: Link }}>
<div className={styles.appContainer}>
<Navbar />

@ -1,23 +1,20 @@
.page {
margin-bottom: calc(20rem / 16);
}
.title {
color: var(--purple-2);
font-size: calc(48rem / 16);
height: calc(80rem / 16);
margin-top: auto;
padding-left: calc(20rem / 16);
}
.content {
color: black;
background-color: white;
}