Fixes for dirents

pull/115/head
Jared He 2 years ago
commit 590b2554c0
  1. 10
      .drone.yml
  2. 28
      .eslintrc.js
  3. 2
      components/Bubble.module.css
  4. 2
      components/Bubble.tsx
  5. 6
      components/Button.module.css
  6. 1
      components/Button.tsx
  7. 2
      components/ConnectWithUs.module.css
  8. 6
      components/ConnectWithUs.tsx
  9. 1
      components/DefaultLayout.tsx
  10. 2
      components/EmailSignup.module.css
  11. 4
      components/EmailSignup.tsx
  12. 2
      components/EventCard.module.css
  13. 5
      components/EventCard.tsx
  14. 6
      components/EventDescriptionCard.module.css
  15. 6
      components/EventDescriptionCard.tsx
  16. 1
      components/EventSetting.tsx
  17. 4
      components/Footer.module.css
  18. 4
      components/Footer.tsx
  19. 8
      components/Input.module.css
  20. 1
      components/Input.tsx
  21. 4
      components/Link.module.css
  22. 4
      components/Link.tsx
  23. 8
      components/MiniEventCard.module.css
  24. 2
      components/MiniEventCard.tsx
  25. 3
      components/MiniTechTalkCard.tsx
  26. 18
      components/Navbar.module.css
  27. 4
      components/Navbar.tsx
  28. 4
      components/NewsCard.module.css
  29. 1
      components/NewsCard.tsx
  30. 20
      components/OrganizedContent.module.css
  31. 1
      components/OrganizedContent.tsx
  32. 4
      components/SocialLinks.module.css
  33. 1
      components/SocialLinks.tsx
  34. 4
      components/TeamMember.module.css
  35. 4
      components/TeamMember.tsx
  36. 2
      components/TeamMemberCard.module.css
  37. 2
      components/TeamMemberCard.tsx
  38. 2
      components/TechTalkCard.tsx
  39. 178
      components/Theme.tsx
  40. 22
      components/playground.module.css
  41. 61
      components/playground.tsx
  42. 36
      components/theme.tsx
  43. 2
      content/about/index.mdx
  44. 2
      content/about/our-supporters.mdx
  45. 7
      deploy-demo.bash
  46. 12
      lib/events.ts
  47. 2454
      package-lock.json
  48. 5
      package.json
  49. 77
      pages/_app.css
  50. 18
      pages/_app.tsx
  51. 6
      pages/about/index.module.css
  52. 11
      pages/about/index.tsx
  53. 6
      pages/about/our-supporters.module.css
  54. 5
      pages/about/our-supporters.tsx
  55. 10
      pages/get-involved.module.css
  56. 9
      pages/get-involved.tsx
  57. 10
      pages/index.module.css
  58. 27
      pages/index.tsx
  59. 8
      pages/playground.mdx
  60. 2
      pages/resources/index.tsx
  61. 38
      pages/themer.module.css
  62. 79
      pages/themer.tsx
  63. 4
      renovate.json
  64. 3
      tsconfig.json

@ -1,30 +1,30 @@
---
kind: pipeline
type: docker
name: node14
name: node16
steps:
- name: install-deps
image: node:14
image: node:16
commands:
- npm install
- name: lint
image: node:14
image: node:16
depends_on:
- install-deps
commands:
- npm run lint
- name: build
image: node:14
image: node:16
depends_on:
- install-deps
commands:
- npm run build
- name: export
image: node:14
image: node:16
depends_on:
- build
commands:

