Aggiunti tab nell'area visualizza, modifiche grafiche alla ricerca

This commit is contained in:
Luca Trupiano 2023-04-14 19:05:05 +02:00
parent fb3e8008ad
commit c7c7cea39e
5 changed files with 4405 additions and 0 deletions

441
css/custom1_4.3.css Normal file
View File

@ -0,0 +1,441 @@
@charset "UTF-8";
/* custom.css */
@font-face {
font-family: Humanist-777;
src: url(../fonts/Humanist-777-Font.otf);
}
@font-face {
font-family: Bracciolini;
src: url(../fonts/LDR_Bracciolini.otf);
}
html, body {
height: 100%;
font-family: 'Humanist-777', 'Roboto';
}
.tableMain {
height: 95%;
min-height: 600px;
}
.distanziatore {
height: 63px;
overflow:hidden;
}
.menuNavigazione {
width: 15%;
}
#colVisualizza {
max-height: 95%;
min-height: 600px;
}
.tableVis {
border-left-width: 2px !important;
border-bottom-width: 2px !important;
}
#colMinimap {
padding-top: 63px;
min-height: 600px;
min-width: 111px !important;
width: 111px !important;
border-right-width: 2px !important;
border-bottom-width: 2px !important;
}
.menuRicerca {
width: 30%;
min-width: 370px !important;
}
#displaycantoWrapper {
display: d-flex;
overflow-y: scroll;
box-sizing: border-box; width: calc(100% + 17px);
}
.visInfo2 {
padding-top: 4px;
}
#displayinfo, #displaynote {
overflow: auto !important;
}
.doubleborder {
z-index: 90;
border-bottom-width: 8px !important;
border-bottom-style: double !important;
}
.badge-outline-info {
padding: .1rem .15rem;
margin-left: .15rem;
margin-right: .2rem;
font-weight: 300;
vertical-align: super;
border: 1px solid;
}
.borderRadiusZero {
border-radius: 0 !important;
}
.leftBorderRadiusZero {
border-top-left-radius: 0 !important;
border-bottom-left-radius: 0 !important;
}
.page-link {
position: relative;
display: block;
padding: 0.5rem 0.75rem;
margin-left: -1px;
line-height: 1.25;
color: #5f8ec2;
background-color: #fff;
border: 1px solid #dee2e6;
}
.lista-risultati:hover, .citazioneFrase:hover {
cursor: pointer;
}
.navig-canto .sel-canto {
line-height: 1.2em;
}
.navig-canto:hover {
font-weight: 800;
cursor: pointer;
}
.ui-icon.inline {
display:inline-block;
}
.ui-state-disabled-opacity-1 {
opacity: 1 !important;
}
.ui-state-disabled-opacity-06 {
opacity: 0.6 !important;
}
.ui-selectable {
list-style-type: none;
margin: 0;
padding: 0;
}
#queryText {
width: 150px;
border-width: 2px !important;
}
/*
Minimap
*/
.minimap__container {
/*position: fixed;*/
/*top: 160px;*/
/*left: 600px;*/
min-width: 20px;
z-index: 100;
}
.minimap__size {
position: relative;
z-index: 5;
}
.minimap__viewer {
width: 70px;
position:absolute;
top: 2px;
left: 1px;
transform-origin: 0 0;
z-index: 100;
border: 2px solid;
}
.minimap__content {
position:absolute;
top: 63;
left: 0;
width:100%;
height: 100%;
z-index: 10;
transform-origin: 0 0;
margin: 4px 0px 0px 4px;
border-style: none;
}
.filler {
width: 100%;
position: relative;
}
.filler img {
position: absolute; top: 0; left: 0;
width: 100%;
height: 100%;
}
/*
Ex browsingldc.css
*/
.blog-main{
font-size: 18px;
font-family: "Bracciolini", "Spectral", -apple-system, BlinkMacSystemFont, Helvetica Neue,
Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, sans-serif;
}
.synt__info{
font-size: 12px;
font-weight: normal;
font-style: italic;
font-family: Palatino;
letter-spacing:0.5px;
}
.synt__categ{
font-size: 10px;
font-weight: normal;
font-family: Palatino;
letter-spacing:0.5px;
}
.numverso {
font-size: 12px;
font-family: 'Humanist-777', 'Roboto';
}
.espandiFrase:not(.disabled), .riduciFrase:not(.disabled) {
font-size: 10px;
font-family: 'Humanist-777', 'Roboto';
border: 2px solid;
cursor: pointer;
}
.espandiFrase.disabled, .riduciFrase.disabled {
font-size: 10px;
font-family: 'Humanist-777', 'Roboto';
cursor: default;
}
.citazioneFrase {
font-style: italic;
font-family: "Bracciolini", "Spectral", -apple-system, BlinkMacSystemFont, Helvetica Neue,
Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, sans-serif;
line-height: 0.5em;
font-size: 16px;
}
.btn-outline-secondary.focus, .btn-outline-secondary:focus {
outline: none !important;
box-shadow: none;
}
/* on mouseOver classes */
.Nik_dropdown {
position: relative;
display: inline-block;
}
.Nik_dropdown-content {
max-width: 170px;
min-width: 70px;
padding: 0px 0px;
font-size: 12px;
z-index: 100;
}
.Nik_dropdown:hover .Nik_dropdown-content {
display: block;
}
cite.elencoris {
line-height: 2.5;
}
.canto {
-webkit-user-select: none;
user-select: none;
}
.itemelenco {
-webkit-user-select: none;
user-select: none;
}
.ttContent {
padding: 5px 5px 0px 5px;
}
li::marker {
font-size: 12px;
font-family: 'Humanist-777', 'Roboto';
white-space: nowrap;
}
/* ------- customize colors -------- */
/* LINK utili:
https://lingtalfi.com/bootstrap4-color-generator
https://colordesigner.io/gradient-generator/?mode=lch#fafa6e-2A4858
https://colordesigner.io/#004056-2C858D-74CEB7-C9FFD5-FFFFCB
https://colordesigner.io/#fab37f-f1924e-4abd8c-00968e-106e7c
https://bootstrap.build/app
*/
/*
- lida1:
$primary rgb(95, 142, 194) #5f8ec2
$secondary $gray-600 #6c757d
$success rgb(117, 159, 154) #759F9A
$info #935fc2
$warning rgb(229, 194, 105) #E5C269 #eace87
$danger #9f757a
$text-muted $gray-700 #495057
------------------------------------*/
/* ------- #cbcbc0, #e7d4bf , #d9c8ca -------- */
.navbar {
background-image: linear-gradient(to right, #e7d4bf , #d9c8ca);
border-bottom-width: 2px !important;
border-bottom-color: #cbcbc0 !important;
}
.doubleborder {
border-bottom-color: #cbcbc0 !important;
}
/* ------- $primary #5f8ec2 -------- */
.badge-outline-info {
color: #5f8ec2;
border-color: #5f8ec2;
}
.navig-canto:hover, .citazioneFrase:hover {
color: #5f8ec2 !important;
}
.minimap__viewer {
border-color: rgba(203, 203, 192, 1);
background-color: rgba(203, 203, 192, 0.5);
}
/* ------- $success rgb(117, 159, 154) / #759F9A , #DEE2E6 -------- */
.custom-control-input:active~.custom-control-label::before {
background-color: rgba(117, 159, 154, 0.5) !important;
border-color: rgba(117, 159, 154, 0.5) !important;
}
.custom-control-input:focus:not(:checked)~.custom-control-label::before {
border-color: rgb(117, 159, 154) !important;
}
.custom-control-input:checked~.custom-control-label::before {
border-color: rgb(117, 159, 154) !important;
background-color: rgb(117, 159, 154) !important;
}
.ui-selectable .ui-selecting {
background: #759F9A;
}
.ui-selectable .ui-selected {
background: #DEE2E6;
color: #759F9A !important;
}
/* ------- $warning #eace87 -------- */
.mark {
background-color: #eace87 !important;
}
/* ------- #985949 -------- */
#displaycanto span:hover {
color: #985949;
}
.ttContent {
color: #985949;
}
/* ------- #5b352c -------- */
.citazioneFrase {
color: #5b352c;
}
/* ------- #1E90FF -------- */
.Nik_dropdown-content {
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
color: #1E90FF;
}
/* ricerca avanzata */
.bg-lida10 {
background-color: #c8d9d7 !important;
}
/* clausola */
.bg-lida11 {
background-color: #e3eceb !important;
}
/* AND */
.bg-lida12 {
background-color: #faf3e1 !important;
}
/* OR */
.bg-lida13 {
background-color: #ece3e4 !important;
}
/* visualizza e minimap */
.bg-lida-vis, #displayminimap, .claCollBtn {
background-color: #fefeff! important;
}
/* body */
.body-vis {
background-color: #fcfaf7! important;
padding-top: 0px;
}
.custom-select-sm.bg-light:hover, .custom-select-sm.bg-lida12:hover, .custom-select-sm.bg-lida13:hover {
background-color: #dae0e5!important;
cursor: pointer;
}
.ui-icon-arrowthick-2-n-s:hover {
cursor: move;
}

