From 03b7f6e32b751fcd7412283fb7e9d5c526b90d73 Mon Sep 17 00:00:00 2001 From: Francesco Luzzana Date: Tue, 10 May 2022 02:11:27 +0200 Subject: [PATCH] style thingy --- char.json | 0 contents.js | 76 +++++++++++++++++++++++++++++++++++++++++++++-------- print.css | 43 +++++++++++++++++++++--------- style.css | 23 +++++++++------- 4 files changed, 108 insertions(+), 34 deletions(-) create mode 100644 char.json diff --git a/char.json b/char.json new file mode 100644 index 0000000..e69de29 diff --git a/contents.js b/contents.js index 315a04d..ef0d366 100644 --- a/contents.js +++ b/contents.js @@ -44,7 +44,7 @@ function populateContributions(contributions) { function createSection(contribution) { let section = reference.cloneNode(true); - section.id = contribution.moment.replace("'",""); + section.id = contribution.moment.replace("'", ""); section.querySelector(".moment").innerHTML = contribution.moment; section.querySelector(".title").innerHTML = contribution.title; section.querySelector(".author").innerHTML = contribution.author; @@ -74,27 +74,27 @@ function createIndexSection(contribution) { let tracks = contribution.audio; tracks.forEach((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); + let sym = document.createElement("td"); + let filename = document.createElement("td"); + sym.setAttribute("class", "symbol"); + sym.innerHTML = symbols[track]; + sym.style.fontFamily = "Arial, sans-serif"; + filename.setAttribute("class", "filename"); + filename.innerHTML = track; + row.appendChild(sym); + row.appendChild(filename); table.appendChild(row); }); trackList.appendChild(title); trackList.appendChild(table); } - - } function printViewToggle() { var printview = document.getElementById("printview"); if (!printview) { document.getElementsByTagName("head")[0].appendChild(pagedjs); - //----------------------- + //----------------------- //sto provando sta porcata qui, ma non funzia uguale. quando la pagina si trasforma in pagedjs la variabile del btn non è più definita (????) // var btnPrint = document.getElementById("btn-print"); // console.log(btnPrint); @@ -106,3 +106,57 @@ function printViewToggle() { } } +const symbols = { + "stream_01.mp3": "i1", + "stream_02.mp3": "i2", + "stream_03.mp3": "i3", + "stream_04.mp3": "i4", + "stream_05.mp3": "i5", + "stream_06.mp3": "i6", + "stream_07.mp3": "i7", + "stream_08.mp3": "i8", + "stream_09.mp3": "i9", + "stream_10.mp3": "i10", + "u.wav": "!!", + "t.wav": "-\\-", + "s.wav": "\\-", + "r.wav": "||", + "q.wav": "!—", + "p.wav": "!-", + "o.wav": ">/", + "n.wav": "\\", + "m.wav": "~~", + "l.wav": "/", + "k.wav": "ú", + "j.wav": ",-", + "i.wav": "|", + "h.wav": "^^", + "g.wav": "^", + "f.wav": "%", + "e.wav": "!", + "d.wav": "-", + "c.wav": ",,", + "b.wav": "_", + "a.wav": ".", + "sample8_Entracte3.mp3": "-c", + "sample6_Entracte3.mp3": "—C", + "sample3_Entracte3.mp3": "~c", + "sample7_Entracte3.mp3": "c-", + "sample4_Entracte3.mp3": "c—", + "sample2_Entracte3.mp3": "C~", + "sample5_Entracte3.mp3": "c/", + "sample1_Entracte3.mp3": "c\\", + "sample6_Entracte_2_2.mp3": "/b", + "sample5_Entracte_2_2.mp3": "\\b", + "sample4_Entracte_2_2.mp3": "=B", + "sample3_Entracte_2_2.mp3": ">B", + "sample2_Entracte_2_2.mp3": "b>", + "sample1_Entracte_2_2.mp3": "