First commit of group-ironmen-master directory.

This commit is contained in:
2025-10-27 08:25:16 +08:00
commit a8467389ef
26390 changed files with 35396 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
player-icon {
display: inline;
}
player-icon img {
filter: hue-rotate(var(--player-icon-color)) saturate(75%);
}

View File

@@ -0,0 +1 @@
<img src="/ui/player-icon.webp" width="12" height="15" />

View File

@@ -0,0 +1,26 @@
import { BaseElement } from "../base-element/base-element";
import { groupData } from "../data/group-data";
export class PlayerIcon extends BaseElement {
constructor() {
super();
}
html() {
return `{{player-icon.html}}`;
}
connectedCallback() {
super.connectedCallback();
const playerName = this.getAttribute("player-name");
const hue = groupData.members.get(playerName).hue || 0;
this.style.setProperty("--player-icon-color", `${hue}deg`);
this.render();
}
disconnectedCallback() {
super.disconnectedCallback();
}
}
customElements.define("player-icon", PlayerIcon);