443
css/custom2_4.3.css Normal file
View File

@ -0,0 +1,443 @@
@charset "UTF-8";
/* custom.css */
@font-face {
font-family: Humanist-777;
src: url(../fonts/Humanist-777-Font.otf);
}
@font-face {
font-family: Bracciolini;
src: url(../fonts/LDR_Bracciolini.otf);
}
html, body {
height: 100%;
font-family: 'Humanist-777', 'Roboto';
}
.tableMain {
height: 95%;
min-height: 600px;
}
.distanziatore {
height: 63px;
overflow:hidden;
}
.menuNavigazione {
width: 15%;
}
#colVisualizza {
max-height: 95%;
min-height: 600px;
}
.tableVis {
border-left-width: 2px !important;
border-bottom-width: 2px !important;
}
#colMinimap {
padding-top: 63px;
min-height: 600px;
min-width: 110px !important;
width: 110px !important;
border-right-width: 2px !important;
border-bottom-width: 2px !important;
}
.menuRicerca {
width: 30%;
min-width: 370px !important;
}
#displaycantoWrapper {
display: d-flex;
overflow-y: scroll;
box-sizing: border-box; width: calc(100% + 17px);
}
.visInfo2 {
padding-top: 4px;
}
#displayinfo, #displaynote {
overflow: auto !important;
}
.doubleborder {
z-index: 90;
border-bottom-width: 8px !important;
border-bottom-style: double !important;
}
.badge-outline-info {
padding: .1rem .15rem;
margin-left: .15rem;
margin-right: .2rem;
font-weight: 300;
vertical-align: super;
border: 1px solid;
}
.borderRadiusZero {
border-radius: 0 !important;
}
.leftBorderRadiusZero {
border-top-left-radius: 0 !important;
border-bottom-left-radius: 0 !important;
}
.lista-risultati:hover, .citazioneFrase:hover {
cursor: pointer;
}
.navig-canto .sel-canto {
line-height: 1.2em;
}
.navig-canto:hover {
font-weight: 800;
cursor: pointer;
}
.ui-icon.inline {
display:inline-block;
}
.ui-state-disabled-opacity-1 {
opacity: 1 !important;
}
.ui-state-disabled-opacity-06 {
opacity: 0.6 !important;
}
.ui-selectable {
list-style-type: none;
margin: 0;
padding: 0;
}
#queryText {
width: 150px;
border-width: 2px !important;
}
/*
Minimap
*/
.minimap__container {
/*position: fixed;*/
/*top: 160px;*/
/*left: 600px;*/
min-width: 20px;
z-index: 100;
}
.minimap__size {
position: relative;
z-index: 5;
}
.minimap__viewer {
width: 70px;
position:absolute;
top: 2px;
left: 1px;
transform-origin: 0 0;
z-index: 100;
border: 2px solid;
}
.minimap__content {
position:absolute;
top: 63;
left: 0;
width:100%;
height: 100%;
z-index: 10;
transform-origin: 0 0;
margin: 4px 0px 0px 4px;
border-style: none;
}
.filler {
width: 100%;
position: relative;
}
.filler img {
position: absolute; top: 0; left: 0;
width: 100%;
height: 100%;
}
/*
Ex browsingldc.css
*/
.blog-main{
font-size: 18px;
font-family: Book Antiqua,Palatino,Palatino Linotype,Palatino LT STD,Georgia,serif;
}
.synt__info{
font-size: 12px;
font-weight: normal;
font-style: italic;
font-family: Palatino;
letter-spacing:0.5px;
}
.synt__categ{
font-size: 10px;
font-weight: normal;
font-family: Palatino;
letter-spacing:0.5px;
}
.numverso {
font-size: 12px;
font-family: 'Humanist-777', 'Roboto';
}
.espandiFrase:not(.disabled), .riduciFrase:not(.disabled) {
font-size: 10px;
font-family: 'Humanist-777', 'Roboto';
border: 2px solid;
cursor: pointer;
}
.espandiFrase.disabled, .riduciFrase.disabled {
font-size: 10px;
font-family: 'Humanist-777', 'Roboto';
cursor: default;
}
.citazioneFrase {
font-style: italic;
font-family: Book Antiqua,Palatino,Palatino Linotype,Palatino LT STD,Georgia,serif;
line-height: 0.5em;
font-size: 16px;
}
.btn-outline-secondary.focus, .btn-outline-secondary:focus {
outline: none !important;
box-shadow: none;
}
/* on mouseOver classes */
.Nik_dropdown {
position: relative;
display: inline-block;
}
.Nik_dropdown-content {
max-width: 170px;
min-width: 70px;
padding: 0px 0px;
font-size: 12px;
z-index: 100;
}
.Nik_dropdown:hover .Nik_dropdown-content {
display: block;
}
cite.elencoris {
line-height: 2.5;
}
.canto {
-webkit-user-select: none;
user-select: none;
}
.itemelenco {
-webkit-user-select: none;
user-select: none;
}
.ttContent {
padding: 5px 5px 0px 5px;
}
li::marker {
font-size: 12px;
font-family: 'Humanist-777', 'Roboto';
white-space: nowrap;
}
/* ------- customize colors -------- */
/* LINK utili:
https://lingtalfi.com/bootstrap4-color-generator
https://colordesigner.io/gradient-generator/?mode=lch#fafa6e-2A4858
https://colordesigner.io/#004056-2C858D-74CEB7-C9FFD5-FFFFCB
https://colordesigner.io/#fab37f-f1924e-4abd8c-00968e-106e7c
https://bootstrap.build/app
*/
/*
- lida1:
$primary rgb(95, 142, 194) #5f8ec2
$secondary $gray-600 #6c757d
$success rgb(117, 159, 154) #759F9A
$info #935fc2
$warning rgb(229, 194, 105) #E5C269 #eace87
$danger #9f757a
$text-muted $gray-700 #495057
- lida2:
$primary #734450
$secondary $gray-600 #b8a387 -
$success rgb(65, 93, 67) #054a29 #415d43
$info #55327d
$warning #325a7d
$danger #7d325a
$text-muted $gray-700
------------------------------------*/
/* ------- #cbcbc0 -------- */
.navbar {
/* background-image: linear-gradient(to right, #e7d4bf , #d9c8ca); */
border-bottom-width: 2px !important;
border-bottom-color: #cbcbc0 !important;
}
.doubleborder {
border-bottom-color: #cbcbc0 !important;
}
/* ------- $primary #734450 -------- */
.badge-outline-info {
color: #734450;
border-color: #734450;
}
.navig-canto:hover, .citazioneFrase:hover {
color: #734450 !important;
}
.minimap__viewer {
/* border-color: #734450; */
border-color: rgba(222, 226, 230, 1);
background-color: rgba(222, 226, 230, 0.5);
}
/* ------- $success rgb(65, 93, 67) / #415d43 , #DEE2E6 -------- */
.custom-control-input:active~.custom-control-label::before {
background-color: rgba(65, 93, 67, 0.5) !important;
border-color: rgba(65, 93, 67, 0.5) !important;
}
.custom-control-input:focus:not(:checked)~.custom-control-label::before {
border-color: rgb(65, 93, 67) !important;
}
.custom-control-input:checked~.custom-control-label::before {
border-color: rgb(65, 93, 67) !important;
background-color: rgb(65, 93, 67) !important;
}
.ui-selectable .ui-selecting {
background: #054a29;
}
.ui-selectable .ui-selected {
background: #DEE2E6;
color: #054a29 !important;
}
/* ------- #eace87 -------- */
.mark {
background-color: #a996a0 !important;
}
/* ------- $danger #7d325a -------- */
#displaycanto span:hover {
color: #7d325a;
}
.ttContent {
color: #7d325a;
}
/* ------- #c6b59f -------- */
.citazioneFrase {
color: #c6b59f;
}
/* ------- #1E90FF -------- */
.Nik_dropdown-content {
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
color: #1E90FF;
}
/* ricerca avanzata */
.bg-lida10 {
background-color: #8dac91 !important;
}
/* clausola */
.bg-lida11 {
background-color: #c6d5c8 !important;
}
/* AND */
.bg-lida12 {
background-color: #c8c6d5 !important;
}
/* OR */
.bg-lida13 {
background-color: #d5c8c6 !important;
}
/* visualizza e minimap */
.bg-lida-vis, #displayminimap, .claCollBtn {
background-color: #f8f9fa! important;
}
/* body */
.body-vis {
background-color: #f1ede7! important;
padding-top: 0px;
}
.claLI {
border-color: #cbcbc0 !important;
}
.custom-select-sm.bg-light:hover, .custom-select-sm.bg-lida12:hover, .custom-select-sm.bg-lida13:hover {
background-color: #dae0e5!important;
cursor: pointer;
}
.ui-icon-arrowthick-2-n-s:hover {
cursor: move;
}