@ -9,6 +9,9 @@ module.exports = {
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:react/recommended",
"plugin:prettier/recommended",
],
@ -16,12 +19,37 @@ module.exports = {
rules: {
"prettier/prettier": "error",
"import/first": "error",
"import/order": [
"error",
{
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true,
},
"pathGroups": [
{
"pattern": "@/**",
"group": "external",
"position": "after",
},
{
"pattern": "./*.css",
"group": "index",
"position": "after",
}
],
},
],
"react/prop-types": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
// Turn off these rules
"@typescript-eslint/explicit-module-boundary-types": "off",
"import/no-unresolved": "off",
},
settings: {
react: {

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

@ -1,5 +1,7 @@
import React from "react";
import { DefaultLayout } from "./DefaultLayout";
import styles from "./Bubble.module.css";
export default function Bubble(props: { children: React.ReactNode }) {

@ -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,4 +1,5 @@
import React, { AnchorHTMLAttributes, ButtonHTMLAttributes } from "react";
import styles from "./Button.module.css";
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {

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

@ -1,7 +1,9 @@
import React from "react";
import styles from "./ConnectWithUs.module.css";
import { SocialLinks } from "./SocialLinks";
import { Link } from "./Link";
import { SocialLinks } from "./SocialLinks";
import styles from "./ConnectWithUs.module.css";
export function ConnectWithUs() {
return (

@ -1,4 +1,5 @@
import React from "react";
import styles from "./DefaultLayout.module.css";
export function DefaultLayout(props: { children: React.ReactNode }) {

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

@ -1,8 +1,10 @@
import React from "react";
import styles from "./EmailSignup.module.css";
import { Button } from "./Button";
import { Input } from "./Input";
import styles from "./EmailSignup.module.css";
export function EmailSignup() {
return (
<section className={styles.container}>

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

@ -1,10 +1,11 @@
import React, { ReactNode } from "react";
import { Button } from "./Button";
import styles from "./EventCard.module.css";
import { Button } from "./Button";
import { EventSetting } from "./EventSetting";
import { Image } from "./Image";
import styles from "./EventCard.module.css";
interface EventCardProps {
name: string;
short: string;

@ -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;
}
@ -67,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,10 +1,12 @@
import React from "react";
import { Button } from "./Button";
import { Image } from "./Image";
import { EventSetting } from "./EventSetting";
import styles from "./EventDescriptionCard.module.css";
import { Image } from "./Image";
import { Discord, Twitch, Instagram, Facebook } from "./SocialLinks";
import styles from "./EventDescriptionCard.module.css";
interface Props {
name: string;
short: string;

@ -1,4 +1,5 @@
import React from "react";
import styles from "./EventSetting.module.css";
interface Props {

@ -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;
}

@ -1,7 +1,9 @@
import React from "react";
import styles from "./Footer.module.css";
import { SocialLinks } from "./SocialLinks";
import styles from "./Footer.module.css";
export function Footer() {
return (
<footer className={styles.footer}>

@ -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,4 +1,5 @@
import React, { InputHTMLAttributes } from "react";
import styles from "./Input.module.css";
export function Input(props: InputHTMLAttributes<HTMLInputElement>) {

@ -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);
}

@ -1,7 +1,7 @@
import NextLink, { LinkProps as NextLinkProps } from "next/link";
import React from "react";
import styles from "./Link.module.css";
import NextLink from "next/link";
import { LinkProps as NextLinkProps } from "next/link";
type Props = Omit<NextLinkProps, "href"> & { href: string };

@ -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);
}

@ -1,5 +1,7 @@
import React, { ReactNode } from "react";
import { EventSetting } from "./EventSetting";
import styles from "./MiniEventCard.module.css";
interface Props {

@ -1,6 +1,7 @@
import { DEFAULT_MIN_VERSION } from "node:tls";
import React from "react";
import { Image } from "./Image";
import styles from "./MiniTechTalkCard.module.css";
interface MiniTechTalkProps {

@ -4,7 +4,7 @@
align-items: center;
z-index: 10;
background-color: var(--white);
background-color: var(--primary-background);
}
.navContent {
@ -63,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;
}
@ -116,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);
}
@ -134,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 {
@ -224,7 +224,7 @@
left: 0;
z-index: 20;
background-color: var(--navbar-gray);
background-color: var(--navbar-page-overlay);
opacity: 0;
transition: 0.5s;
@ -244,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,9 @@
import React, { useReducer } from "react";
import Link from "next/link";
import { useRouter } from "next/router";
import React, { useReducer } from "react";
import { Image } from "./Image";
import styles from "./Navbar.module.css";
type Menu = {

@ -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;
}

@ -1,4 +1,5 @@
import React, { ReactNode } from "react";
import styles from "./NewsCard.module.css";
interface NewsCardProps {

@ -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);
}

@ -1,4 +1,5 @@
import React, { ReactNode, ComponentType } from "react";
import styles from "./OrganizedContent.module.css";
export interface LinkProps {

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

@ -1,4 +1,5 @@
import React from "react";
import styles from "./SocialLinks.module.css";
interface Props {

@ -18,10 +18,10 @@
.name {
font-weight: 700;
color: var(--blue-2);
color: var(--primary-accent);
}
.role {
font-weight: 600;
color: var(--purple-2);
color: var(--primary-heading);
}

@ -1,7 +1,9 @@
import React from "react";
import styles from "./TeamMember.module.css";
import { Image } from "./Image";
import styles from "./TeamMember.module.css";
interface TeamMemberProps {
name: string;
role: string;

@ -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;
}

@ -1,5 +1,7 @@
import React from "react";
import { Image } from "./Image";
import styles from "./TeamMemberCard.module.css";
interface TeamMemberCardProps {

@ -1,5 +1,7 @@
import React, { ReactNode } from "react";
import { Image } from "./Image";
import styles from "./TechTalkCard.module.css";
interface TechTalkProps {

@ -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,24 +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(--background-teal-2);
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 > * {

@ -1,59 +1,56 @@
import React, { useState } from "react";
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 Name, {
metadata as nameOrganizedContentMetadata,
} from "../content/playground/constitution/name.section.mdx";
import Purpose, {
metadata as purposeOrganizedContentMetadata,
} from "../content/playground/constitution/purpose.section.mdx";
import Membership, {
metadata as membershipOrganizedContentMetadata,
} from "../content/playground/constitution/membership.section.mdx";
import Officers, {
metadata as officersOrganizedContentMetadata,
} from "../content/playground/constitution/officers.section.mdx";
import CodeyInfo, {
metadata as codeyMetadata,
} from "../content/playground/codey.team-member.mdx";
import Duties, {
metadata as dutiesOrganizedContentMetadata,
} from "../content/playground/constitution/duties-of-officers.section.mdx";
import ExecutiveCouncil, {
metadata as executiveCouncilOrganizedContentMetadata,
} from "../content/playground/constitution/executive-council.section.mdx";
import UnavailableContent, {
metadata as unavailableMetadata,
} from "../content/playground/unavailable.news.mdx";
import Membership, {
metadata as membershipOrganizedContentMetadata,
} from "../content/playground/constitution/membership.section.mdx";
import Name, {
metadata as nameOrganizedContentMetadata,
} from "../content/playground/constitution/name.section.mdx";
import Officers, {
metadata as officersOrganizedContentMetadata,
} from "../content/playground/constitution/officers.section.mdx";
import Purpose, {
metadata as purposeOrganizedContentMetadata,
} from "../content/playground/constitution/purpose.section.mdx";
import { metadata as dogeMetadata } from "../content/playground/doge.team-member.mdx";
import CodeyInfo, {
metadata as codeyMetadata,
} from "../content/playground/codey.team-member.mdx";
import OOTBReact, {
metadata as OOTBReactEventMetadata,
} from "../content/playground/ootb-react.event.mdx";
import TempTechTalk, {
metadata as tempTechTalkMetadata,
} from "../content/playground/temp.talk.mdx";
import UnavailableContent, {
metadata as unavailableMetadata,
} from "../content/playground/unavailable.news.mdx";
import { MiniEventCard } from "./MiniEventCard";
import { NewsCard } from "./NewsCard";
import { Link } from "./Link";
import { Button } from "./Button";
import { EventCard } from "./EventCard";
import { EventDescriptionCard } from "./EventDescriptionCard";
import { Link } from "./Link";
import { MiniEventCard } from "./MiniEventCard";
import { MiniTechTalkCard } from "./MiniTechTalkCard";
import { NewsCard } from "./NewsCard";
import { OrganizedContent, LinkProps } from "./OrganizedContent";
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";
import styles from "./playground.module.css";
const events = [
{ Content: OOTBReact, metadata: OOTBReactEventMetadata },

@ -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>
);
}

@ -1,4 +1,4 @@
import Bubble from "./../../components/Bubble";
import Bubble from "@/components/Bubble";
<Bubble>

@ -18,7 +18,7 @@ The Computer Science club graciously thanks the Mathematics Endowment Fund for t
## MathSoc Capital Improvements Fund
The [MathSoc Capital Improvements Fund](http://mathsoc.uwaterloo.ca/council/policies/Capital+Improvements+Fund) has provided funding of new office hardware:
The [MathSoc Capital Improvements Fund](https://mathsoc.uwaterloo.ca/wp-content/uploads/Mathsoc_Policies.pdf#page=54) has provided funding of new office hardware:
- Strombola and Bit-Shifter hardware upgrade (new motherboard, CPU and RAM)
- 2x 8-port 10Gbps SFP+ network cards for the Math Student Orgs routers/switches

@ -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

@ -7,17 +7,13 @@ import { MDXRemoteSerializeResult } from "next-mdx-remote";
const EVENTS_PATH = path.join("content", "events");
export async function getYears(): Promise<string[]> {
return (await fs.readdir(EVENTS_PATH, { withFileTypes: true })).map(
(dirent) => dirent.name
);
return (await fs.readdir(EVENTS_PATH, { withFileTypes: true }))
.filter((dirent) => dirent.isDirectory())
.map((dirent) => dirent.name);
}
export async function getTermsByYear(year: string): Promise<string[]> {
return (
await fs.readdir(path.join(EVENTS_PATH, year), {
withFileTypes: true,
})
).map((dirent) => dirent.name);
return await fs.readdir(path.join(EVENTS_PATH, year));
}
interface Metadata {

2454
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -1,6 +1,10 @@
{
"version": "0.1.0",
"private": true,
"engines": {
"node": "^16",
"npm": "^7"
},
"scripts": {
"dev": "next dev",
"build": "next build",
@ -30,6 +34,7 @@
"@typescript-eslint/parser": "4.28.4",
"eslint": "7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.24.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",

@ -1,35 +1,31 @@
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%
);
--background-teal-2: rgb(78, 212, 178, 0.2);
/* used in mobile navbar background */
--navbar-gray: #787878b2;
/* used in home page */
--home-title-purple: #27153e;
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;
@ -42,25 +38,8 @@ input {
font-family: "Poppins", "sans-serif";
}