9 Commits

Author SHA1 Message Date
c3410de1d7 Refactor event handling to use Promises for better efficiency.
All checks were successful
SteamWarCI Build successful
2025-02-23 12:25:56 +01:00
a23c514102 Revert "Refactor event mounts and update script management."
This reverts commit bf8110af6c.
2025-02-23 12:20:34 +01:00
bf8110af6c Refactor event mounts and update script management.
All checks were successful
SteamWarCI Build successful
2025-02-23 12:18:58 +01:00
349f71af1c Add event listener for "astro:before-swap" in slug page
All checks were successful
SteamWarCI Build successful
2025-02-23 12:14:11 +01:00
dda37127ca Use type import and update page load event handling.
All checks were successful
SteamWarCI Build successful
2025-02-23 09:59:37 +01:00
6d210eb0ff Merge pull request 'Merge branch missilewars-iii-eventplan' (#4) from missilewars-iii-eventplan into master
All checks were successful
SteamWarCI Build successful
Reviewed-on: #4
2025-02-23 09:49:04 +01:00
Chaoscaot
cfede8f299 Update missilewars-iii-eventplan.md
All checks were successful
SteamWarCI Build successful
2025-02-23 09:47:30 +01:00
TheBreadBeard
597153ed39 Update missilewars-iii-eventplan.md
All checks were successful
SteamWarCI Build successful
2025-02-23 07:43:22 +01:00
TheBreadBeard
697e903a26 Create page announcements/de/missilewars-iii-eventplan.md
Some checks failed
SteamWarCI Build failed
2025-02-23 07:21:02 +01:00
3 changed files with 55 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
---
import {CollectionEntry} from "astro:content";
import type {CollectionEntry} from "astro:content";
import {l} from "../util/util";
import {astroI18n} from "astro-i18n";
import {Image} from "astro:assets";

View File

@@ -0,0 +1,45 @@
---
title: MissileWars III Eventplan
key: missilewars3-eventplan
description: Der Eventplan für MissileWars 3
created: 2025-03-23
tags:
- event
- missilewars
---
### Infos:
Eventleitung: TheBreadBears
Fights werden nach Möglichkeit mit einer Pause von 10 Minuten vorverschoben
# Gruppenphase
## Punkte aus der Gruppenphase
<group-table data-event="67"> </group-table>
### Fights
| Start | Teams |
|-------|------------|
| 16:00:00 | KT vs Borg |
| 16:00:30 | VI vs FK |
| 16:30:00 | FK vs KT |
| 16:30:30 | Hlcy vs VI |
| 17:00:00 | VI vs KT |
| 17:00:30 | Borg vs Hlcy |
| 17:30:00 | KT vs Hlcy|
| 17:30:30 | FK vs Borg |
| 18:00:00 | VI vs Borg |
| 18:00:30 | FK vs Hlcy |
## KO-Phase
| Start | Teams |
|-------|------------|
| 18:30:00 | Platz 2 vs Platz 3 |
| 19:00:00 | Platz 1 vs Platz 4 |
| 19:30:00 | Verlierer vs Verlierer |
| 20:00:00 | Sieger vs Sieger |
## Ergebnisse
<fight-table data-event="67" data-group="Gruppe 1"> </fight-table>

View File

@@ -111,15 +111,13 @@ const ogImage = await getImage({
import type {ExtendedEvent} from "@type/event";
import {mount} from "svelte";
const eventMounts: Map<string, ((ev: ExtendedEvent) => void)[]> = new Map();
const eventMounts: Map<string, Promise<ExtendedEvent>> = new Map();
class FightTableElement extends HTMLElement {
connectedCallback(): void {
if (!eventMounts.has(this.dataset["event"]!)) {
eventMounts.set(this.dataset["event"]!, []);
}
loadEvent(this.dataset["event"]!);
const rows = Number.parseInt(this.dataset["rows"]!);
eventMounts.get(this.dataset["event"]!)!.push(ev => {
eventMounts.get(this.dataset["event"]!)!.then(ev => {
mount(FightTable, {
target: this,
props: {
@@ -134,11 +132,9 @@ const ogImage = await getImage({
class GroupTableElement extends HTMLElement {
connectedCallback(): void {
if (!eventMounts.has(this.dataset["event"]!)) {
eventMounts.set(this.dataset["event"]!, []);
}
loadEvent(this.dataset["event"]!);
const rows = Number.parseInt(this.dataset["rows"]!);
eventMounts.get(this.dataset["event"]!)!.push(ev => {
eventMounts.get(this.dataset["event"]!)!.then(ev => {
mount(GroupTable, {
target: this,
props: {
@@ -154,17 +150,13 @@ const ogImage = await getImage({
customElements.define("fight-table", FightTableElement);
customElements.define("group-table", GroupTableElement);
function mountEvent() {
for (const key of eventMounts.keys()) {
get(eventRepo).getEvent(key).then(ev => {
for (const mount of eventMounts.get(key)!) {
mount(ev);
}
});
function loadEvent(id: string) {
if (!eventMounts.has(id)) {
eventMounts.set(id, get(eventRepo).getEvent(id));
}
}
mountEvent();
document.addEventListener("astro:before-swap", eventMounts.clear);
</script>
</article>
</PageLayout>