1928
index_4.3.html Normal file

File diff suppressed because it is too large Load Diff

165
js/minimap_4.3.js Normal file
View File

@ -0,0 +1,165 @@
/**
*
*/
const displayCantoId = '#displaycanto';
const displayCantoWrapperId = '#displaycantoWrapper';
const minimapviewerId = '#minimapviewer';
const displayminimapId = '#displayminimap';
const visCantoClass = '.visCanto';
const fillerClass = '.filler';
const bodyScript = '<script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script> <script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>'
let minimap = document.createElement('div');
let viewer = document.createElement('div');
let minimapContent = document.createElement('iframe');
let realScale;
let currentMinimap = '';
let initOffset = '';
let correctionFactor = 1;
let scrollCorrectionFactor = 0.997;
function drawMinimap(name, onlyContent = false, cantoOffset = 0){
var cantoHeightToSet = $("body")[0].clientHeight*cssCantoHeight;
var maxCantoHeightToSet = $("body")[0].clientHeight*cssTableMainHeight-110; // 63 padding top + 47 margine bottom
$(visCantoClass).css("max-height", maxCantoHeightToSet);
$(displayCantoId).css("max-height", maxCantoHeightToSet);
currentMinimap = name;
if (currentMinimap == '#vistaFrasi') {
//correctionFactor = 1.003;
correctionFactor = 1.009;
scrollCorrectionFactor = 0.997;
//scrollCorrectionFactor = 1;
} else {
correctionFactor = 1;
scrollCorrectionFactor = 0.997;
};
initOffset = parseInt($("body").css("padding-top").replace("px", ""))+63;
if ($(displayminimapId).lenght > 0) {
$(displayminimapId)[0].remove();
}
showMinimap(onlyContent);
if (onlyContent == false) {
$(displayCantoWrapperId).scrollTop(cantoOffset);
$(minimapviewerId).offset({ top: initOffset});
var minimapTopPos = $(minimapviewerId).offset().top;
$(minimapviewerId).draggable({
axis: "y",
containment: $(displayminimapId),
scroll: false,
start: function(event, ui) { minimapScrolling = true; },
stop: function(event, ui) {
minimapScrolling = false;
latestOffset = $(displayCantoWrapperId).scrollTop()
},
drag: function(event, ui) {
minimapScrolling = true;
$(displayCantoWrapperId).scrollTop((ui.offset.top - minimapTopPos) / (realScale*correctionFactor));
}
});
trackScrollCanto();
};
}
function showMinimap(onlyContent) {
viewer.className = 'minimap__viewer';
viewer.id = 'minimapviewer';
minimapContent.className = 'minimap__content';
minimap.append(viewer, minimapContent);
$(displayminimapId).append(minimap);
let html = $(currentMinimap)[0].outerHTML;
if (html == null | html == '')
return;
let iFrameDoc = minimapContent.contentWindow.document;
var cssLinkb = document.createElement("link");
cssLinkb.href = $("#" + currStyle + "-Boot")[0].href;
cssLinkb.rel = "stylesheet";
cssLinkb.type = "text/css";
var cssLinkscroll = document.createElement("link");
cssLinkscroll.href = $("#" + currStyle + "-Custom")[0].href;
cssLinkscroll.rel = "stylesheet";
cssLinkscroll.type = "text/css";
iFrameDoc.open();
iFrameDoc.write('<div class="blog-main w-100 " style="display: d-flex;">'); // da pulire...
iFrameDoc.write(html);
iFrameDoc.write('</div>');
iFrameDoc.write(bodyScript);
iFrameDoc.close();
iFrameDoc.head.appendChild(cssLinkb);
iFrameDoc.head.appendChild(cssLinkscroll);
let bgCanto = $(visCantoClass).css('background-color');
$('iframe').contents().find('body').css('background-color', bgCanto + ' !important;');
var infoHeightToSet = $("body")[0].clientHeight*cssTableMainHeight - $(visCantoClass)[0].clientHeight-2-63-2-46
$("#displayinfo").css("maxHeight", infoHeightToSet+"px");
$("#displayinfo").css("height", infoHeightToSet+"px");
$("#displaynote").css("maxHeight", infoHeightToSet+"px");
$("#displaynote").css("height", infoHeightToSet+"px");
$(".visInfo").css("height", (infoHeightToSet+4)+"px");
getDimensionsDiv(false, onlyContent);
}
function getDimensionsDiv(onlyViewer = false, onlyContent = false) {
var srcCantoWidth = $(currentMinimap)[0].clientWidth;
var srcCantoHeight = $(currentMinimap)[0].clientHeight;
var maxHeight = ($("#colMinimap")[0].clientHeight)-68; //h attuale dello spazio minimap; -63 top padding, -1 bordo col, -4 bordi iframe
var maxWidth = $(displayminimapId)[0].clientWidth; //w attuale della minimap (css)
var miniCantoWidth = srcCantoWidth+64; //w prevista del canto nella minimap 64: padding pr + blank space
var miniCantoHeight = srcCantoHeight*correctionFactor; //h prevista del canto nella minimap
var resizableWidth = $(visCantoClass)[0].clientWidth;
var resizableHeight = $(visCantoClass)[0].clientHeight;
var resizableRatio = resizableHeight/resizableWidth;
var heightRatio = resizableHeight/srcCantoHeight;
if (onlyViewer == false) {
realScale= Math.min((maxWidth/miniCantoWidth), (maxHeight/miniCantoHeight), 1);
minimapContent.style.transform = `scale(${realScale})`;
minimapContent.style.height = miniCantoHeight + "px";
minimapContent.style.width = maxWidth/realScale + "px";
}
let viewerHeight = (miniCantoHeight*realScale*heightRatio/correctionFactor)-2; // -2 = bordi
let viewerWidth = Math.min(viewerHeight/resizableRatio, maxWidth-3)+2; // -3 bordi
var displayminimapHeight = (miniCantoHeight*realScale)+6;
$(displayminimapId).height(displayminimapHeight);
$(fillerClass).height(Math.max(maxHeight-displayminimapHeight)+2, 0);
if (onlyContent == false) {
viewer.style.height = viewerHeight + "px";
viewer.style.width = viewerWidth + "px";
trackScrollCanto();
};
};
function trackScrollCanto() {
var minimapHeight = ($(currentMinimap)[0].clientHeight+32)*realScale;
var posDbefore = $(displayCantoWrapperId).scrollTop();
var srcCantoHeight = $(currentMinimap)[0].clientHeight;
var posAfter = (minimapHeight*posDbefore*correctionFactor)/(srcCantoHeight*scrollCorrectionFactor);
$(minimapviewerId).offset({ top: initOffset + posAfter});
latestOffset = posDbefore;
};

1428
js/script_4.3.js Normal file

File diff suppressed because it is too large Load Diff