From c5e9f3472a3d4201dd648f7e44719e3ecca8d427 Mon Sep 17 00:00:00 2001 From: AW_Dev Date: Fri, 10 May 2024 19:39:57 -0700 Subject: [PATCH 01/43] added more responsiveness --- public/bin/landing-new/index.html | 15 +++- public/bin/landing-new/style.css | 123 ++++++++++++++++++++++++------ 2 files changed, 110 insertions(+), 28 deletions(-) diff --git a/public/bin/landing-new/index.html b/public/bin/landing-new/index.html index 58b99711..86db8357 100644 --- a/public/bin/landing-new/index.html +++ b/public/bin/landing-new/index.html @@ -73,9 +73,13 @@
-

What are we building today?

- -

💡 Need an idea? Click the raccoon!

+

What are we building today?

+
+ + + +
+

Need an idea?
Tap the raccoon!

(It doesn't know much about electronics, but it'll try its best.)

@@ -85,6 +89,11 @@

🗑️

+ +
- + \ No newline at end of file diff --git a/public/bin/landing-new/script.js b/public/bin/landing-new/script.js index e8e250b2..2bac9303 100644 --- a/public/bin/landing-new/script.js +++ b/public/bin/landing-new/script.js @@ -34,7 +34,7 @@ async function fetchAndLogTextFile(url) { } } -fetchAndLogTextFile('./ascii-art.txt'); +fetchAndLogTextFile('./landing-new/ascii-art.txt'); window.addEventListener("load", (e) => { document.querySelectorAll(".section").forEach(element => { From efb2030521ae50f56c97b7f317ca2a35a4c75514 Mon Sep 17 00:00:00 2001 From: Max Wofford Date: Sat, 11 May 2024 00:05:41 -0400 Subject: [PATCH 17/43] [bin] Add redirects for bin public assets --- next.config.mjs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/next.config.mjs b/next.config.mjs index ce03e9a6..f1258f7b 100755 --- a/next.config.mjs +++ b/next.config.mjs @@ -274,6 +274,14 @@ const nextConfig = { { source: '/how-to-organize-a-hackathon/style.css', destination: 'https://expandables.hackclub.dev/style.css' + }, + { + source: '/bin/', + destination: '/bin/index.html' + }, + { + source: '/bin/:path*', + destination: '/bin/:path*' } ] }, From f9bf01b8c8d5d30c3bee22472b8a2f9a1b27544e Mon Sep 17 00:00:00 2001 From: Max Wofford Date: Sat, 11 May 2024 00:09:07 -0400 Subject: [PATCH 18/43] [bin] Add redirect for selector index --- next.config.mjs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/next.config.mjs b/next.config.mjs index f1258f7b..b45a5bf1 100755 --- a/next.config.mjs +++ b/next.config.mjs @@ -282,6 +282,10 @@ const nextConfig = { { source: '/bin/:path*', destination: '/bin/:path*' + }, + { + source: '/bin/selector/', + destination: '/bin/selector/index.html' } ] }, From 4adf34a9d83f61e97070632abf001f386907f989 Mon Sep 17 00:00:00 2001 From: Max Wofford Date: Sat, 11 May 2024 00:10:31 -0400 Subject: [PATCH 19/43] [bin] Fix for selector link --- public/bin/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/bin/index.html b/public/bin/index.html index 8f3f45ee..95c675af 100644 --- a/public/bin/index.html +++ b/public/bin/index.html @@ -107,7 +107,7 @@
- From 7e54ff84482a5afca25ad65f08c547c47d604795 Mon Sep 17 00:00:00 2001 From: AW_Dev Date: Fri, 10 May 2024 21:31:30 -0700 Subject: [PATCH 20/43] i changed like, 2 lines --- public/bin/landing-new/style.css | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/public/bin/landing-new/style.css b/public/bin/landing-new/style.css index cc195f52..75dc5878 100644 --- a/public/bin/landing-new/style.css +++ b/public/bin/landing-new/style.css @@ -5,7 +5,7 @@ } .container { - max-width: 52em; + max-width: 62em; margin: auto; } @@ -441,10 +441,6 @@ button { } @media only screen and (max-width: 900px) { - * { - overflow-x: hidden; - } - body { overflow-x: hidden; } @@ -696,7 +692,7 @@ button { .timeline-list { margin: 2em auto; grid-template-columns: 1fr 1fr 1fr; - grid-template-rows: 200px; + height: min-content; display: grid; gap: 20px; width: 80%; @@ -714,6 +710,7 @@ button { background-color: black; border-radius: 20px; box-sizing: border-box; + height: 100%; } .timeline-item.now { From ff9debed128398d24784c9923a5dfb4f8e644c13 Mon Sep 17 00:00:00 2001 From: AW_Dev Date: Fri, 10 May 2024 21:37:56 -0700 Subject: [PATCH 21/43] fixed one singular line. --- public/bin/landing-new/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/bin/landing-new/style.css b/public/bin/landing-new/style.css index 75dc5878..ede22aca 100644 --- a/public/bin/landing-new/style.css +++ b/public/bin/landing-new/style.css @@ -145,7 +145,7 @@ .gambling-ui { display: flex; flex-direction: row; - justify-content: center; + justify-content: space-between; align-items: center; margin-top: 2em; } @@ -728,7 +728,7 @@ button { .timeline-info { background-color: #EEEDED; height: 100%; - border-radius: 15px; + border-radius: 12px; padding: 20px; box-sizing: border-box; } From afd138d27c7ce3238f5d2f4602b5fa8dfb11c0f8 Mon Sep 17 00:00:00 2001 From: Max Wofford Date: Sat, 11 May 2024 00:40:28 -0400 Subject: [PATCH 22/43] [bin] Prevent duplicate part selections --- public/bin/landing-new/gambling.js | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/public/bin/landing-new/gambling.js b/public/bin/landing-new/gambling.js index d2781a8c..b465077f 100644 --- a/public/bin/landing-new/gambling.js +++ b/public/bin/landing-new/gambling.js @@ -119,6 +119,10 @@ function addComponentsToPage(data) { }) } +function sample(arr) { + return arr[Math.floor(Math.random() * arr.length)] +} + function rollParts(el) { if (el.classList.contains("disabled")) { return @@ -128,27 +132,25 @@ function rollParts(el) { element.removeChild(element.firstElementChild) }) addComponentsToPage(fetchedParts) + rolled = true } - rolled = true document.querySelector(".gambling-build").classList.remove("disabled") let chosenParts = [] - const numPartsNeeded = document.querySelectorAll(".gambling-item-wrapper").length // for the first one, pick an input component const inputParts = fetchedParts.filter((part) => part.type == "Input"); - const inputPartIndex = Math.floor(Math.random() * inputParts.length) - chosenParts.push(inputParts[inputPartIndex]) - console.log(`For the input part, we picked ${inputParts[inputPartIndex].name}`) + const inputPart = sample(inputParts) + chosenParts.push(inputPart) + console.log(`For the input part, we picked ${inputPart.name}`) // for the second one, pick an output component const outputParts = fetchedParts.filter((part) => part.type == "Output"); - const outputPartIndex = Math.floor(Math.random() * outputParts.length) - chosenParts.push(outputParts[outputPartIndex]) - console.log(`For the output part, we picked ${outputParts[outputPartIndex].name}`) + const outputPart = sample(outputParts) + chosenParts.push(outputPart) + console.log(`For the output part, we picked ${outputPart.name}`) // for the rest, pick any component - for (let i = 2; i < numPartsNeeded; i++) { - let partIndex = Math.floor(Math.random() * fetchedParts.length) - chosenParts.push(fetchedParts[partIndex]) - console.log(`For the ${i}th part, we picked ${fetchedParts[partIndex].name}`) - } + const unusedParts = fetchedParts.filter((part) => part.name != inputPart.name && part.name != outputPart.name) + const thirdPart = sample(unusedParts) + chosenParts.push(thirdPart) + console.log(`For the third part, we picked ${thirdPart.name}`) let chosenPartNames = [] document.querySelectorAll(".gambling-item-wrapper").forEach((element, key) => { let thisPart = chosenParts[key] From c0f82163cb017133d02d0b684c04f3103da6b31a Mon Sep 17 00:00:00 2001 From: Max Wofford Date: Sat, 11 May 2024 00:52:25 -0400 Subject: [PATCH 23/43] [bin] Swap laser with LED in page fold --- public/bin/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/bin/index.html b/public/bin/index.html index 95c675af..3c16fec8 100644 --- a/public/bin/index.html +++ b/public/bin/index.html @@ -32,7 +32,7 @@ -
From 40ea54bccffb6703a07661438ab27ac5370d654f Mon Sep 17 00:00:00 2001 From: Max Wofford Date: Sat, 11 May 2024 00:56:29 -0400 Subject: [PATCH 24/43] [bin] Update footer with link to prelaunch page --- public/bin/index.html | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/public/bin/index.html b/public/bin/index.html index 3c16fec8..0ff8345c 100644 --- a/public/bin/index.html +++ b/public/bin/index.html @@ -178,13 +178,17 @@