diff --git a/src/lib/components/board-member/board-member.svelte b/src/lib/components/board-member/board-member.svelte index 884733490..5f1096f22 100644 --- a/src/lib/components/board-member/board-member.svelte +++ b/src/lib/components/board-member/board-member.svelte @@ -4,11 +4,10 @@ export let src: string; export let alt: string; export let color = 'var(--acm-general-rgb)'; - export let legacy = false;
- +
diff --git a/src/lib/public/board/data/index.ts b/src/lib/public/board/data/index.ts index ae57f1af6..4398a49bd 100644 --- a/src/lib/public/board/data/index.ts +++ b/src/lib/public/board/data/index.ts @@ -1,32 +1,7 @@ -import { Term, type Team } from '$lib/public/board/types'; -import OFFICERS_JSON from './officers.json'; -import TIERS_JSON from './tiers.json'; -import TEAMS_JSON from './teams.json'; -export { COLORS } from './colors'; +export { default as TIERS_JSON } from './tiers.json'; +export { default as OFFICERS_JSON } from './officers.json' assert { type: 'json' }; +export { default as TEAMS_JSON } from './teams.json' assert { type: 'json' }; -export { OFFICERS_JSON, TIERS_JSON, TEAMS_JSON }; - -export const VISIBLE_TERMS = [ - Term.Fall23, - Term.Spring23, - Term.Fall22, - Term.Spring22, - Term.Fall21, - Term.Spring21, -]; - -export const TIERS = { ...TIERS_JSON }; - -export const OFFICERS = [...OFFICERS_JSON]; - -/** TEAMS is a map of internal teams by their name, {@link Team.id}. */ -export const TEAMS = [...TEAMS_JSON].reduce( - (tt: { [key: (typeof TEAMS_JSON)[number]['id']]: Team }, t) => { - tt[t.id] = t; - return tt; - }, - {} -); - -/** Pinned paths are featured on the landing page. */ -export const PINNED_TEAMS = [TEAMS.ai, TEAMS.algo, TEAMS.design, TEAMS.dev] as const; +export * from './colors'; +export * from './teams'; +export * from './terms'; diff --git a/src/lib/public/board/data/officers.json b/src/lib/public/board/data/officers.json index cc8d88351..2a37ded2a 100644 --- a/src/lib/public/board/data/officers.json +++ b/src/lib/public/board/data/officers.json @@ -1,7 +1,7 @@ [ { "fullName": "Armanul Ambia", - "legacyPicture": "armanul-ambia.webp", + "picture": "armanul-ambia.webp", "socials": { "github": "armanambia", "discord": "Arman Shiesty#1073", @@ -32,7 +32,7 @@ }, { "fullName": "Jason Anthony", - "legacyPicture": "jason-anthony.webp", + "picture": "jason-anthony.webp", "positions": { "S21": { "title": "Secretary", @@ -42,7 +42,7 @@ }, { "fullName": "Angel Armendariz", - "legacyPicture": "angel-armendariz.webp", + "picture": "angel-armendariz.webp", "positions": { "S22": { "title": "Dev Project Manager", @@ -52,7 +52,7 @@ }, { "fullName": "Sami Bajwa", - "legacyPicture": "sami-bajwa.webp", + "picture": "sami-bajwa.webp", "socials": { "github": "samixtures", "discord": "Sami#2175", @@ -127,7 +127,7 @@ }, { "fullName": "Johnathan Carranza", - "legacyPicture": "johnathan-carranza.webp", + "picture": "johnathan-carranza.webp", "positions": { "F21": { "title": "Dev Officer", @@ -171,7 +171,7 @@ }, { "fullName": "Alan Cortez", - "legacyPicture": "alan-cortez.webp", + "picture": "alan-cortez.webp", "socials": { "website": "alancortez1337.github.io/portfolio/", "github": "alancortez1337", @@ -199,7 +199,7 @@ }, { "fullName": "Wesley Chou", - "legacyPicture": "wesley-chou.webp", + "picture": "wesley-chou.webp", "socials": { "website": "sites.google.com/view/wesleychouengineering/home", "discord": "Wesley#3748", @@ -230,7 +230,7 @@ }, { "fullName": "Abel Daniel", - "legacyPicture": "placeholder.webp", + "picture": "placeholder.webp", "socials": { "github": "abledaniel", "discord": "stable#2099" @@ -244,7 +244,7 @@ }, { "fullName": "Ethan Davidson", - "legacyPicture": "ethan-davidson.webp", + "picture": "ethan-davidson.webp", "socials": { "github": "EthanThatOneKid", "discord": "EthanThatOneKid#3456", @@ -279,7 +279,7 @@ }, { "fullName": "Kevin Dillon", - "legacyPicture": "kevin-dillon.webp", + "picture": "kevin-dillon.webp", "positions": { "S21": { "title": "Algo Officer", @@ -345,7 +345,7 @@ }, { "fullName": "Eduardo Gomez", - "legacyPicture": "eduardo-gomez.webp", + "picture": "eduardo-gomez.webp", "positions": { "S21": { "title": "Nodebuds Officer", @@ -370,7 +370,7 @@ }, { "fullName": "Nurhaliza Hassan", - "legacyPicture": "nurhaliza-hassan.webp", + "picture": "nurhaliza-hassan.webp", "socials": { "github": "nurhaliza", "discord": "guac#8250", @@ -389,7 +389,7 @@ }, { "fullName": "Lisa Hong", - "legacyPicture": "lisa-hong.webp", + "picture": "lisa-hong.webp", "positions": { "S21": { "title": "Create Officer", @@ -399,7 +399,7 @@ }, { "fullName": "Joshua Hughes", - "legacyPicture": "joshua-hughes.webp", + "picture": "joshua-hughes.webp", "positions": { "S21": { "title": "ICC Representative", @@ -409,7 +409,7 @@ }, { "fullName": "Arish Imam", - "legacyPicture": "placeholder.webp", + "picture": "placeholder.webp", "socials": { "discord": "Ari123#6233", "linkedin": "arish-imam-10617a246" @@ -423,7 +423,7 @@ }, { "fullName": "Iftekharul Islam", - "legacyPicture": "iftekharul-islam.webp", + "picture": "iftekharul-islam.webp", "positions": { "S22": { "title": "Algo Officer", @@ -433,7 +433,7 @@ }, { "fullName": "Ibrahim Israr", - "legacyPicture": "ibrahim-israr.webp", + "picture": "ibrahim-israr.webp", "positions": { "S22": { "title": "Secretary", @@ -443,7 +443,7 @@ }, { "fullName": "Joel Anil John", - "legacyPicture": "joel-anil-john.webp", + "picture": "joel-anil-john.webp", "socials": { "github": "janiljohn", "discord": "BlueBird02#0877", @@ -498,7 +498,7 @@ }, { "fullName": "Rohan Kunchala", - "legacyPicture": "rohan-kunchala.webp", + "picture": "rohan-kunchala.webp", "socials": { "discord": "sirsandgnome#0235" }, @@ -519,7 +519,7 @@ }, { "fullName": "Andy Lasso", - "legacyPicture": "andy-lasso.webp", + "picture": "andy-lasso.webp", "positions": { "F21": { "title": "Dev Officer", @@ -529,7 +529,7 @@ }, { "fullName": "Logan Langdon", - "legacyPicture": "placeholder.webp", + "picture": "placeholder.webp", "socials": { "discord": "leauxgan" }, @@ -546,7 +546,7 @@ }, { "fullName": "Andrew Lau", - "legacyPicture": "andrew-lau.webp", + "picture": "andrew-lau.webp", "positions": { "S21": { "title": "Treasurer", @@ -582,7 +582,7 @@ }, { "fullName": "Minh Le", - "legacyPicture": "minh-le.webp", + "picture": "minh-le.webp", "positions": { "S22": { "title": "Dev Officer", @@ -592,7 +592,7 @@ }, { "fullName": "Nguyen Le", - "legacyPicture": "nguyen-le.webp", + "picture": "nguyen-le.webp", "positions": { "S22": { "title": "Data Analyst", @@ -602,7 +602,7 @@ }, { "fullName": "Tommy Le", - "legacyPicture": "tommy-le.webp", + "picture": "tommy-le.webp", "positions": { "F21": { "title": "Treasurer", @@ -616,7 +616,7 @@ }, { "fullName": "Eugene Lee", - "legacyPicture": "eugene-lee.webp", + "picture": "eugene-lee.webp", "positions": { "S21": { "title": "Nodebuds Officer", @@ -654,7 +654,7 @@ }, { "fullName": "Nolan Lee", - "legacyPicture": "nolan-lee.webp", + "picture": "nolan-lee.webp", "positions": { "S22": { "title": "Historian", @@ -664,7 +664,7 @@ }, { "fullName": "Aaron Lieberman", - "legacyPicture": "aaron-lieberman.webp", + "picture": "aaron-lieberman.webp", "socials": { "github": "AaronLieb", "discord": "alieb#0001", @@ -695,7 +695,7 @@ }, { "fullName": "Yao Lin", - "legacyPicture": "yao-lin.webp", + "picture": "yao-lin.webp", "socials": { "github": "yao-lin-902", "discord": "alfred#1781", @@ -725,7 +725,7 @@ }, { "fullName": "Shaleen Mathur", - "legacyPicture": "shaleen-mathur.webp", + "picture": "shaleen-mathur.webp", "positions": { "S21": { "title": "Workshop Manager", @@ -748,7 +748,7 @@ }, { "fullName": "Ean McGilvery", - "legacyPicture": "ean-mcgilvery.webp", + "picture": "ean-mcgilvery.webp", "positions": { "S21": { "title": "Nodebuds Officer", @@ -758,7 +758,7 @@ }, { "fullName": "Jorge Mejia", - "legacyPicture": "jorge-mejia.webp", + "picture": "jorge-mejia.webp", "socials": { "github": "jorgeemejia", "discord": "ChoccyMiltank (he/him)#9107", @@ -804,7 +804,7 @@ }, { "fullName": "Jordan Muir", - "legacyPicture": "placeholder.webp", + "picture": "placeholder.webp", "socials": { "discord": "muirror" }, @@ -840,7 +840,7 @@ }, { "fullName": "Serena Naranjo", - "legacyPicture": "serena-naranjo.webp", + "picture": "serena-naranjo.webp", "positions": { "F21": { "title": "Create Officer", @@ -870,7 +870,7 @@ }, { "fullName": "Dalisa Nguyen", - "legacyPicture": "dalisa-nguyen.webp", + "picture": "dalisa-nguyen.webp", "positions": { "S21": { "title": "Nodebuds Officer", @@ -880,7 +880,7 @@ }, { "fullName": "Kayla Nguyen", - "legacyPicture": "kayla-nguyen.webp", + "picture": "kayla-nguyen.webp", "positions": { "F21": { "title": "Create Officer", @@ -890,7 +890,7 @@ }, { "fullName": "Jacob Nguyen", - "legacyPicture": "jacob-nguyen.webp", + "picture": "jacob-nguyen.webp", "socials": { "github": "barrotbake", "discord": "Jacupwins#4676", @@ -928,7 +928,7 @@ }, { "fullName": "Taylor Noh", - "legacyPicture": "taylor-noh.webp", + "picture": "taylor-noh.webp", "positions": { "S21": { "title": "Nodebuds Officer", @@ -946,7 +946,7 @@ }, { "fullName": "Kirsten Ochoa", - "legacyPicture": "kirsten-ochoa.webp", + "picture": "kirsten-ochoa.webp", "socials": { "github": "ochoakirsten", "discord": "kirs10#4590", @@ -995,7 +995,7 @@ }, { "fullName": "Mike Ploythai", - "legacyPicture": "mike-ploythai.webp", + "picture": "mike-ploythai.webp", "positions": { "S21": { "title": "Create Officer", @@ -1013,7 +1013,7 @@ }, { "fullName": "Stephanie Pocci", - "legacyPicture": "stephanie-pocci.webp", + "picture": "stephanie-pocci.webp", "socials": { "github": "stephaniePocci", "discord": "Commodore Jellyfish#5175", @@ -1050,7 +1050,7 @@ }, { "fullName": "Alejandro Ramos", - "legacyPicture": "alejandro-ramos.webp", + "picture": "alejandro-ramos.webp", "socials": { "github": "AlexSpandex", "discord": "alex_thekid562#3114", @@ -1069,7 +1069,7 @@ }, { "fullName": "Nicolas Renteria", - "legacyPicture": "nicolas-renteria.webp", + "picture": "nicolas-renteria.webp", "positions": { "S21": { "title": "Marketing Chair", @@ -1079,7 +1079,7 @@ }, { "fullName": "Joel Rico", - "legacyPicture": "placeholder.webp", + "picture": "placeholder.webp", "socials": { "github": "jjoeldaniel", "discord": "jjoeldaniel", @@ -1094,7 +1094,7 @@ }, { "fullName": "Max Rivas", - "legacyPicture": "placeholder.webp", + "picture": "placeholder.webp", "socials": { "discord": "meexy23" }, @@ -1107,7 +1107,7 @@ }, { "fullName": "Wilbert Rodriguez", - "legacyPicture": "wilbert-rodriguez.webp", + "picture": "wilbert-rodriguez.webp", "positions": { "S21": { "title": "Intern Program Manager", @@ -1131,7 +1131,7 @@ }, { "fullName": "Ashley Rus", - "legacyPicture": "placeholder.webp", + "picture": "placeholder.webp", "socials": { "discord": "fshmngr" }, @@ -1148,7 +1148,7 @@ }, { "fullName": "Sara Sadek", - "legacyPicture": "placeholder.webp", + "picture": "placeholder.webp", "socials": { "github": "EBYEMJC1", "discord": "EBYEMJC1#0122", @@ -1163,7 +1163,7 @@ }, { "fullName": "Samuel Sandoval", - "legacyPicture": "samuel-sandoval.webp", + "picture": "samuel-sandoval.webp", "positions": { "S21": { "title": "Vice President, Dev Director", @@ -1173,7 +1173,7 @@ }, { "fullName": "Kavit Sanghavi", - "legacyPicture": "kavit-sanghavi.webp", + "picture": "kavit-sanghavi.webp", "positions": { "S21": { "title": "Algo Director", @@ -1183,7 +1183,7 @@ }, { "fullName": "Angel Santoyo", - "legacyPicture": "angel-santoyo.webp", + "picture": "angel-santoyo.webp", "socials": { "website": "angelsantoyo.com", "github": "anguzz", @@ -1222,7 +1222,7 @@ }, { "fullName": "Parth Sharma", - "legacyPicture": "parth-sharma.webp", + "picture": "parth-sharma.webp", "positions": { "S21": { "title": "Algo Officer", @@ -1265,7 +1265,7 @@ }, { "fullName": "Justin Stitt", - "legacyPicture": "justin-stitt.webp", + "picture": "justin-stitt.webp", "socials": { "github": "JustinStitt", "discord": "justins#4939", @@ -1301,7 +1301,7 @@ }, { "fullName": "Charlie Taylor", - "legacyPicture": "charlie-taylor.webp", + "picture": "charlie-taylor.webp", "socials": { "website": "peekoe.net", "github": "Peekoe", @@ -1321,7 +1321,7 @@ }, { "fullName": "Johnson Tong", - "legacyPicture": "johnson-tong.webp", + "picture": "johnson-tong.webp", "positions": { "S21": { "title": "Workshop Manager", @@ -1346,7 +1346,7 @@ }, { "fullName": "Alex Truong", - "legacyPicture": "alex-truong.webp", + "picture": "alex-truong.webp", "positions": { "F21": { "title": "Algo Officer", @@ -1356,7 +1356,7 @@ }, { "fullName": "Daniel Truong", - "legacyPicture": "daniel-truong.webp", + "picture": "daniel-truong.webp", "socials": { "website": "danieltruongg.com", "github": "anhduy1202", @@ -1384,7 +1384,7 @@ }, { "fullName": "Samuel Valls", - "legacyPicture": "samuel-valls.webp", + "picture": "samuel-valls.webp", "positions": { "S21": { "title": "Community Manager", @@ -1417,7 +1417,7 @@ }, { "fullName": "Karnikaa Velumani", - "legacyPicture": "karnikaa-velumani.webp", + "picture": "karnikaa-velumani.webp", "socials": { "github": "karnikaavelumani", "discord": "Karni#1080", @@ -1444,7 +1444,7 @@ }, { "fullName": "Kinsey Vo", - "legacyPicture": "placeholder.webp", + "picture": "placeholder.webp", "socials": { "github": "kinseyvo", "discord": "harleysdog", @@ -1459,7 +1459,7 @@ }, { "fullName": "Rina Watanabe", - "legacyPicture": "rina-watanabe.webp", + "picture": "rina-watanabe.webp", "positions": { "F21": { "title": "Dev Project Manager", @@ -1469,7 +1469,7 @@ }, { "fullName": "Kyle Whynott", - "legacyPicture": "placeholder.webp", + "picture": "placeholder.webp", "socials": { "github": "Kynot54", "discord": "_kylew", @@ -1484,7 +1484,7 @@ }, { "fullName": "Jason Wong", - "legacyPicture": "jason-wong.webp", + "picture": "jason-wong.webp", "socials": { "discord": "jasonw#2463" }, diff --git a/src/lib/public/board/data/teams.ts b/src/lib/public/board/data/teams.ts new file mode 100644 index 000000000..be2677be3 --- /dev/null +++ b/src/lib/public/board/data/teams.ts @@ -0,0 +1,14 @@ +import type { Team } from '$lib/public/board/types'; +import TEAMS_JSON from './teams.json'; + +/** TEAMS is a map of internal teams by their name, {@link Team.id}. */ +export const TEAMS = [...TEAMS_JSON].reduce( + (tt: { [key: (typeof TEAMS_JSON)[number]['id']]: Team }, t) => { + tt[t.id] = t; + return tt; + }, + {} +); + +/** Pinned paths are featured on the landing page. */ +export const PINNED_TEAMS = [TEAMS.ai, TEAMS.algo, TEAMS.design, TEAMS.dev] as const; diff --git a/src/lib/public/board/data/terms.ts b/src/lib/public/board/data/terms.ts new file mode 100644 index 000000000..e3589ba7d --- /dev/null +++ b/src/lib/public/board/data/terms.ts @@ -0,0 +1,10 @@ +import { Term } from '../types'; + +export const VISIBLE_TERMS = [ + Term.Fall23, + Term.Spring23, + Term.Fall22, + Term.Spring22, + Term.Fall21, + Term.Spring21, +]; diff --git a/src/lib/public/board/types.ts b/src/lib/public/board/types.ts index a71308acb..1f77ab210 100644 --- a/src/lib/public/board/types.ts +++ b/src/lib/public/board/types.ts @@ -54,16 +54,11 @@ interface Position { } /** - * @property {string} [picture] - Images edited using Boardify. - * @property {string} [legacyPicture] - Images created manually. - * Conditionally renders the officer picture using the {{#if}} Handlebars helper. - * If `picture` or `legacyPicture` is truthy it will be used as the src attribute - * of the element. If neither is provided or truthy, `placeholder` is shown. + * Officer is used to represent an officer that is associated with a specific team. */ export interface Officer { fullName: string; picture?: string; - legacyPicture?: string; positions: { [key in Term]?: Position; }; diff --git a/src/lib/public/board/utils.ts b/src/lib/public/board/utils.ts index c27cec79c..084716572 100644 --- a/src/lib/public/board/utils.ts +++ b/src/lib/public/board/utils.ts @@ -1,12 +1,32 @@ import type { Officer, Term } from './types'; -import { VISIBLE_TERMS } from './data'; +import { VISIBLE_TERMS, TIERS_JSON } from './data'; import { writable } from 'svelte/store'; +/** + * termIndex is the index of the term to display in the board. + */ export const termIndex = writable(0); +/** + * getPositionByTermIndex returns the position held by the officer in the given + * term index. + */ export function getPositionByTermIndex( officer: Officer, termIndex: number ): Officer['positions'][Term] | undefined { return officer.positions[VISIBLE_TERMS[termIndex]]; } + +/** + * Tier is a tier used for deterministic ordering for listing board members on + * a webpage. + */ +export type Tier = (typeof TIERS_JSON)[keyof typeof TIERS_JSON]; + +/** + * getTierByID returns the tier with the given ID. + */ +export function getTierByID(id: number): Tier | undefined { + return Object.values(TIERS_JSON).find((t) => t.id === id); +} diff --git a/src/lib/public/links/links.json b/src/lib/public/links/links.json index 879817661..e364eb7ed 100644 --- a/src/lib/public/links/links.json +++ b/src/lib/public/links/links.json @@ -91,5 +91,12 @@ "ai_slides_1": "https://docs.google.com/presentation/d/1zUPCCbM4YusmEcP-7Gr8hT7_gotR7RRkWZz21_sY7is/edit?usp=sharing", "fh24-officer-app": "https://forms.gle/G8sXsatY4iABvMw79", "dev-project-form": "https://docs.google.com/forms/d/e/1FAIpQLSe3qoTBnxKUqOLENc58tKNg9Gid6y-O3Va2xoDduJrFRDHO6Q/viewform", - "git-slides": "https://docs.google.com/presentation/d/1dIWuou3D_QtLJTu4fat7WFIfEFObf5CmgYT_6_bHfrs/edit?usp=sharing" + "git-slides": "https://docs.google.com/presentation/d/1dIWuou3D_QtLJTu4fat7WFIfEFObf5CmgYT_6_bHfrs/edit?usp=sharing", + "dev-project-1": "https://docs.google.com/presentation/d/1QlG46-ogMyvMwzgOnP035jyEQuO4UQR2BOfMR09L9JY/edit?usp=sharing", + "discord-workshop-slides": "https://docs.google.com/presentation/d/1L8hA48gVfuknTRqTR0_HTF-brgD7y_DxKoaWeMsmOo4/edit#slide=id.g1f68e2e7097_0_0", + "discord-workshop": "https://acmcsuf.com/discord-workshop-slides", + "dev-attendance": "https://forms.gle/nUroEgpqMvdnG1AW8", + "discord-workshop-replit": "https://replit.com/@diamondburned/Discord-Workshop", + "oss-attendance": "https://forms.gle/NqF33pwQshNhuVMWA", + "aquarium": "https://collage.deno.dev/?sketches=https://gist.githubusercontent.com/EthanThatOneKid/df53961b5e0426b3453cbcc7fedde017/raw/design_sketches.json" } diff --git a/src/lib/server/blog/cache.ts b/src/lib/server/blog/cache.ts deleted file mode 100644 index e31416a31..000000000 --- a/src/lib/server/blog/cache.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { BlogPost } from '$lib/public/blog/types'; - -const EXPIRATION_TIMEOUT = 1e3 * 60 * 1; // Cache updates every 1 minute. - -interface BlogPostsCacheInterface { - setAllPosts(posts: BlogPost[]): void; - getAllPosts(): BlogPost[] | undefined; -} - -export class BlogPostsCache implements BlogPostsCacheInterface { - constructor(private data: BlogPost[] = [], private lastUpdated = 0) {} - - setAllPosts(posts: BlogPost[], timestamp = Date.now()) { - this.data = posts; - this.lastUpdated = timestamp; - } - - getAllPosts() { - if (Date.now() > this.lastUpdated + EXPIRATION_TIMEOUT) { - return; - } - - return this.data; - } - - static create(caching = true): BlogPostsCacheInterface { - return caching ? new BlogPostsCache() : new NoopBlogPostsCache(); - } -} - -export class NoopBlogPostsCache implements BlogPostsCacheInterface { - setAllPosts(p: BlogPost[]) { - return p; - } - - getAllPosts() { - return undefined; - } -} diff --git a/src/lib/server/blog/data.ts b/src/lib/server/blog/data.ts index b605d7e3d..580616b74 100644 --- a/src/lib/server/blog/data.ts +++ b/src/lib/server/blog/data.ts @@ -1,3 +1,4 @@ import type { BlogPost } from '$lib/public/blog/types'; import blogData from './data.json'; + export const SAMPLE_BLOG_POSTS: BlogPost[] = blogData; diff --git a/src/lib/server/blog/posts.ts b/src/lib/server/blog/posts.ts index ce549b22d..974948fbf 100644 --- a/src/lib/server/blog/posts.ts +++ b/src/lib/server/blog/posts.ts @@ -1,24 +1,23 @@ import { GH_ACCESS_TOKEN, GH_DISCUSSION_CATEGORY_ID } from '$lib/server/env'; import { DEBUG_FLAG_ENABLED } from '$lib/server/flags'; +import { Cache } from '$lib/server/cache/cache'; import type { BlogFetchOptions, BlogOutput, BlogPost } from '$lib/public/blog/types'; import { discernLabels } from '$lib/public/blog/utils'; import type { Officer } from '$lib/public/board/types'; -import { OFFICERS } from '$lib/public/board/data'; +import { OFFICERS_JSON } from '$lib/public/board/data'; import { SAMPLE_BLOG_POSTS } from './data'; -import { BlogPostsCache } from './cache'; import { gql } from './gql'; const API_URL = 'https://api.github.com/graphql'; // Make this false to disable server-side caching in development. -const cache = BlogPostsCache.create(/* CACHING=*/ true); +const cache = Cache.create(/* CACHING=*/ true); export async function fetchBlogPosts(options?: BlogFetchOptions): Promise { // By default, set posts to default sample data. let allPosts: BlogPost[] = [...SAMPLE_BLOG_POSTS]; - const cachedPosts = cache.getAllPosts(); - + const cachedPosts = cache.get(); if (!DEBUG_FLAG_ENABLED && cachedPosts) { allPosts = cachedPosts; } @@ -107,14 +106,13 @@ function cacheBlogPosts(output: any): BlogPost[] { return post; }); - cache.setAllPosts(posts); - + cache.set(posts); return posts; } export function getOfficerByGhUsername(ghUsername: string): Officer | null { // get author by GitHub username - const officer = OFFICERS.find( + const officer = OFFICERS_JSON.find( (o) => o.socials && o.socials.github && o.socials.github.toLowerCase() === ghUsername.toLowerCase() ); diff --git a/src/routes/(site)/about/officer-profile-list.svelte b/src/routes/(site)/about/officer-profile-list.svelte index 28777d6f9..28693f723 100644 --- a/src/routes/(site)/about/officer-profile-list.svelte +++ b/src/routes/(site)/about/officer-profile-list.svelte @@ -1,8 +1,9 @@ diff --git a/src/routes/(site)/about/officer-profile.svelte b/src/routes/(site)/about/officer-profile.svelte index 478ebf0a0..c88b7d823 100644 --- a/src/routes/(site)/about/officer-profile.svelte +++ b/src/routes/(site)/about/officer-profile.svelte @@ -25,8 +25,7 @@ } const officerName = info.fullName ?? ''; - const officerPicture = info.picture ?? info.legacyPicture ?? placeholderPicture; - const officerHasLegacyPicture = !!info.legacyPicture; + const officerPicture = info.picture ?? placeholderPicture; const officerSocials = info.socials ?? {}; const alt = `Image of ${officerName}.`; @@ -79,12 +78,7 @@
- +

Socials

diff --git a/src/routes/(site)/wave1/position.svelte b/src/routes/(site)/wave1/position.svelte index 9082e096c..aa6de7ddd 100644 --- a/src/routes/(site)/wave1/position.svelte +++ b/src/routes/(site)/wave1/position.svelte @@ -5,7 +5,7 @@ export let data: ClubPosition; - const id = data.title.replaceAll(/\s/g, '-').toLowerCase(); + const id = (data.title as string).replaceAll(/\s/g, '-').toLowerCase(); const formattedTools = data.tools.map((name) => ({ html: `${name}: ${TOOLS[name]}`, })); diff --git a/src/routes/(site)/wave1/position.ts b/src/routes/(site)/wave1/position.ts index a9d807e14..1618790d8 100644 --- a/src/routes/(site)/wave1/position.ts +++ b/src/routes/(site)/wave1/position.ts @@ -1,8 +1,8 @@ import type { ListItem } from '$lib/components/recursive-ul/types'; -import type { TIERS } from '$lib/public/board/data'; +import type { TIERS_JSON } from '$lib/public/board/data'; export interface ClubPosition { - title: keyof typeof TIERS; + title: keyof typeof TIERS_JSON; teamColor: string; qualifications: ListItem[]; requirements?: ListItem[]; diff --git a/src/routes/(site)/wave2/position.ts b/src/routes/(site)/wave2/position.ts index a9d807e14..1618790d8 100644 --- a/src/routes/(site)/wave2/position.ts +++ b/src/routes/(site)/wave2/position.ts @@ -1,8 +1,8 @@ import type { ListItem } from '$lib/components/recursive-ul/types'; -import type { TIERS } from '$lib/public/board/data'; +import type { TIERS_JSON } from '$lib/public/board/data'; export interface ClubPosition { - title: keyof typeof TIERS; + title: keyof typeof TIERS_JSON; teamColor: string; qualifications: ListItem[]; requirements?: ListItem[]; diff --git a/static/assets/authors/aaron-lieberman.webp b/static/assets/authors/aaron-lieberman.webp index cd949899e..417c4b7d3 100644 Binary files a/static/assets/authors/aaron-lieberman.webp and b/static/assets/authors/aaron-lieberman.webp differ diff --git a/static/assets/authors/alan-cortez.webp b/static/assets/authors/alan-cortez.webp index 5c4edc296..8e5a67cd6 100644 Binary files a/static/assets/authors/alan-cortez.webp and b/static/assets/authors/alan-cortez.webp differ diff --git a/static/assets/authors/alejandro-ramos.webp b/static/assets/authors/alejandro-ramos.webp index ba860c5c7..215b03bed 100644 Binary files a/static/assets/authors/alejandro-ramos.webp and b/static/assets/authors/alejandro-ramos.webp differ diff --git a/static/assets/authors/alex-truong.webp b/static/assets/authors/alex-truong.webp index 445d188ce..274dda48b 100644 Binary files a/static/assets/authors/alex-truong.webp and b/static/assets/authors/alex-truong.webp differ diff --git a/static/assets/authors/andrew-lau.webp b/static/assets/authors/andrew-lau.webp index 0f612ace5..578438924 100644 Binary files a/static/assets/authors/andrew-lau.webp and b/static/assets/authors/andrew-lau.webp differ diff --git a/static/assets/authors/andy-lasso.webp b/static/assets/authors/andy-lasso.webp index 906fd5cd5..49ededd8c 100644 Binary files a/static/assets/authors/andy-lasso.webp and b/static/assets/authors/andy-lasso.webp differ diff --git a/static/assets/authors/angel-armendariz.webp b/static/assets/authors/angel-armendariz.webp index 4e89f02e0..a324dd85f 100644 Binary files a/static/assets/authors/angel-armendariz.webp and b/static/assets/authors/angel-armendariz.webp differ diff --git a/static/assets/authors/angel-santoyo.webp b/static/assets/authors/angel-santoyo.webp index 8276831a5..90d608177 100644 Binary files a/static/assets/authors/angel-santoyo.webp and b/static/assets/authors/angel-santoyo.webp differ diff --git a/static/assets/authors/armanul-ambia.webp b/static/assets/authors/armanul-ambia.webp index 3319478d4..90cf2d8ae 100644 Binary files a/static/assets/authors/armanul-ambia.webp and b/static/assets/authors/armanul-ambia.webp differ diff --git a/static/assets/authors/charlie-taylor.webp b/static/assets/authors/charlie-taylor.webp index 69d8933dc..778f5a028 100644 Binary files a/static/assets/authors/charlie-taylor.webp and b/static/assets/authors/charlie-taylor.webp differ diff --git a/static/assets/authors/dalisa-nguyen.webp b/static/assets/authors/dalisa-nguyen.webp index d05801a18..f125482de 100644 Binary files a/static/assets/authors/dalisa-nguyen.webp and b/static/assets/authors/dalisa-nguyen.webp differ diff --git a/static/assets/authors/daniel-truong.webp b/static/assets/authors/daniel-truong.webp index 5281dc03d..3fa9a8d63 100644 Binary files a/static/assets/authors/daniel-truong.webp and b/static/assets/authors/daniel-truong.webp differ diff --git a/static/assets/authors/ean-mcgilvery.webp b/static/assets/authors/ean-mcgilvery.webp index 9938ad987..23ca9ff0e 100644 Binary files a/static/assets/authors/ean-mcgilvery.webp and b/static/assets/authors/ean-mcgilvery.webp differ diff --git a/static/assets/authors/eduardo-gomez.webp b/static/assets/authors/eduardo-gomez.webp index 2957ffdf5..efe5129d0 100644 Binary files a/static/assets/authors/eduardo-gomez.webp and b/static/assets/authors/eduardo-gomez.webp differ diff --git a/static/assets/authors/ethan-davidson.webp b/static/assets/authors/ethan-davidson.webp index 2232ed0aa..0aaad8280 100644 Binary files a/static/assets/authors/ethan-davidson.webp and b/static/assets/authors/ethan-davidson.webp differ diff --git a/static/assets/authors/eugene-lee.webp b/static/assets/authors/eugene-lee.webp index 067bd8902..fc006e75b 100644 Binary files a/static/assets/authors/eugene-lee.webp and b/static/assets/authors/eugene-lee.webp differ diff --git a/static/assets/authors/ibrahim-israr.webp b/static/assets/authors/ibrahim-israr.webp index 4208a6787..f8520dca3 100644 Binary files a/static/assets/authors/ibrahim-israr.webp and b/static/assets/authors/ibrahim-israr.webp differ diff --git a/static/assets/authors/iftekharul-islam.webp b/static/assets/authors/iftekharul-islam.webp index b308b3587..fe7a28639 100644 Binary files a/static/assets/authors/iftekharul-islam.webp and b/static/assets/authors/iftekharul-islam.webp differ diff --git a/static/assets/authors/jacob-nguyen.webp b/static/assets/authors/jacob-nguyen.webp index 7a23c1fe1..ecb4cbc0d 100644 Binary files a/static/assets/authors/jacob-nguyen.webp and b/static/assets/authors/jacob-nguyen.webp differ diff --git a/static/assets/authors/jason-anthony.webp b/static/assets/authors/jason-anthony.webp index c67193c61..27aa4b2d0 100644 Binary files a/static/assets/authors/jason-anthony.webp and b/static/assets/authors/jason-anthony.webp differ diff --git a/static/assets/authors/jason-wong.webp b/static/assets/authors/jason-wong.webp index 71c0df8d1..2e1bd5d18 100644 Binary files a/static/assets/authors/jason-wong.webp and b/static/assets/authors/jason-wong.webp differ diff --git a/static/assets/authors/joel-anil-john.webp b/static/assets/authors/joel-anil-john.webp index df85ab9f1..efcdd6d5f 100644 Binary files a/static/assets/authors/joel-anil-john.webp and b/static/assets/authors/joel-anil-john.webp differ diff --git a/static/assets/authors/johnathan-carranza.webp b/static/assets/authors/johnathan-carranza.webp index efdf6e32c..afcd7e776 100644 Binary files a/static/assets/authors/johnathan-carranza.webp and b/static/assets/authors/johnathan-carranza.webp differ diff --git a/static/assets/authors/johnson-tong.webp b/static/assets/authors/johnson-tong.webp index bc33c6fc7..6eabae9f8 100644 Binary files a/static/assets/authors/johnson-tong.webp and b/static/assets/authors/johnson-tong.webp differ diff --git a/static/assets/authors/jorge-mejia.webp b/static/assets/authors/jorge-mejia.webp index e677f0b6e..c563534e3 100644 Binary files a/static/assets/authors/jorge-mejia.webp and b/static/assets/authors/jorge-mejia.webp differ diff --git a/static/assets/authors/joshua-hughes.webp b/static/assets/authors/joshua-hughes.webp index 6986dc285..3d9d3745d 100644 Binary files a/static/assets/authors/joshua-hughes.webp and b/static/assets/authors/joshua-hughes.webp differ diff --git a/static/assets/authors/justin-stitt.webp b/static/assets/authors/justin-stitt.webp index 5bda6b74f..26d388f7d 100644 Binary files a/static/assets/authors/justin-stitt.webp and b/static/assets/authors/justin-stitt.webp differ diff --git a/static/assets/authors/karnikaa-velumani.webp b/static/assets/authors/karnikaa-velumani.webp index ba7415276..8a3bb511b 100644 Binary files a/static/assets/authors/karnikaa-velumani.webp and b/static/assets/authors/karnikaa-velumani.webp differ diff --git a/static/assets/authors/kavit-sanghavi.webp b/static/assets/authors/kavit-sanghavi.webp index f94b628c1..89ac47087 100644 Binary files a/static/assets/authors/kavit-sanghavi.webp and b/static/assets/authors/kavit-sanghavi.webp differ diff --git a/static/assets/authors/kayla-nguyen.webp b/static/assets/authors/kayla-nguyen.webp index 6f5be4ff5..ba0901168 100644 Binary files a/static/assets/authors/kayla-nguyen.webp and b/static/assets/authors/kayla-nguyen.webp differ diff --git a/static/assets/authors/kevin-dillon.webp b/static/assets/authors/kevin-dillon.webp index c8b7e6a8c..42a0ec571 100644 Binary files a/static/assets/authors/kevin-dillon.webp and b/static/assets/authors/kevin-dillon.webp differ diff --git a/static/assets/authors/kirsten-ochoa.webp b/static/assets/authors/kirsten-ochoa.webp index 8ee2fc728..c9861fe6d 100644 Binary files a/static/assets/authors/kirsten-ochoa.webp and b/static/assets/authors/kirsten-ochoa.webp differ diff --git a/static/assets/authors/lisa-hong.webp b/static/assets/authors/lisa-hong.webp index aa302174f..ed077f6ed 100644 Binary files a/static/assets/authors/lisa-hong.webp and b/static/assets/authors/lisa-hong.webp differ diff --git a/static/assets/authors/mike-ploythai.webp b/static/assets/authors/mike-ploythai.webp index 4ff5e52a6..f173bc3a7 100644 Binary files a/static/assets/authors/mike-ploythai.webp and b/static/assets/authors/mike-ploythai.webp differ diff --git a/static/assets/authors/minh-le.webp b/static/assets/authors/minh-le.webp index 4341401a6..3e57bb83a 100644 Binary files a/static/assets/authors/minh-le.webp and b/static/assets/authors/minh-le.webp differ diff --git a/static/assets/authors/nguyen-le.webp b/static/assets/authors/nguyen-le.webp index 567ac78df..999603ef7 100644 Binary files a/static/assets/authors/nguyen-le.webp and b/static/assets/authors/nguyen-le.webp differ diff --git a/static/assets/authors/nicolas-renteria.webp b/static/assets/authors/nicolas-renteria.webp index 3c29fb4f7..6cc6e1cc7 100644 Binary files a/static/assets/authors/nicolas-renteria.webp and b/static/assets/authors/nicolas-renteria.webp differ diff --git a/static/assets/authors/nolan-lee.webp b/static/assets/authors/nolan-lee.webp index 7fb8a9647..de9aaa880 100644 Binary files a/static/assets/authors/nolan-lee.webp and b/static/assets/authors/nolan-lee.webp differ diff --git a/static/assets/authors/nurhaliza-hassan.webp b/static/assets/authors/nurhaliza-hassan.webp index adf0b78cd..bd9839f99 100644 Binary files a/static/assets/authors/nurhaliza-hassan.webp and b/static/assets/authors/nurhaliza-hassan.webp differ diff --git a/static/assets/authors/parth-sharma.webp b/static/assets/authors/parth-sharma.webp index 72a4f088a..42724d10d 100644 Binary files a/static/assets/authors/parth-sharma.webp and b/static/assets/authors/parth-sharma.webp differ diff --git a/static/assets/authors/placeholder.webp b/static/assets/authors/placeholder.webp index a296f8bb2..bee93c482 100644 Binary files a/static/assets/authors/placeholder.webp and b/static/assets/authors/placeholder.webp differ diff --git a/static/assets/authors/rina-watanabe.webp b/static/assets/authors/rina-watanabe.webp index 4ff80f6a7..e71fac4ff 100644 Binary files a/static/assets/authors/rina-watanabe.webp and b/static/assets/authors/rina-watanabe.webp differ diff --git a/static/assets/authors/rohan-kunchala.webp b/static/assets/authors/rohan-kunchala.webp index fe614c0e8..c82eaca0a 100644 Binary files a/static/assets/authors/rohan-kunchala.webp and b/static/assets/authors/rohan-kunchala.webp differ diff --git a/static/assets/authors/sami-bajwa.webp b/static/assets/authors/sami-bajwa.webp index 771ee2bae..d5143217e 100644 Binary files a/static/assets/authors/sami-bajwa.webp and b/static/assets/authors/sami-bajwa.webp differ diff --git a/static/assets/authors/samuel-sandoval.webp b/static/assets/authors/samuel-sandoval.webp index 7d7f0ce79..09f46b519 100644 Binary files a/static/assets/authors/samuel-sandoval.webp and b/static/assets/authors/samuel-sandoval.webp differ diff --git a/static/assets/authors/samuel-valls.webp b/static/assets/authors/samuel-valls.webp index f89df7fd0..7df18f1be 100644 Binary files a/static/assets/authors/samuel-valls.webp and b/static/assets/authors/samuel-valls.webp differ diff --git a/static/assets/authors/sebastian-serrano.webp b/static/assets/authors/sebastian-serrano.webp index ddfa5e171..5d3bbde59 100644 Binary files a/static/assets/authors/sebastian-serrano.webp and b/static/assets/authors/sebastian-serrano.webp differ diff --git a/static/assets/authors/serena-naranjo.webp b/static/assets/authors/serena-naranjo.webp index 2c2115bba..0336264a3 100644 Binary files a/static/assets/authors/serena-naranjo.webp and b/static/assets/authors/serena-naranjo.webp differ diff --git a/static/assets/authors/shaleen-mathur.webp b/static/assets/authors/shaleen-mathur.webp index 1e37d812c..a9ba8074e 100644 Binary files a/static/assets/authors/shaleen-mathur.webp and b/static/assets/authors/shaleen-mathur.webp differ diff --git a/static/assets/authors/stephanie-pocci.webp b/static/assets/authors/stephanie-pocci.webp index da826df65..e5d3c408a 100644 Binary files a/static/assets/authors/stephanie-pocci.webp and b/static/assets/authors/stephanie-pocci.webp differ diff --git a/static/assets/authors/taylor-noh.webp b/static/assets/authors/taylor-noh.webp index dfc314af2..12cdbde17 100644 Binary files a/static/assets/authors/taylor-noh.webp and b/static/assets/authors/taylor-noh.webp differ diff --git a/static/assets/authors/tommy-le.webp b/static/assets/authors/tommy-le.webp index cefac1de0..db5650c7e 100644 Binary files a/static/assets/authors/tommy-le.webp and b/static/assets/authors/tommy-le.webp differ diff --git a/static/assets/authors/wesley-chou.webp b/static/assets/authors/wesley-chou.webp index 77433cdf7..236463e00 100644 Binary files a/static/assets/authors/wesley-chou.webp and b/static/assets/authors/wesley-chou.webp differ diff --git a/static/assets/authors/wilbert-rodriguez.webp b/static/assets/authors/wilbert-rodriguez.webp index e343fe05f..8f4cd2665 100644 Binary files a/static/assets/authors/wilbert-rodriguez.webp and b/static/assets/authors/wilbert-rodriguez.webp differ diff --git a/static/assets/authors/yao-lin.webp b/static/assets/authors/yao-lin.webp index f3b6dc257..67d53d102 100644 Binary files a/static/assets/authors/yao-lin.webp and b/static/assets/authors/yao-lin.webp differ