From aac5750e2553dc868f1f81bfd81d9bec65fe269d Mon Sep 17 00:00:00 2001 From: grgr Date: Sun, 8 May 2022 22:24:21 +0200 Subject: [PATCH] twst btn print view and column layout commented --- contents.js | 11 ++++++++--- index.html | 4 ++-- print.css | 16 ++++++++++++++++ 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/contents.js b/contents.js index 16042c9..8365842 100644 --- a/contents.js +++ b/contents.js @@ -5,7 +5,7 @@ const pagedjs = document.createElement("script"); pagedjs.src = "https://unpkg.com/pagedjs/dist/paged.polyfill.js"; pagedjs.id ="printview" -const printLib = document.getElementById("print"); +const printLib = document.getElementById("btn-print"); window.addEventListener("load", () => { fetchContents(); @@ -13,7 +13,10 @@ window.addEventListener("load", () => { //document.getElementsByTagName("head")[0].appendChild(pagedjs); }); -printLib.addEventListener("click", () => printViewToggle()) +printLib.addEventListener("click", () =>{ + printViewToggle(); + console.log(btnPrint); +}); function fetchContents() { fetch("https://hub.xpub.nl/soupboat/atlas-api/contributions") @@ -57,7 +60,9 @@ function printViewToggle() { if (!printview) { document.getElementsByTagName("head")[0].appendChild(pagedjs); - console.log("first") + // 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); } else { //document.getElementsByTagName("head")[0].removeChild(printview); diff --git a/index.html b/index.html index 3c34123..2084452 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@
- + 04:35
-
+
SI18 Weekly Release #3

Emergent Opera

diff --git a/print.css b/print.css index 3fe171e..c3f544d 100644 --- a/print.css +++ b/print.css @@ -62,6 +62,10 @@ display: block; } + .libretto { + overflow-y: hidden; + } + .contribution .title { font-size: 28px; @@ -69,8 +73,20 @@ .contribution { border-bottom: none; + height: 100%; overflow: hidden; } + + /*Sorry Gi, the multicolumn layout is too painful */ + /* + .contribution .content{ + column-count: 2; + column-fill: auto; + } + .contribution li{ + column-span: none; + }*/ +