diff options
| author | ivar <i@oiee.no> | 2025-10-08 11:24:09 +0200 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2025-10-08 11:24:09 +0200 |
| commit | 45ebad11572c00dbc941ef916d4866405e3921bd (patch) | |
| tree | 4da720ae56f3e608f8fa3c95bce2b1e722ed7602 /VegaData/wwwroot/index.js | |
| parent | 2c61e139285a0e0c82935d555ac7a943ae2c55c6 (diff) | |
| download | vegadata-45ebad11572c00dbc941ef916d4866405e3921bd.tar.xz vegadata-45ebad11572c00dbc941ef916d4866405e3921bd.zip | |
n
Diffstat (limited to 'VegaData/wwwroot/index.js')
| -rw-r--r-- | VegaData/wwwroot/index.js | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/VegaData/wwwroot/index.js b/VegaData/wwwroot/index.js index 8ce5c62..45af7f2 100644 --- a/VegaData/wwwroot/index.js +++ b/VegaData/wwwroot/index.js @@ -53,9 +53,9 @@ function copyLink(t, e) { } } -function vegascene(e) { - if (e.movieMainVersion.startsWith("KUL")) return `https://www.vegascene.no/teater/${e.movieMainVersion}` - return `https://www.vegascene.no/film/${e.movieMainVersion}` +function vegascene(showing) { + if (showing.movieMainVersion.startsWith("KUL")) return `https://www.vegascene.no/teater/${showing.movieMainVersion}` + return `https://www.vegascene.no/film/${showing.movieMainVersion}` } function urlId(e) { @@ -99,21 +99,25 @@ async function renderShows(query, rendered) { lis.push( t("li", { class: "show", id: showKey }, [ - t("span", { class: "title italic" }, showKey), - t("ul", undefined, [ + t("div", { class: "title" }, [ + t("h2", { class: "italic" }, showKey), + t("a", { href: vegascene(shows[showKey][0]) }, "(Åpne på vegascene.no)") + ]), + t("ul", { id: "times" }, [ t("li", undefined, times.filter(e => e.ticketUrl !== "").map(e => { let tagLine = `${e.scene} - ${[e.type, ...e.tags].join(", ")}` tagLine = tagLine[0].toUpperCase() + tagLine.slice(1) + let dateLine = dateString(e.startDateTime) + dateLine = dateLine[0].toUpperCase() + dateLine.slice(1) return t("li", { class: `time time-${e.id}`, id: urlId(e) }, [ t("div", undefined, [ - t("span", { title: e.startDateTime }, dateString(e.startDateTime)), + t("span", { title: e.startDateTime, class: "date" }, dateLine), t("span", undefined, tagLine), t("div", { class: "actions" }, [ t("a", { href: e.ticketUrl }, "Billetter"), "share" in navigator ? t("button", { onclick: () => share(e) }, "Del tid") : null, - t("button", { onclick: (t) => copyLink(t, e) }, "Kopier lenke"), - t("a", { href: vegascene(e) }, "Åpne på vegascene.no") + t("button", { onclick: (t) => copyLink(t, e) }, "Kopier lenke") ]) ]) ]) |
