From 00c0dd3ac3fa7c3aaa979e297a2ad009338231f9 Mon Sep 17 00:00:00 2001 From: smalex-z Date: Wed, 27 Nov 2024 04:10:37 +0000 Subject: [PATCH 1/9] basic gm page build --- .gitignore | 1 + pages/gm.js | 67 ++++++++++++++++++++++++++++++++++++++++ scripts/gm-generator.mjs | 18 +++++++++++ 3 files changed, 86 insertions(+) diff --git a/.gitignore b/.gitignore index 177a41d9..d025d14d 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ offoutput.json townhall.json past-townhall.json gmData.json +past-gm.json diff --git a/pages/gm.js b/pages/gm.js index 3b91bdbe..5f788366 100644 --- a/pages/gm.js +++ b/pages/gm.js @@ -1,4 +1,7 @@ +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { faFileAlt } from '@fortawesome/free-solid-svg-icons'; import { NextSeo } from 'next-seo'; + import Image from 'next/image'; import Link from 'next/link'; import React from 'react'; @@ -7,6 +10,7 @@ import Countdown from 'react-countdown'; import Banner from '../components/Banner'; import Layout from '../components/Layout'; import gmData from '../gmData.json'; +import pastData from '../past-gm.json'; import aiLogo from '../public/images/committees/ai_wordmark.svg'; import boardLogo from '../public/images/committees/board_wordmark.svg'; @@ -21,6 +25,11 @@ import wLogo from '../public/images/committees/w_wordmark.svg'; import fallGMgraphic from '../public/images/Fall_GM_2024_graphic.png'; import googleSlideLogo from '../public/images/slides.png'; +const inlineButtonListStyle = { + display: 'inline-block', + marginBottom: '1em', +}; + const dayToName = (day) => { switch (day) { case 0: @@ -151,6 +160,8 @@ const GMCountdown = (props) => { }; function gm() { + + const pastGMs = [...pastData].reverse(); const data = parseGMData(gmData); function countdownRenderer({ days, hours, minutes, seconds, completed }) { const {dayString, hourString, minuteString, secondString} = @@ -291,6 +302,62 @@ function gm() { + {/* Past GMs */} +
+
+

Past General Meetings

+ {pastGMs.map((pastTownHall, index) => ( +
+
+

{pastTownHall.title + ' // ' + pastTownHall.date}

+

{pastTownHall.description}

+ +
+
+ {pastTownHall.alt_text} +
+
+ ))} +
); } diff --git a/scripts/gm-generator.mjs b/scripts/gm-generator.mjs index 04929c6c..733e9423 100644 --- a/scripts/gm-generator.mjs +++ b/scripts/gm-generator.mjs @@ -55,6 +55,23 @@ async function fetchGMData() { return formattedData; } +async function fetchPastGMData() { + const data = await getGoogleSheetData('PastGMs!A2:G'); + + // Format the rows into an array of objects + const formattedData = data.map((row) => ({ + title: row[0], + date: row[1], + description: row[2], + slides: row[3], + notes: row[4], + banner: row[5], + alt_text: row[6], + })); + + return formattedData; +} + // Write data from sheets to a json file async function writeToOutput(name, formattedData) { const output = JSON.stringify(formattedData); @@ -68,4 +85,5 @@ async function writeToOutput(name, formattedData) { // Outputs all necessary json files async function writeAllOutputs() { writeToOutput('gmData.json', await fetchGMData()); + writeToOutput('past-gm.json', await fetchPastGMData()); } From 6189e5ce5520aa8551b1cf50a15d3251302fa02e Mon Sep 17 00:00:00 2001 From: smalex-z Date: Wed, 27 Nov 2024 05:08:03 +0000 Subject: [PATCH 2/9] loading images and past GMs --- pages/gm.js | 53 +++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/pages/gm.js b/pages/gm.js index 5f788366..b8077bbd 100644 --- a/pages/gm.js +++ b/pages/gm.js @@ -1,5 +1,5 @@ +import { faFileAlt, faVideo } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faFileAlt } from '@fortawesome/free-solid-svg-icons'; import { NextSeo } from 'next-seo'; import Image from 'next/image'; @@ -306,14 +306,14 @@ function gm() {

Past General Meetings

- {pastGMs.map((pastTownHall, index) => ( + {pastGMs.map((pastGM, index) => (
-

{pastTownHall.title + ' // ' + pastTownHall.date}

-

{pastTownHall.description}

+

{pastGM.title + ' // ' + pastGM.date}

+

{pastGM.description}

- {pastTownHall.alt_text}
From 42f27dd34d32ea80ec7e813700b0aad43d1c558b Mon Sep 17 00:00:00 2001 From: smalex-z Date: Wed, 27 Nov 2024 05:18:18 +0000 Subject: [PATCH 3/9] prevent stretching of images --- pages/town-hall.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pages/town-hall.js b/pages/town-hall.js index 67d2cf63..000699b2 100644 --- a/pages/town-hall.js +++ b/pages/town-hall.js @@ -301,12 +301,11 @@ function TownHall() {
- {pastTownHall.alt_text}
From 4ed0e3bde3f68b06bba6671e3748d266f18c4c3b Mon Sep 17 00:00:00 2001 From: smalex-z Date: Sun, 1 Dec 2024 23:05:05 +0000 Subject: [PATCH 4/9] fixed set of errors --- pages/gm.js | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/pages/gm.js b/pages/gm.js index b8077bbd..a20ace87 100644 --- a/pages/gm.js +++ b/pages/gm.js @@ -268,37 +268,39 @@ function gm() {

Committee Presentations

Learn what ACM's nine committees have planned for {data.quarter} quarter.

-

ACM studio {data.studio}

-

ACM icpc {data.icpc}

-

ACM design {data.design}

-

ACM cyber {data.cyber}

-

ACM teachLA {data.teachLA}

-

ACM w {data.w}

-

ACM ai {data.ai}

-

ACM cloud  {data.cloud}

-

ACM hack {data.hack}

+
ACM studio {data.studio}
+
ACM icpc {data.icpc}
+
ACM design {data.design}
+
ACM cyber {data.cyber}
+
ACM teachLA {data.teachLA}
+
ACM w {data.w}
+
ACM ai {data.ai}
+
ACM cloud  {data.cloud}
+
ACM hack {data.hack}

ACM Board

How to get more involved with ACM beyond attending workshops and events

-

ACM board  External: {data.evp}

-

ACM board  Internal: {data.ivp}

+
ACM board  External: {data.evp}
+
ACM board  Internal: {data.ivp}

ACM Initatives

See exciting new programs that ACM is trying out

- {data.initiatives.map(item =>

{item}

)} + {data.initiatives.map((item, index) => ( +

{item}

+ ))}

Tabling and Social

Interact with ACM's officers and walk away with new friends!

-

All ACM officers

+
All ACM officers
From 1d304ecc5be0f0f3005530f950eeffc639398656 Mon Sep 17 00:00:00 2001 From: smalex-z Date: Sun, 1 Dec 2024 23:08:17 +0000 Subject: [PATCH 5/9] remove google maps border --- styles/components/GM.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/styles/components/GM.scss b/styles/components/GM.scss index 5ac710c6..375213f7 100644 --- a/styles/components/GM.scss +++ b/styles/components/GM.scss @@ -135,6 +135,7 @@ .map-frame { height: 100%; width: 100%; + border: none; } .flex { From 812d2cdc031adf2cb85378f9ae2eab3e3f4a13ce Mon Sep 17 00:00:00 2001 From: smalex-z Date: Mon, 2 Dec 2024 01:12:42 +0000 Subject: [PATCH 6/9] lint fixes --- styles/components/GM.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/styles/components/GM.scss b/styles/components/GM.scss index 375213f7..81b82c60 100644 --- a/styles/components/GM.scss +++ b/styles/components/GM.scss @@ -133,9 +133,9 @@ } .map-frame { + border-width: 0; height: 100%; width: 100%; - border: none; } .flex { From 473abe680c4167cb1cfc1b60fdd4b85d4d263e00 Mon Sep 17 00:00:00 2001 From: smalex-z Date: Tue, 4 Mar 2025 01:15:15 +0000 Subject: [PATCH 7/9] lint fixes --- pages/gm.js | 1 + pages/gm/f21.js | 20 ++++++++++---------- pages/gm/w22.js | 20 ++++++++++---------- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/pages/gm.js b/pages/gm.js index caeb5de1..1490ad74 100644 --- a/pages/gm.js +++ b/pages/gm.js @@ -347,6 +347,7 @@ function gm() { {data.initiatives.map((item) => (

+ {/* eslint-disable-next-line @next/next/no-img-element */} {item}

))} diff --git a/pages/gm/f21.js b/pages/gm/f21.js index 69df5c67..07d1fee5 100644 --- a/pages/gm/f21.js +++ b/pages/gm/f21.js @@ -213,55 +213,55 @@ function F21() { Fall quarter

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM studio{' '} Christian Loanzon, Peter Sutarjo

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM icpc{' '} Jacob Zhang

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM design{' '} Crystal Huynh, Muthu Palaniappan

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM cyber{' '} Josh Lee, Henry Chang

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM teachLA{' '} Sophie Schoenmeyer, Chloe Uy

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM w Cindy Zhang, Lena O'Grady

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM ai{' '} Justin Yi

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM hack{' '} Asha Kar, Eugene Lo

@@ -274,16 +274,16 @@ function F21() { events

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM board   External: Tina Huang

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM board - {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM studio{' '} Christian Loanzon, Peter Sutarjo

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM icpc{' '} Jacob Zhang

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM design{' '} Crystal Huynh, Muthu Palaniappan

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM cyber{' '} Josh Lee, Henry Chang

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM teachLA{' '} Sophie Schoenmeyer, Chloe Uy

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM w Cindy Zhang, Lena O'Grady

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM ai{' '} Justin Yi

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM hack{' '} Asha Kar, Eugene Lo

@@ -274,16 +274,16 @@ function W22() { events

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM board   External: Tina Huang

- {/* eslint-disable-next-line @next/next/no-img-element */}

+ {/* eslint-disable-next-line @next/next/no-img-element */} ACM board Date: Tue, 4 Mar 2025 01:18:47 +0000 Subject: [PATCH 8/9] more eslint --- components/Footer.js | 2 +- pages/gm.js | 1 - pages/gm/f21.js | 16 ++++++++-------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/components/Footer.js b/components/Footer.js index 39b997f9..b81c8d98 100644 --- a/components/Footer.js +++ b/components/Footer.js @@ -114,8 +114,8 @@ function Footer() { component */ - /* eslint-disable-next-line @next/next/no-img-element */ title={ + /* eslint-disable-next-line @next/next/no-img-element */

- {/* eslint-disable-next-line @next/next/no-img-element */} + {/* eslint-disable-next-line @next/next/no-img-element */} ACM studio

- {/* eslint-disable-next-line @next/next/no-img-element */} + {/* eslint-disable-next-line @next/next/no-img-element */} ACM icpc{' '} Jacob Zhang

- {/* eslint-disable-next-line @next/next/no-img-element */} + {/* eslint-disable-next-line @next/next/no-img-element */} ACM design

- {/* eslint-disable-next-line @next/next/no-img-element */} + {/* eslint-disable-next-line @next/next/no-img-element */} ACM cyber

- {/* eslint-disable-next-line @next/next/no-img-element */} + {/* eslint-disable-next-line @next/next/no-img-element */} ACM teachLA

- {/* eslint-disable-next-line @next/next/no-img-element */} + {/* eslint-disable-next-line @next/next/no-img-element */} ACM w Cindy Zhang, Lena O'Grady

- {/* eslint-disable-next-line @next/next/no-img-element */} + {/* eslint-disable-next-line @next/next/no-img-element */} ACM ai{' '} Justin Yi

- {/* eslint-disable-next-line @next/next/no-img-element */} + {/* eslint-disable-next-line @next/next/no-img-element */} ACM hack{' '} Asha Kar, Eugene Lo

From 205a1632b957a70f9c02da36da9fbd5bca582cfd Mon Sep 17 00:00:00 2001 From: smalex-z Date: Tue, 4 Mar 2025 01:26:22 +0000 Subject: [PATCH 9/9] more eslint --- package-lock.json | 14 ++++++++++++++ package.json | 1 + pages/gm.js | 12 ++++++------ pages/gm/f21.js | 4 ++-- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 393bf43a..cb079d40 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "@fortawesome/react-fontawesome": "^0.2.1", "@netlify/plugin-nextjs": "^5.9.4", "@testing-library/dom": "^10.4.0", + "a": "^3.0.1", "dotenv": "^16.4.5", "googleapis": "^144.0.0", "moment": "^2.29.4", @@ -2769,6 +2770,19 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/a": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/a/-/a-3.0.1.tgz", + "integrity": "sha512-7keco9nAKQNb1+EFWVpzHrPfrFEcpzDoeYoKBktoUq/TQO0cpGDQ63KBQ3486a5OV5OGRzKC0Xu/g9IQb205qA==", + "dependencies": { + "a_mock": "1.0.5" + } + }, + "node_modules/a_mock": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/a_mock/-/a_mock-1.0.5.tgz", + "integrity": "sha512-HnjqBn1raagaPlpT8+4A9ZP3ntlh3fuW7kpdoeiCapxtYYz8VPTOkyv7TdQ18b4kMHqMNfwqlWSurex8dXWMkw==" + }, "node_modules/abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", diff --git a/package.json b/package.json index 764623c6..1a675757 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "@fortawesome/react-fontawesome": "^0.2.1", "@netlify/plugin-nextjs": "^5.9.4", "@testing-library/dom": "^10.4.0", + "a": "^3.0.1", "dotenv": "^16.4.5", "googleapis": "^144.0.0", "moment": "^2.29.4", diff --git a/pages/gm.js b/pages/gm.js index 3c0c52f5..e8899f2e 100644 --- a/pages/gm.js +++ b/pages/gm.js @@ -1,9 +1,9 @@ import { faFileAlt, faVideo } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { NextSeo } from 'next-seo'; import Image from 'next/legacy/image'; import Link from 'next/link'; +import { NextSeo } from 'next-seo'; import Countdown from 'react-countdown'; @@ -359,10 +359,10 @@ function gm() { friends!

-
All ACM officers
+
All ACM officers
- + {/* Past GMs */}

@@ -379,7 +379,7 @@ function gm() { className="button" target="_blank" rel="noopener noreferrer" - > + > ))}
- - ); + + ); } export default gm; diff --git a/pages/gm/f21.js b/pages/gm/f21.js index df7c6d2e..b8b3c899 100644 --- a/pages/gm/f21.js +++ b/pages/gm/f21.js @@ -275,7 +275,7 @@ function F21() {

- {/* eslint-disable-next-line @next/next/no-img-element */} + {/* eslint-disable-next-line @next/next/no-img-element */} ACM board

- {/* eslint-disable-next-line @next/next/no-img-element */} + {/* eslint-disable-next-line @next/next/no-img-element */}