// About: track, saga, story time, the Odyssey reference (with "Read the passage" when the content folder is // mounted), the facts, and the parts and singers. Watch and the listen entry live in Listen & lyrics. import { sagaOf, songs, type AlbumSong } from "../../data/album"; import { roman } from "../content"; import { esc } from "./util"; export function aboutView(song: AlbumSong, mounted: boolean): HTMLElement { const el = document.createElement("div"); el.className = "about"; const saga = sagaOf(song); const o = song.odyssey; const homer = !o ? "No counterpart in Homer" : mounted ? `Book ${roman(o.book)}` : `Book ${roman(o.book)} · Butcher & Lang on Gutenberg`; const parts = song.parts.length ? song.parts.map((p) => `
  • ${esc(p.name)}${p.singers.map(esc).join(", ")}
  • `).join("") : song.singers.map((s) => `
  • ${esc(s)}
  • `).join(""); el.innerHTML = `
    Track
    ${song.track} of ${songs.length} · ${song.sagaTrack} in the saga
    Saga
    ${esc(saga.name)} (${saga.year})
    Story time
    ${esc(song.storyTime.label)}
    The Odyssey
    ${homer}
    ${song.facts.map((f) => `

    ${esc(f)}

    `).join("")}

    ${song.parts.length ? "Parts and singers" : "Singers"}

      ${parts}
    `; return el; }