diff --git a/.gitignore b/.gitignore index 6635cf5..beb22e8 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ node_modules !.env.example vite.config.js.timestamp-* vite.config.ts.timestamp-* +static/ diff --git a/Makefile b/Makefile index 247122f..b243d1c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -build/index.html: src/routes/+page.svelte src/routes/control/+page.svelte +build/index.html: src/routes/+page.svelte src/routes/control/+page.svelte src/routes/admin/+page.svelte static/gifs/* static/robots/* npm run build .PHONY: run dev iframe diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 31dc10b..c5aa6f7 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -59,7 +59,7 @@ let display_state = "init"; /** @type {string} */ let display_class = "side-display"; -const client = mqtt.connect("ws://127.0.0.1:8883"); +const client = mqtt.connect("ws://10.42.0.36:8883"); client.on("connect", () => { @@ -290,9 +290,37 @@ onMount(() => { {:else if (display_state == "pre-game")} -
+ wavy +
+
+

{teams_red[0]}

+ + + +
+
+

{teams_red[1]}

+ + + +
+

VS

+
+

{teams_blue[0]}

+ + + +
+
+

{teams_blue[1]}

+ + + +
+
{:else if (display_state == "event-name")} - + wavy + Mecha Mayhem 2024 {:else if (display_state == "alliance-selection")} {:else if (display_state == "break")} @@ -375,6 +403,67 @@ p { height: 100%; } +#pre-mid { + font-size: 7cqw; + grid-area: mid; +} + +.pre-bot object { + height: 80cqh; + width: 80cqh; +} + +.pre-bot object img { + height: 100%; + width: 100%; +} + +.pre-bot { + display: flex; + flex-direction: column; + justify-content: flex-start; + align-items: center; + flex-grow: 0; + flex-basis: min-content; + height: 100%; + width: 100%; +} + +#pre-b1 { + font-size: 2cqw; + grid-area: b1; +} + +#pre-b2 { + font-size: 2cqw; + grid-area: b2; +} + +#pre-r1 { + font-size: 2cqw; + grid-area: r1; +} + +#pre-r2 { + font-size: 2cqw; + grid-area: r2; +} + +.pre-game { + z-index: 1; + position: absolute; + top: 0; + height: 100%; + width: 100%; + + display: grid; + justify-items: center; + align-items: center; + grid-template-columns: 22.5% 22.5% 10% 22.5% 22.5%; + grid-template-rows: 100%; + grid-template-areas: "r1 r2 mid b1 b2"; +} + .gif-background { z-index: 0; position: absolute; @@ -412,7 +501,18 @@ p { background-color: #ee0000; } +.banner-gif { + z-index: 0; + position: absolute; + top: 0; + height: 100%; + width: 100%; +} + .banner { + z-index: 1; + position: absolute; + top: 0; display: flex; font-size: 5cqw; align-items: center; diff --git a/src/routes/admin/+page.svelte b/src/routes/admin/+page.svelte index 49f9183..bd75a89 100644 --- a/src/routes/admin/+page.svelte +++ b/src/routes/admin/+page.svelte @@ -9,7 +9,7 @@ let led_sizes = { "side": { width: 896, height: 128 } } -const client = mqtt.connect("ws://127.0.0.1:8883"); +const client = mqtt.connect("ws://10.42.0.36:8883"); let displays = {}; let division_names = {}; let divisions = {}; @@ -82,7 +82,7 @@ client.on("message", (topic, message) => {

{`${division_names[active_division]} Division`}

{#each Object.entries(displays[active_division]) as [field, field_data] }
-

Field {field}

+

{field} - {field_data.name}