diff --git a/contents.js b/contents.js index 8365842..5b71aff 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"; @@ -27,6 +28,7 @@ function fetchContents() { function populateContributions(contributions) { contributions.forEach((contribution) => { contributionsList.appendChild(createSection(contribution)); + createIndexSection(contribution); }); } @@ -53,6 +55,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() { diff --git a/index.html b/index.html index 3035063..d18b6a7 100644 --- a/index.html +++ b/index.html @@ -123,12 +123,13 @@ - +
Title
Filename.mp3
04:35
+
@@ -155,8 +156,17 @@
-
+

Index

+
+ +
diff --git a/print.css b/print.css index 43e2e07..1e6265c 100644 --- a/print.css +++ b/print.css @@ -64,6 +64,11 @@ .libretto { overflow-y: hidden; + overflow-x: hidden; + } + + .libretto > *{ + border-bottom: none; } @@ -86,7 +91,7 @@ .contribution li{ column-span: none; }*/ - + .content p, .content h2 { margin: default;