caricamento struttura dati locale (in progress), nuovo css per browsing
This commit is contained in:
parent
43d43bde85
commit
d6eb27f8f9
|
|
@ -5,223 +5,23 @@
|
||||||
* Globals
|
* Globals
|
||||||
*/
|
*/
|
||||||
|
|
||||||
body {
|
|
||||||
font-family: Georgia, "Times New Roman", Times, serif;
|
|
||||||
color: #555;
|
|
||||||
overscroll-behavior: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1, .h1,
|
|
||||||
h2, .h2,
|
|
||||||
h3, .h3,
|
|
||||||
h4, .h4,
|
|
||||||
h5, .h5,
|
|
||||||
h6, .h6 {
|
|
||||||
margin-top: 0;
|
|
||||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
p{
|
|
||||||
font-size: clamp(1px, 2.2vw, 20px);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Override Bootstrap's default container.
|
|
||||||
*/
|
|
||||||
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
.container {
|
|
||||||
width: 970px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Masthead for nav
|
|
||||||
*/
|
|
||||||
|
|
||||||
.blog-masthead {
|
|
||||||
background-color: #428bca;
|
|
||||||
-webkit-box-shadow: inset 0 -2px 5px rgba(0, 0, 0, .1);
|
|
||||||
box-shadow: inset 0 -2px 5px rgba(0, 0, 0, .1);
|
|
||||||
position: fixed;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Nav links */
|
|
||||||
.blog-nav-item {
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
padding: 10px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #cdddeb;
|
|
||||||
}
|
|
||||||
.blog-nav-item:hover,
|
|
||||||
.blog-nav-item:focus {
|
|
||||||
color: #fff;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Active state gets a caret at the bottom */
|
|
||||||
.blog-nav .active {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
.blog-nav .active:after {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
left: 50%;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
margin-left: -5px;
|
|
||||||
vertical-align: middle;
|
|
||||||
content: " ";
|
|
||||||
border-right: 5px solid transparent;
|
|
||||||
border-bottom: 5px solid;
|
|
||||||
border-left: 5px solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Blog name and description
|
|
||||||
*/
|
|
||||||
|
|
||||||
.blog-header {
|
|
||||||
padding-top: 20px;
|
|
||||||
padding-bottom: 60px;
|
|
||||||
}
|
|
||||||
.blog-title {
|
|
||||||
margin-top: 30px;
|
|
||||||
margin-bottom: 0;
|
|
||||||
font-size: 60px;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
.blog-description {
|
|
||||||
font-size: 20px;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Main column and sidebar layout
|
|
||||||
*/
|
|
||||||
|
|
||||||
.blog-main {
|
|
||||||
padding: 15px;
|
|
||||||
font-size: 18px;
|
|
||||||
line-height: 1.5;
|
|
||||||
z-index: -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Sidebar modules for boxing content */
|
|
||||||
.sidebar-module {
|
|
||||||
padding: 15px;
|
|
||||||
margin: 0 -15px 15px;
|
|
||||||
position: fixed;
|
|
||||||
|
|
||||||
}
|
|
||||||
.sidebar-module-inset {
|
|
||||||
padding: 15px;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
.sidebar-module-inset p:last-child,
|
|
||||||
.sidebar-module-inset ul:last-child,
|
|
||||||
.sidebar-module-inset ol:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Pagination */
|
|
||||||
.pager {
|
|
||||||
margin-bottom: 60px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
.pager > li > a {
|
|
||||||
width: 140px;
|
|
||||||
padding: 10px 20px;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Blog posts
|
|
||||||
*/
|
|
||||||
|
|
||||||
.blog-post {
|
|
||||||
margin-bottom: 60px;
|
|
||||||
}
|
|
||||||
.blog-post-title {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
font-size: 40px;
|
|
||||||
}
|
|
||||||
.blog-post-meta {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Canto
|
* Canto
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.canto {
|
|
||||||
margin-bottom: 60px;
|
|
||||||
}
|
|
||||||
.titolo-canto {
|
|
||||||
margin-bottom: 8px;
|
|
||||||
font-size: 24px;
|
|
||||||
}
|
|
||||||
.canto-meta {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Footer
|
* Footer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.blog-footer {
|
|
||||||
padding: 40px 0;
|
|
||||||
color: #999;
|
|
||||||
text-align: center;
|
|
||||||
background-color: #f9f9f9;
|
|
||||||
border-top: 1px solid #e5e5e5;
|
|
||||||
}
|
|
||||||
.blog-footer p:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Minimap
|
Minimap
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
.minimap__container {
|
||||||
*{
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
font-family: 'Inter', sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
html, body{
|
|
||||||
overscroll-behavior: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
h1{
|
|
||||||
font-size: clamp(1px, 3.2vw, 28px);
|
|
||||||
}
|
|
||||||
|
|
||||||
p{
|
|
||||||
font-size: clamp(1px, 2.2vw, 20px);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.minimap_container {
|
|
||||||
/*position: fixed;*/
|
/*position: fixed;*/
|
||||||
/*top: 160px;*/
|
/*top: 160px;*/
|
||||||
/*left: 600px;*/
|
/*left: 600px;*/
|
||||||
|
|
@ -230,7 +30,8 @@ p{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.minimap_size {
|
|
||||||
|
.minimap__size {
|
||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
|
|
@ -238,9 +39,11 @@ p{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.minimap_viewer {
|
|
||||||
|
|
||||||
/*width: 20%;*/
|
|
||||||
|
.minimap__viewer {
|
||||||
|
|
||||||
|
width: 70%;
|
||||||
|
|
||||||
position:absolute;
|
position:absolute;
|
||||||
|
|
||||||
|
|
@ -257,9 +60,9 @@ p{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.minimap_content {
|
|
||||||
position:absolute;
|
|
||||||
|
|
||||||
|
.minimap__content {
|
||||||
|
position:absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
@ -275,4 +78,3 @@ p{
|
||||||
border: 1px solid white;
|
border: 1px solid white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<!-- <link rel="stylesheet" href="https://cdn.datatables.net/1.12.1/css/jquery.dataTables.min.css"> -->
|
<!-- <link rel="stylesheet" href="https://cdn.datatables.net/1.12.1/css/jquery.dataTables.min.css"> -->
|
||||||
<!-- <link rel="stylesheet" href="https://unpkg.com/tachyons/css/tachyons.min.css"> -->
|
<!-- <link rel="stylesheet" href="https://unpkg.com/tachyons/css/tachyons.min.css"> -->
|
||||||
<link rel="stylesheet" href="./css/datatables.min.css">
|
<link rel="stylesheet" href="./css/datatables.min.css">
|
||||||
<!-- <link rel="stylesheet" href="./css/browsingldc.css"> -->
|
<link rel="stylesheet" href="./css/browsingldc.css">
|
||||||
<link rel="stylesheet" href="./css/custom.css">
|
<link rel="stylesheet" href="./css/custom.css">
|
||||||
|
|
||||||
<!-- <link rel="stylesheet" href="./node_modules/normalize.css/normalize.css">
|
<!-- <link rel="stylesheet" href="./node_modules/normalize.css/normalize.css">
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
<!-- <script src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js" defer></script> -->
|
<!-- <script src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js" defer></script> -->
|
||||||
<script type="text/javascript" src="./js/datatables.min.js" defer></script>
|
<script type="text/javascript" src="./js/datatables.min.js" defer></script>
|
||||||
<script type="text/javascript" src="./js/cesareBrowse.js"></script>
|
<script type="text/javascript" src="./js/cesareBrowse.js"></script>
|
||||||
|
<script type="text/javascript" src="./js/partext.js"></script>
|
||||||
<script type="text/javascript" src="./js/utils.js"></script>
|
<script type="text/javascript" src="./js/utils.js"></script>
|
||||||
<script type="text/javascript" src="https://bundle.run/sparqljs@3.4.1"></script>
|
<script type="text/javascript" src="https://bundle.run/sparqljs@3.4.1"></script>
|
||||||
<script type="text/javascript" src="./js/lib/jquery.ui.touch-punch.js"></script>
|
<script type="text/javascript" src="./js/lib/jquery.ui.touch-punch.js"></script>
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ $(document).ready(function() {
|
||||||
const sparqlGenerator = sparqljs.Generator;
|
const sparqlGenerator = sparqljs.Generator;
|
||||||
const myEngine = new Comunica.QueryEngine();
|
const myEngine = new Comunica.QueryEngine();
|
||||||
const sparqlEndpoint = "https://hdnlab1.isti.cnr.it/fuseki/commediaontosintgra/query";
|
const sparqlEndpoint = "https://hdnlab1.isti.cnr.it/fuseki/commediaontosintgra/query";
|
||||||
|
//const sparqlEndpoint = "https://hdnlab1.isti.cnr.it/fuseki/hdntest/query";
|
||||||
var primaCanticaLoaded = false;
|
var primaCanticaLoaded = false;
|
||||||
var secondaCanticaLoaded = false;
|
var secondaCanticaLoaded = false;
|
||||||
var terzaCanticaLoaded = false;
|
var terzaCanticaLoaded = false;
|
||||||
|
|
@ -25,9 +26,10 @@ $(document).ready(function() {
|
||||||
activateMenuItem('#cantica1')
|
activateMenuItem('#cantica1')
|
||||||
if (!(primaCanticaLoaded)) {
|
if (!(primaCanticaLoaded)) {
|
||||||
|
|
||||||
jsonQuery = versiCantica("Inferno");
|
//jsonQuery = versiCantica("Inferno");
|
||||||
execQuery = new sparqlGenerator().stringify(jsonQuery);
|
//execQuery = new sparqlGenerator().stringify(jsonQuery);
|
||||||
executeQueryVersi(execQuery);
|
//executeQueryVersi(execQuery);
|
||||||
|
showCantica('Inferno')
|
||||||
primaCanticaLoaded = true;
|
primaCanticaLoaded = true;
|
||||||
$(".labelCantica").attr('style', "display: block;");
|
$(".labelCantica").attr('style', "display: block;");
|
||||||
}
|
}
|
||||||
|
|
@ -47,9 +49,10 @@ $(document).ready(function() {
|
||||||
activateMenuItem('#cantica2')
|
activateMenuItem('#cantica2')
|
||||||
if (!(secondaCanticaLoaded)) {
|
if (!(secondaCanticaLoaded)) {
|
||||||
|
|
||||||
jsonQuery = versiCantica("Purgatorio");
|
//jsonQuery = versiCantica("Purgatorio");
|
||||||
execQuery = new sparqlGenerator().stringify(jsonQuery);
|
//execQuery = new sparqlGenerator().stringify(jsonQuery);
|
||||||
executeQueryVersi(execQuery);
|
//executeQueryVersi(execQuery);
|
||||||
|
showCantica('Purgatorio')
|
||||||
secondaCanticaLoaded = true;
|
secondaCanticaLoaded = true;
|
||||||
$(".labelCantica").attr('style', "display: block;");
|
$(".labelCantica").attr('style', "display: block;");
|
||||||
}
|
}
|
||||||
|
|
@ -67,10 +70,7 @@ $(document).ready(function() {
|
||||||
hideMinimap();
|
hideMinimap();
|
||||||
activateMenuItem('#cantica3')
|
activateMenuItem('#cantica3')
|
||||||
if (!(terzaCanticaLoaded)) {
|
if (!(terzaCanticaLoaded)) {
|
||||||
|
showCantica('Paradiso')
|
||||||
jsonQuery = versiCantica("Paradiso");
|
|
||||||
execQuery = new sparqlGenerator().stringify(jsonQuery);
|
|
||||||
executeQueryVersi(execQuery);
|
|
||||||
terzaCanticaLoaded = true;
|
terzaCanticaLoaded = true;
|
||||||
$(".labelCantica").attr('style', "display: block;");
|
$(".labelCantica").attr('style', "display: block;");
|
||||||
}
|
}
|
||||||
|
|
@ -99,6 +99,8 @@ $(document).ready(function() {
|
||||||
console.log("viewer top pos after: "+$('#minimapviewer').offset().top)
|
console.log("viewer top pos after: "+$('#minimapviewer').offset().top)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
jQuery(document).delegate('.navig-canto', 'click', function(e) {
|
jQuery(document).delegate('.navig-canto', 'click', function(e) {
|
||||||
$('.canto').each(function() {
|
$('.canto').each(function() {
|
||||||
$(this).attr("style", 'display:none');
|
$(this).attr("style", 'display:none');
|
||||||
|
|
@ -109,6 +111,7 @@ $(document).ready(function() {
|
||||||
mmih=$("#"+displayId).innerHeight();
|
mmih=$("#"+displayId).innerHeight();
|
||||||
|
|
||||||
showMinimap($(this).attr('name').replace(" ", "_"))
|
showMinimap($(this).attr('name').replace(" ", "_"))
|
||||||
|
|
||||||
currentMinimap=$(this).attr('name').replace(" ", "_");
|
currentMinimap=$(this).attr('name').replace(" ", "_");
|
||||||
//mmviewer diventa draggable
|
//mmviewer diventa draggable
|
||||||
minimapTopPos=$('#minimapviewer').offset().top
|
minimapTopPos=$('#minimapviewer').offset().top
|
||||||
|
|
@ -164,7 +167,7 @@ $(document).ready(function() {
|
||||||
//Reset
|
//Reset
|
||||||
|
|
||||||
jQuery(document).delegate('#cleanresult', 'click', function(e) {
|
jQuery(document).delegate('#cleanresult', 'click', function(e) {
|
||||||
|
console.log('clean')
|
||||||
cleanSearchResult()
|
cleanSearchResult()
|
||||||
esprlogica=[]
|
esprlogica=[]
|
||||||
$('#queryText').val("")
|
$('#queryText').val("")
|
||||||
|
|
@ -201,7 +204,8 @@ jQuery(document).delegate('#cleanresult', 'click', function(e) {
|
||||||
for (verso of listarisultati){
|
for (verso of listarisultati){
|
||||||
idverso='#'+verso
|
idverso='#'+verso
|
||||||
//console.log(idverso)
|
//console.log(idverso)
|
||||||
$(idverso).attr('class', 'f6 font-weight-lighter')
|
//$(idverso).attr('class', 'f6 font-weight-lighter')
|
||||||
|
$(idverso).attr('class', 'f6text-secondary text-nowrap font-weight-lighter')
|
||||||
}
|
}
|
||||||
$( ".badge" ).remove();
|
$( ".badge" ).remove();
|
||||||
listarisultati=[]
|
listarisultati=[]
|
||||||
|
|
@ -217,39 +221,33 @@ jQuery(document).delegate('#cleanresult', 'click', function(e) {
|
||||||
let minimapContent = document.createElement('iframe');
|
let minimapContent = document.createElement('iframe');
|
||||||
let scale=0.1;
|
let scale=0.1;
|
||||||
let realScale;
|
let realScale;
|
||||||
|
let mappedElement=''
|
||||||
|
|
||||||
function showMinimap(element) {
|
function showMinimap(element) {
|
||||||
|
|
||||||
|
|
||||||
mmplace=document.getElementById('displayminimap')
|
mmplace=document.getElementById('displayminimap')
|
||||||
minimap.className = 'minimap_container'
|
//mmplace=document.getElementById('displaycanto')
|
||||||
minimapSize.className = 'minimap_size'
|
|
||||||
viewer.className = 'minimap_viewer'
|
minimap.className = 'minimap__container'
|
||||||
|
minimapSize.className = 'minimap__size'
|
||||||
|
viewer.className = 'minimap__viewer'
|
||||||
viewer.id='minimapviewer'
|
viewer.id='minimapviewer'
|
||||||
minimapContent.className = 'minimap_content'
|
minimapContent.className = 'minimap__content'
|
||||||
//class="col-3 px-0"
|
//class="col-3 px-0"
|
||||||
minimap.append(minimapSize, viewer, minimapContent);
|
minimap.append(minimapSize, viewer, minimapContent);
|
||||||
|
|
||||||
//document.body.appendChild(minimap)
|
//document.body.appendChild(minimap)
|
||||||
if (mmplace!=null)
|
|
||||||
mmplace.appendChild(minimap)
|
mmplace.appendChild(minimap)
|
||||||
//document.body.appendChild(minimap)
|
|
||||||
else{
|
|
||||||
minimap.style.position = 'fixed';
|
|
||||||
document.body.appendChild(minimap)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let html = document.getElementById(element).outerHTML//innerHTML
|
let html = document.getElementById(element).outerHTML//innerHTML
|
||||||
//console.log(html)
|
//console.log(html)
|
||||||
|
if (html==null | html=='')
|
||||||
|
return;
|
||||||
|
|
||||||
let iFrameDoc = minimapContent.contentWindow.document;
|
let iFrameDoc = minimapContent.contentWindow.document;
|
||||||
var cssLink = document.createElement("link");
|
|
||||||
cssLink.href = "https://unpkg.com/tachyons/css/tachyons.min.css";
|
|
||||||
cssLink.rel = "stylesheet";
|
|
||||||
cssLink.type = "text/css";
|
|
||||||
|
|
||||||
var cssLinkb = document.createElement("link");
|
var cssLinkb = document.createElement("link");
|
||||||
cssLinkb.href = "https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css";
|
cssLinkb.href = "https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css";
|
||||||
|
|
@ -264,20 +262,17 @@ jQuery(document).delegate('#cleanresult', 'click', function(e) {
|
||||||
iFrameDoc.open();
|
iFrameDoc.open();
|
||||||
iFrameDoc.write(html);
|
iFrameDoc.write(html);
|
||||||
iFrameDoc.close();
|
iFrameDoc.close();
|
||||||
iFrameDoc.head.appendChild(cssLink);
|
|
||||||
iFrameDoc.head.appendChild(cssLinkb);
|
iFrameDoc.head.appendChild(cssLinkb);
|
||||||
iFrameDoc.head.appendChild(cssLinkscroll);
|
iFrameDoc.head.appendChild(cssLinkscroll);
|
||||||
|
mappedElement=element
|
||||||
|
|
||||||
getDimensionsDiv()
|
getDimensionsDiv()
|
||||||
|
|
||||||
if (document.getElementById(displayId).getAttribute('target')==null)
|
|
||||||
window.addEventListener('scroll', trackScroll)
|
window.addEventListener('scroll', trackScroll)
|
||||||
/*else{
|
|
||||||
//document.getElementById(displayId).addEventListener('scroll', trackScrollCanto)
|
|
||||||
|
|
||||||
}*/
|
|
||||||
|
|
||||||
document.getElementById(displayId).addEventListener('resize', getDimensionsDiv)
|
//document.getElementById(displayId).addEventListener('resize', getDimensionsDiv)
|
||||||
|
|
||||||
window.addEventListener('resize', getDimensionsDiv)
|
window.addEventListener('resize', getDimensionsDiv)
|
||||||
|
|
||||||
|
|
@ -286,55 +281,23 @@ jQuery(document).delegate('#cleanresult', 'click', function(e) {
|
||||||
|
|
||||||
|
|
||||||
function getDimensions(){
|
function getDimensions(){
|
||||||
|
|
||||||
|
|
||||||
cantoplace=document.getElementById(displayId)
|
cantoplace=document.getElementById(displayId)
|
||||||
mmplace=document.getElementById('displayminimap')
|
let bodyWidth= cantoplace.clientWidth;
|
||||||
isnick=mmplace=document.getElementById('apricerca')
|
let bodyRatio= bodyWidth/cantoplace.clientHeight
|
||||||
let bodyWidth = document.body.clientWidth;
|
//let winRatio=cantoplace.clientWidth / getInnerHeight(cantoplace)
|
||||||
|
let winRatio= window.innerHeight / window.innerWidth;
|
||||||
let bodyRatio = document.body.clientHeight / bodyWidth;
|
|
||||||
let winRatio = window.innerHeight / window.innerWidth;
|
|
||||||
//test
|
|
||||||
|
|
||||||
//if(cantoplace!=null & mmplace!=null){
|
|
||||||
if(mmplace!=null){
|
|
||||||
//winRatio = mmih / mmiw;//window.innerWidth;
|
|
||||||
//bodyRatio = mmih / mmiw;//mmplace.clientHeight/cantoplace.clientWidth;
|
|
||||||
}
|
|
||||||
viewer.style.width='50%'
|
|
||||||
/*if(mmplace!=null){
|
|
||||||
//minimap.style.width = '75%';
|
|
||||||
//viewer.style.width='45%'
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
minimap.style.width = '15%';
|
|
||||||
viewer.style.width='25%'
|
|
||||||
}*/
|
|
||||||
if(isnick!=null){
|
|
||||||
minimap.style.width = '40%';
|
|
||||||
viewer.style.width='15%'
|
|
||||||
}
|
|
||||||
|
|
||||||
//end test
|
|
||||||
|
|
||||||
|
|
||||||
|
minimap.style.width='55%';
|
||||||
|
viewer.style.width='55%'
|
||||||
|
|
||||||
|
realScale=minimap.clientWidth / bodyWidth;
|
||||||
|
|
||||||
realScale = minimap.clientWidth / mmih;//bodyWidth;
|
minimapSize.style.paddingTop=`${bodyRatio * 100}%`
|
||||||
|
viewer.style.paddingTop=`${winRatio * 100}%`;
|
||||||
console.log(' cw ' +minimap.clientWidth+" bw "+ bodyWidth +" br "+bodyRatio+ ' rs '+realScale)
|
minimapContent.style.transform=`scale(${realScale})`;
|
||||||
//realScale=scale
|
minimapContent.style.width=`${(100/realScale)}%`;
|
||||||
|
minimapContent.style.height=`${(100 / realScale)}%`;
|
||||||
minimapSize.style.paddingTop = `${bodyRatio * 100}%`
|
|
||||||
|
|
||||||
viewer.style.paddingTop = `${(winRatio) * 100}%`;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minimapContent.style.transform = `scale(${realScale})`;
|
|
||||||
minimapContent.style.width = `${(100 / realScale)}%`
|
|
||||||
minimapContent.style.height = `${(100 / realScale)}%`
|
|
||||||
|
|
||||||
}
|
}
|
||||||
function getInnerHeight( elm ){
|
function getInnerHeight( elm ){
|
||||||
|
|
@ -347,50 +310,30 @@ jQuery(document).delegate('#cleanresult', 'click', function(e) {
|
||||||
|
|
||||||
|
|
||||||
cantoplace=document.getElementById(displayId)
|
cantoplace=document.getElementById(displayId)
|
||||||
mmplace=document.getElementById('displayminimap')
|
|
||||||
isnick=mmplace=document.getElementById('apricerca')
|
|
||||||
cpmaxh=cantoplace.style.maxHeight
|
|
||||||
cpmaxh=cpmaxh.replace('px','')
|
|
||||||
cpbw=cantoplace.style.width
|
|
||||||
let tebodyWidth = document.body.clientWidth;
|
|
||||||
|
|
||||||
let tebodyRatio = (document.body.clientHeight) / tebodyWidth;
|
elementplace=document.getElementById(mappedElement)
|
||||||
let tewinRatio = window.innerHeight / window.innerWidth;
|
|
||||||
|
|
||||||
let bodyWidth = mmiw;
|
bodyWidth= elementplace.clientWidth;
|
||||||
|
bodyRatio= elementplace.clientHeight / bodyWidth;
|
||||||
let bodyRatio = parseInt(cpmaxh) / bodyWidth;
|
//let bodyWidth= cantoplace.clientWidth;
|
||||||
|
//let bodyRatio= cantoplace.clientHeight / bodyWidth;
|
||||||
elmih=getInnerHeight(cantoplace)
|
//let winRatio= window.innerHeight / (window.innerWidth);
|
||||||
|
let winRatio= getInnerHeight(cantoplace) / (cantoplace.clientWidth);
|
||||||
let winRatio = elmih / (mmiw-32);
|
|
||||||
|
|
||||||
minimap.style.width = '70%';
|
|
||||||
viewer.style.width='40%'
|
|
||||||
|
|
||||||
if(isnick!=null){
|
|
||||||
//minimap.style.width = '90%';
|
|
||||||
//viewer.style.width='20%'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
//minimap.style.width='15%';
|
||||||
realScale = minimap.clientWidth / cpmaxh;//bodyWidth;
|
minimap.style.width='100%';
|
||||||
|
|
||||||
console.log(' cw ' +minimap.clientWidth+" bw "+ bodyWidth +" br "+bodyRatio+ ' rs '+realScale)
|
|
||||||
//realScale=scale
|
|
||||||
|
|
||||||
minimapSize.style.paddingTop = `${bodyRatio * 100}%`
|
|
||||||
|
|
||||||
console.log (minimapSize.style.paddingTop)
|
|
||||||
|
|
||||||
viewer.style.paddingTop = `${(winRatio) * 50}%`;
|
|
||||||
|
|
||||||
|
|
||||||
//test
|
realScale=minimap.clientWidth / bodyWidth;
|
||||||
minimapContent.style.transform = `scale(${realScale})`;
|
|
||||||
minimapContent.style.width = `${(100 / realScale)}%`
|
minimapSize.style.paddingTop=`${bodyRatio * 100}%`
|
||||||
minimapContent.style.height = `${(100 / realScale)}%`
|
viewer.style.paddingTop=`${winRatio * 100}%`;
|
||||||
|
minimapContent.style.transform=`scale(${realScale})`;
|
||||||
|
minimapContent.style.width=`${(100/realScale)}%`;
|
||||||
|
minimapContent.style.height=`${(100 / realScale)}%`;
|
||||||
|
//minimapContent.style.height=`100%`;
|
||||||
|
minimapContent.style.float='right';
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -425,7 +368,112 @@ jQuery(document).delegate('#cleanresult', 'click', function(e) {
|
||||||
|
|
||||||
|
|
||||||
//end minimap management
|
//end minimap management
|
||||||
|
//Cantica management functions
|
||||||
|
|
||||||
|
function showCantica(cantica){
|
||||||
|
var listaCanti = new Set()
|
||||||
|
//var listaVersi = new Set()
|
||||||
|
var listaVersi = []
|
||||||
|
//var listaForme = new Set()
|
||||||
|
var listaForme =[]
|
||||||
|
containerForme=formeterza
|
||||||
|
if(cantica=='Inferno')
|
||||||
|
containerForme=formeprima
|
||||||
|
if(cantica=='Purgatorio')
|
||||||
|
containerForme=formeseconda
|
||||||
|
for (cmpItem of containerForme){
|
||||||
|
formaItem=cmpItem[0].split("_")
|
||||||
|
listaCanti.add('Canto '+formaItem[1])
|
||||||
|
var obj = new Object();
|
||||||
|
var forma=new Object()
|
||||||
|
obj.numverso = formaItem[3];
|
||||||
|
//obj.verso = binding.get('Verso').value;
|
||||||
|
obj.canto = 'Canto '+formaItem[1];
|
||||||
|
obj.cantica = cantica;
|
||||||
|
listaVersi.push(obj)
|
||||||
|
forma.numverso = formaItem[3];;
|
||||||
|
forma.canto = 'Canto '+formaItem[1];
|
||||||
|
forma.pos = formaItem[2];
|
||||||
|
forma.form = formaItem[0];
|
||||||
|
forma.cantica = cantica;
|
||||||
|
listaForme.push(forma)
|
||||||
|
}
|
||||||
|
renderData(cantica, listaCanti, listaVersi, listaForme);
|
||||||
|
return
|
||||||
|
}
|
||||||
|
function renderData(cantica, listaCanti, listaVersi, listaForme){
|
||||||
|
var orderedListaCanti = Array.from(listaCanti)
|
||||||
|
//orderedListaCanti = orderedListaCanti.sort((a, b) => {
|
||||||
|
// return parseInt(a.split(" ")[1], 10)-parseInt(b.split(" ")[1], 10)
|
||||||
|
//});
|
||||||
|
//var orderedListaVersi = Array.from(listaVersi)
|
||||||
|
//orderedListaVersi = orderedListaVersi.sort((a, b) => {
|
||||||
|
// return parseInt(a.numverso, 10)-parseInt(b.numverso, 10)
|
||||||
|
|
||||||
|
//});
|
||||||
|
|
||||||
|
listaVersi = listaVersi.filter((value, index, self) =>
|
||||||
|
index === self.findIndex((t) => (
|
||||||
|
t.numverso === value.numverso && t.canto === value.canto && t.cantica===value.cantica
|
||||||
|
))
|
||||||
|
)
|
||||||
|
//var orderedListaForme = Array.from(listaForme)
|
||||||
|
//orderedListaForme = orderedListaForme.sort((a, b) => {
|
||||||
|
// return parseInt(a.pos, 10)-parseInt(b.pos, 10)
|
||||||
|
|
||||||
|
//});
|
||||||
|
|
||||||
|
var divListaCanti = $('<DIV id="Canti' + cantica + '" />')
|
||||||
|
for (canto of orderedListaCanti) {
|
||||||
|
//var licanto = $('<li class="navig-canto"/>')
|
||||||
|
//licanto.attr('name', cantica + canto)
|
||||||
|
//licanto.attr('href', "#")
|
||||||
|
//licanto.attr("style", "line-height: 1.2em")
|
||||||
|
//numcanto=canto.split(" ")[1]
|
||||||
|
//licanto.append(numcanto)
|
||||||
|
|
||||||
|
|
||||||
|
//licanto.appendTo(divListaCanti)
|
||||||
|
|
||||||
|
var divcanto = $('<div />')
|
||||||
|
var titolocanto = $('<h4 class="titolo-canto pb-2" />')
|
||||||
|
titolocanto.append(cantica+", "+canto)
|
||||||
|
divcanto.attr('class', 'canto')
|
||||||
|
divcanto.attr('style', 'display:none')
|
||||||
|
divcanto.attr('id', (cantica + canto).replace(" ", "_"))
|
||||||
|
titolocanto.appendTo(divcanto)
|
||||||
|
divcanto.appendTo(' .blog-main')
|
||||||
|
}
|
||||||
|
//divListaCanti.appendTo('#listacanti')
|
||||||
|
divListaCanti.appendTo(ddmenus[cantica])
|
||||||
|
for (verso of listaVersi) {
|
||||||
|
|
||||||
|
|
||||||
|
var elementoverso = $('<p />')
|
||||||
|
//vartestoverso=verso.numverso;
|
||||||
|
elementoverso.append(verso.numverso + ". ")
|
||||||
|
elementoverso.attr("style", "line-height: 0.5em")
|
||||||
|
|
||||||
|
elementoverso.attr('class', 'f6 text-secondary text-nowrap font-weight-lighter')
|
||||||
|
//elementoverso.attr('class', 'f6 font-weight-lighter nowrap')
|
||||||
|
elementoverso.attr('id', verso.cantica+"_"+ verso.canto.replace(" ", "_")+"_"+verso.numverso)
|
||||||
|
elementoverso.appendTo('#' + cantica + verso.canto.replace(" ", "_"))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
listaForme.forEach((element) => {
|
||||||
|
var spanoccorrenza=$('<span />')
|
||||||
|
var pos=parseInt(element.pos)
|
||||||
|
spanoccorrenza.attr('id', element.cantica+"_"+ element.canto.replace(" ", "_")+"_"+element.numverso+"_"+pos)
|
||||||
|
if (listarisultati.length>0 && listarisultati.includes(spanoccorrenza.attr('id')))
|
||||||
|
spanoccorrenza.attr('class', "f6 mark ")
|
||||||
|
spanoccorrenza.append(managePunctuation(element.form))
|
||||||
|
elementoverso=$('#'+element.cantica+"_"+ element.canto.replace(" ", "_")+"_"+element.numverso)
|
||||||
|
spanoccorrenza.appendTo(elementoverso)
|
||||||
|
elementoverso.append(' ')
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
// Search functions
|
// Search functions
|
||||||
|
|
||||||
async function executeQueryVersi(query) {
|
async function executeQueryVersi(query) {
|
||||||
|
|
@ -594,7 +642,7 @@ jQuery(document).delegate('#cleanresult', 'click', function(e) {
|
||||||
//evidenzia risultati
|
//evidenzia risultati
|
||||||
for (ris of listarisultati){
|
for (ris of listarisultati){
|
||||||
idris='#'+ris
|
idris='#'+ris
|
||||||
$(idris).attr('class', "f6 b dark-blue ")
|
$(idris).attr('class', "f6 mark ")
|
||||||
|
|
||||||
}
|
}
|
||||||
//aggiunge badge con totale risultati accanto alle cantiche
|
//aggiunge badge con totale risultati accanto alle cantiche
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue