diff --git a/css/collapsemod.css b/css/collapsemod.css index d156ab4..b125fa2 100644 --- a/css/collapsemod.css +++ b/css/collapsemod.css @@ -6,7 +6,7 @@ } .module .collapse, .module .collapsing { - height: 4rem; /* By default 5 */ + height: 4.5rem; /* By default 5 */ } .module .collapse { @@ -20,14 +20,14 @@ .read-more { position: absolute; - top: 0; + top: 1.6rem; 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 40%, white); + background-image: linear-gradient(to bottom, transparent 5%, white); /* The opacity and transition is just to smooth out the effect */ opacity: 1; diff --git a/js/cesareBrowse.js b/js/cesareBrowse.js index 596a456..998bcda 100644 --- a/js/cesareBrowse.js +++ b/js/cesareBrowse.js @@ -832,12 +832,16 @@ function resetFrasi(){ if (comments.RapportoCommentoCommentatoreText != null && comments.RapportoCommentoCommentatoreText != "nan"){ createModuleCommentatore (collapseCardBody, comments.RapportoCommentoCommentatoreText, "5", id, pos) } - if (comments.frammentoNota != null && comments.frammentoNota != "nan"){ - createModule(collapseCardBody,"Nota: ", comments.frammentoNota, "7", id, pos) - } - if (comments.annotazione != null && comments.annotazione != "nan"){ - createModule(collapseCardBody,"Nota completa: ", comments.annotazione, "6", id, pos) - } + if (comments.frammentoNota != null && comments.frammentoNota != "nan" && comments.annotazione != null && comments.annotazione != "nan") { + createModuleFrammAnnot(collapseCardBody, comments.frammentoNota, comments.annotazione, "6", id, pos) + } else { + if (comments.frammentoNota != null && comments.frammentoNota != "nan"){ + createModule(collapseCardBody,"Nota: ", comments.frammentoNota, "7", id, pos) + } + if (comments.annotazione != null && comments.annotazione != "nan"){ + createModule(collapseCardBody,"Nota completa: ", comments.annotazione, "6", id, pos) + } + } if (comments.NotaFonteCitazione != null && comments.NotaFonteCitazione != "nan" && comments.NotaFonteCitazione != ""){ createModule(collapseCardBody,"Nota dell'annotatore: ", comments.NotaFonteCitazione, "8", id, pos) } @@ -981,7 +985,7 @@ function resetFrasi(){ divModule.append(divNote); } else { - var divModule = $('