From 4725692e03f315b7a13ff88ce36e8d7dda9ced00 Mon Sep 17 00:00:00 2001 From: Luca Trupiano Date: Wed, 22 Nov 2023 18:22:10 +0100 Subject: [PATCH] Allineati lavori, nuova vista (solo html) in index_4.4_test.html --- css/collapsemod.css | 42 + index_4.4.html | 6 +- index_4.4_test.html | 2023 +++++++++++++++++++++++++++++++++++++++++++ js/cesareBrowse.js | 41 +- js/script_4.4.js | 7 + 5 files changed, 2106 insertions(+), 13 deletions(-) create mode 100644 css/collapsemod.css create mode 100644 index_4.4_test.html diff --git a/css/collapsemod.css b/css/collapsemod.css new file mode 100644 index 0000000..eb8a908 --- /dev/null +++ b/css/collapsemod.css @@ -0,0 +1,42 @@ + @charset "UTF-8"; +/* custom.css */ + + .module { + position: relative; + } + + .module .collapse, .module .collapsing { + height: 5rem; + } + + .module .collapse { + display: block; /* By default the bootstrap collapse has a display: none*/ + overflow: hidden; + } + + .module .collapse.show { + height: auto; + } + + .read-more { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 1; + + /* 60% is where it should start the transition from transparent to white, increase it if you want to show more of your text*/ + background-image: linear-gradient(to bottom, transparent 60%, white); + + /* The opacity and transition is just to smooth out the effect */ + opacity: 1; + transition: all .3s linear; + } + + .read-more:not(.collapsed) { + opacity: 0; + /* you want to make the clickable area disapear once it is open, change the visibility to hidden:*/ + /* visibility: hidden; */ + } + \ No newline at end of file diff --git a/index_4.4.html b/index_4.4.html index 3ac6ba6..a69b333 100644 --- a/index_4.4.html +++ b/index_4.4.html @@ -47,7 +47,7 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ +
+ + + +
+ +
 
+
+
+
+
+
+
+
+
+
+
+ + +
+ + +
+
+
+ +
+ +
+
+ Inferno, Canto I Verso 1 - Dante Alighieri, Convivio IV, xxiii, 9-11 +
+
+ + + + + +
+
+ +
+
+ +
+ + + +
Luogo Fonte: IV, xxiii, 9-11
+
Tipo Riferimento: SUPPORTO ESTERNO
+
Commentario: L'Ottimo Commento 1333
+
Rapporto Soggetto/Oggetto: CONFERMA
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+ + +
+ +
+
+
+
Visualizza struttura periodo +
+
+
+ +
+ + +
+
+
+ +
+
+
+
+ + + +
+ +
+ + + + + +
+ + + + + \ No newline at end of file diff --git a/js/cesareBrowse.js b/js/cesareBrowse.js index 1cfc54e..42d4ca2 100644 --- a/js/cesareBrowse.js +++ b/js/cesareBrowse.js @@ -749,7 +749,22 @@ function resetFrasi(){ console.log("Array dopo") console.log(commentsArray) } - + + /* Luca: removeHtmlTags2 e' la versione compatta di removeHtmlTags*/ + function removeHtmlTags2(value){ + var text = "" + for (const key in value) { + text = `${value[key]}` + if (text != null){ + text = text.replace(/<(.|\n)*?>/g, ''); + text = text.replace("«",""); + text = text.replace("»",""); + text = text.replace(/[\r\n]+/gm, ' '); + value[`${key}`] = text; + } + } + } + function removeHtmlTags(value){ var text = value["annotazione"] if (text != null){ @@ -997,10 +1012,11 @@ function resetFrasi(){ spanDiv.append(''); spanDiv.append(''); } - spanComment.append('
'); } } - spanComment.appendTo(commentArea); + spanComment.appendTo(commentArea); + commentArea.append('
'); + $('#tab-list #vis0-tab').tab('show') }) function hasComments(cid){ @@ -1015,6 +1031,7 @@ function resetFrasi(){ } return false; } + function numberOfComments(cid){ var id = cid.substr(9); @@ -1232,10 +1249,11 @@ function resetFrasi(){ var verso = parseInt(formaItem[3]) - 1; var idCommento = "Commento_"+idcantica+"_"+canto+"_"+verso; + var commNumber = numberOfComments(idCommento); //if (hasComments(idCommento)){ - if (numberOfComments(idCommento)>0){ - createCommentSpan(idCommento, elverso, numberOfComments) - console.log("Numero commenti: "+numberOfComments(idCommento)) + if (commNumber>0){ + createCommentSpan(idCommento, elverso, commNumber) + console.log("Numero commenti: "+commNumber) } if(currSentenceId!=null && currSentenceId != sentenceid){ @@ -1303,15 +1321,18 @@ function resetFrasi(){ var spanoccorrenza = $('