18 lines
876 B
TypeScript
18 lines
876 B
TypeScript
import type { RenderContext } from './render';
|
|
import { createAffiliationMark } from './affiliation-mark';
|
|
|
|
export function createLogoLegend(document: Document, context: RenderContext, signal: AbortSignal): HTMLElement {
|
|
const section = document.createElement('section');
|
|
section.className = 'hm-orgchart-logo-legend';
|
|
const heading = document.createElement('h2'); heading.textContent = '관계사·회사 로고';
|
|
const list = document.createElement('ul'); list.className = 'hm-orgchart-logo-list';
|
|
for (const affiliation of context.data.affiliations) {
|
|
const item = document.createElement('li');
|
|
const name = document.createElement('span'); name.textContent = affiliation.name;
|
|
item.append(createAffiliationMark(document, affiliation.id, affiliation.name, signal), name);
|
|
list.append(item);
|
|
}
|
|
section.append(heading, list);
|
|
return section;
|
|
}
|