diff --git a/contents.js b/contents.js index 77bba4b..fc4144f 100644 --- a/contents.js +++ b/contents.js @@ -1,5 +1,6 @@ const reference = document.getElementById("reference"); const contributionsList = document.getElementById("contributions"); +const trackList = document.getElementById("trackList"); const pagedjs = document.createElement("script"); pagedjs.src = "https://unpkg.com/pagedjs/dist/paged.polyfill.js"; @@ -28,6 +29,7 @@ function populateContributions(contributions) { contributions.sort((a, b) => a.order - b.order); contributions.forEach((contribution) => { contributionsList.appendChild(createSection(contribution)); + createIndexSection(contribution); }); } @@ -54,6 +56,26 @@ function atlasLink() { } } +function createIndexSection(contribution) { + let table = document.createElement("table"); + let title = document.createElement("h4"); + title.innerHTML = contribution.title; + contribution.audio.forEach((track) => { + console.log(track); + // let row = document.createElement("tr"); + // let col1 = document.createElement("td"); + // let col2 = document.createElement("td"); + // col1.setAttribute("class", "symbol"); + // col2.setAttribute("class", "filename"); + // col2.innerHTML = track; + // row.appendChild(col1); + // row.appendChild(col2); + // table.appendChild(row); + }); + trackList.appendChild(title); + trackList.appendChild(table); +} + function printViewToggle() { var printview = document.getElementById("printview"); if (!printview) { diff --git a/index.html b/index.html index 6d8116e..2222335 100644 --- a/index.html +++ b/index.html @@ -123,12 +123,13 @@ - +