mirror of
https://github.com/Queer-Lexikon/regenbogenkarte
synced 2024-11-28 15:10:28 +00:00
e98c3de747
This commit includes all data from the current map, excluding: - the actual data - the deployment script to the server We've added a comprehensive README for newcomers, so that they can understand what's going on. Co-authored-by: xenia <xhartmann@posteo.de>
19 lines
569 B
TypeScript
19 lines
569 B
TypeScript
import { LEGEND_MAPPING } from "./config";
|
|
|
|
export const setupLegend = () => {
|
|
const template = <HTMLTemplateElement>document.getElementById("legend-list-entry");
|
|
const lists = document.querySelectorAll<HTMLElement>("[data-id=legend-list]");
|
|
|
|
lists.forEach((l) => {
|
|
for (const [_, [icon, text]] of LEGEND_MAPPING) {
|
|
const copy = <HTMLElement>template.content.cloneNode(true);
|
|
const img = copy.querySelector("img")!;
|
|
img.src = icon;
|
|
|
|
const description = copy.querySelector("span")!;
|
|
description.innerText = text;
|
|
|
|
l.appendChild(copy);
|
|
}
|
|
});
|
|
};
|