Forráskód Böngészése

Restyling grafica pagina luogo (wip)

Giulia Cacioli 2 éve
szülő
commit
272aecea71
5 módosított fájl, 1205 hozzáadás és 1197 törlés
  1. 295 272
      Luogo.html
  2. 15 54
      css/place_people.css
  3. 0 0
      css/styles.min.css
  4. 871 871
      js/map.js
  5. 24 0
      scss/_global.scss

+ 295 - 272
Luogo.html

@@ -1,273 +1,296 @@
-<!doctype html>
-<html>
-<head>
-<meta charset="utf-8">
-<title>MOCKY - Il mockup di RESTORE</title>
-<link href="Untitled1.css" rel="stylesheet">
-<link href="index.css" rel="stylesheet">
-<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
-<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet">
-<link href="vendor/simple-line-icons/css/simple-line-icons.css" rel="stylesheet" type="text/css">
-<link href="css/place_people.css" rel="stylesheet">
-<link href="css/datafilter.css" rel="stylesheet">
-<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
-<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"></script>
-<script src="https://d3js.org/d3.v4.js"></script>
-
-<link rel="shortcut icon" type="image/x-icon" href="docs/images/favicon.ico" />
-
-    <link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" crossorigin=""/>
-    <script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js" integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA==" crossorigin=""></script>
-
-</head>
-<body>
-
-	<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
-	  <div class="container-fluid">
-	    <img src="img/Logo.png" style="width:100px;">
-	    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
-	      <span class="navbar-toggler-icon"></span>
-	    </button>
-	    <div class="navbar-nav" style="margin-left:auto;">
-	        <a class="button-link" href="index.html"><button class="btn btn-menu" type="button">Home</button></a>
-	        <a class="button-link" href="http://restore.ovi.cnr.it/"><button class="btn btn-menu" type="button">Progetto</button></a>
-	        <a class="button-link" href="ricerca.html"><button class="btn btn-menu" type="button">Ricerca</button></a>
-	        <a class="button-link" href="#"><button class="btn btn-menu" type="button">Indici</button></a>
-	        <a class="button-link" href="#"><button class="btn btn-menu" type="button">Percorsi</button></a>
-	        <a class="button-link" href="standard.html"><button class="btn btn-menu" type="button">Standard</button></a>
-	        <div class="dropdown">
-	          <button class="btn btn-menu dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Sparql
-	          </button>
-	          <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
-	            <a class="dropdown-item" href="http://dev.restore.ovi.cnr.it:8890/sparql/">Endpoint Sparql</a>
-	            <a class="dropdown-item" href="sparql.html">Query</a>
-	          </div>
-	        </div>
-	        <a class="button-link" href="download.html"><button class="btn btn-menu" type="button">Download</button></a>
-	        <div class="dropdown">
-	          <button class="btn btn-menu dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Collegamenti esterni
-	          </button>
-	          <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
-	            <a class="dropdown-item" href="http://ckan.restore.ovi.cnr.it/">CKAN</a>
-	            <a class="dropdown-item" href="http://dev.restore.ovi.cnr.it/lodlive/">LOD</a>
-	          </div>
-	        </div>
-	      </div>
-	  </div>
-	</nav>
-
-	<div id="container_luogo">
-
-		<div class="row" id="col_graph">
-		    <div class="col-2">
-		      dataset: 
-		    </div>  
-		    <div class="col-10" id="grafo"></div>
-		</div>
-
-
-		<div class="row">
-		    <div class="col"> <h2 id="nome_luogo"></h2>
-		      
-		    </div>  
-		 </div>
-
-		 <div class="row btn-group" id="map_buttons">
-		 	<button type="button" id="btn_info" class="btn btn-outline-dark" onClick="open_info();">Info</button>
-		 	<button type="button" id="btn_toponimi" class="btn btn-outline-dark" onClick="open_toponimi();">Toponimi associati</button>
-		 	<button type="button" id="btn_riferimenti" class="btn btn-outline-dark"onClick="open_riferimenti();">Riferimenti</button>
-		 </div>
-
-		<div class="row" id="geo_info">
-
-			<div class=col-4 id="info_luogo">
-				<div class="box_info" id="place_info">
-					<p style="width:100%;" class="head_box"><b>Informazioni</b></p>
-					<div class="row">
-					 	<div class="ind" class="col-4">
-					      <b>Place id:</b>
-					    </div>
-					    <div class="col-8" id="aspo_id">
-					       
-					    </div>  
-					 </div>
-
-					 <div class="row">
-					 	<div class="ind" class="col-4">
-					      <b>Varianti nome:</b>
-					    </div>
-					    <div class="col-8" id="variants">
-					       
-					    </div>  
-					 </div>
-
-					 <div class="row">
-					 	<div class="ind" class="col-4">
-					      <b>Altre indicazioni geografiche (da definire):</b>
-					    </div>
-					    <div class="col-8" id="other">
-					       
-					    </div>  
-					 </div>
-
-					 <div class="row">
-					 	<div class="ind" class="col-4">
-					      <b>Note:</b> 
-					    </div>
-					    <div class="col-8" id="note">
-					      
-					    </div>  
-					 </div>
-				</div>
-
-				<div class="box_info" id="topo">
-					<div class="row">
-					      <p style="width:100%;" class="head_box"><b>Toponimi associati</b></p>
-					    <div class="row" id="toponimi">
-					       
-					    </div>  
-			 		</div>
-				</div>
-
-				<div class="box_info" id="rif">
-					<div class="row">
-						<div class="col">
-					      <p style="width:100%;" class="head_box"><b>Links</b></p>
-						</div>
-					</div>
-					<div class="row">
-						 <div class="col" id="riferimenti">
-						       
-						 </div> 
-					</div> 
-				</div>
-
-
-			</div>
-
-			<div class="col" id="place_map">
-				<div id="map"></div>
-			</div>
-		</div>
-	</div>
-
-	
-
-	<div id="container_references">
-		
-
-
-		<div class="row" id="references">
-			
-				<div class="box_results" id="sent">
-			    	<div class="inner_results left">
-				    	<div class="def_res">
-				    		<p><b>Oggetti realizzati a <span id="nome_lu"></span> (<span id="n_send"></span> risultati)</b></p>
-				    	</div>
-				    	<div class="results_rows" id="object_send">
-				    	</div>
-				    </div>
-			    </div>
-		    
-			    <div class="box_results" id="receive">
-			    	<div class="inner_results right">
-				    	<div class="def_res">
-				    		<p><b>Oggetti arrivati a <span id="nome_lp"></span> (<span id="n_receive"></span> risultati)</b></p>
-				    	</div>
-				    	<div class="results_rows" id="object_receive">
-				    	</div>
-			    	</div>
-			    </div>
-
-			    <div class="box_results" id="citations">
-			    	<div class="inner_results left">
-				    	<div class="def_res">
-				    		<p><b>Documenti con citazione di <span id="nome_ll"></span> (<span id="n_cit"></span> risultati)</b></p>
-				    	</div>
-				    	<div class="results_rows" id="object_cit">
-				    	</div>
-				    </div>
-			    </div>
-
-			    <div class="box_results" id="ref_people">
-			    	<div class="inner_results right">
-				    	<div class="def_res">
-				    		<p><b>Persone collegate a <span id="nome_lg"></span> (<span id="n_per"></span> risultati)</b></p>
-				    	</div>
-				    	<div class="results_rows" id="object_per">
-				    	</div>
-				    </div>
-			    </div>
-			</div>
-
-	</div>
-
-
-<div id="footer">
-    <footer class="footer bg-dark">
-    <div class="container">
-      <div class="row">
-        <div class="col-lg-6 h-100 text-center text-lg-left my-auto">
-          <ul class="list-inline mb-2">
-            <li class="list-inline-item">
-              <a href="#">About</a>
-            </li>
-            <li class="list-inline-item">&sdot;</li>
-            <li class="list-inline-item">
-              <a href="#">Contact</a>
-            </li>
-            <li class="list-inline-item">&sdot;</li>
-            <li class="list-inline-item">
-              <a href="#">Terms of Use</a>
-            </li>
-            <li class="list-inline-item">&sdot;</li>
-            <li class="list-inline-item">
-              <a href="#">Privacy Policy</a>
-            </li>
-          </ul>
-          <p class="text-muted small mb-4 mb-lg-0">&copy; RESTORE 2021. All Rights Reserved.</p>
-        </div>
-        <div class="col-lg-6 h-100 text-center text-lg-right my-auto">
-          <ul class="list-inline mb-0">
-            <li class="list-inline-item mr-3">
-              <a href="#">
-                <img class="img-logo" src="img/CNR.png" />
-              </a>
-            </li>
-            <li class="list-inline-item mr-3">
-              <a href="#">
-                <img class="img-logo" src="img/RegioneToscana.jpg" />
-              </a>
-            </li>
-            <li class="list-inline-item">
-              <a href="#">
-                <img class="img-logo" src="img/European-Union.png" />
-              </a>
-            </li>
-			<li class="list-inline-item">
-              <a href="#">
-                <img class="img-logo" src="img/RepubblicaItaliana.png" />
-              </a>
-            </li>
-			<li class="list-inline-item">
-              <a href="#">
-                <img class="img-logo" src="img/POR-FSE-Regione-Toscana.png" />
-              </a>
-            </li>
-			<li class="list-inline-item">
-              <a href="#">
-                <img class="img-logo" src="img/GiovaniSi.png" />
-              </a>
-            </li>
-          </ul>
-        </div>
-      </div>
-    </div>
-  </footer>
-</div>
-<script src="js\map.js"></script>
-<!-- Bootstrap core JavaScript -->
-  <script src="vendor/jquery/jquery.min.js"></script>
-  <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
-</body>
+<!doctype html>
+<html>
+
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
+	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+	<meta name="description" content="">
+	<meta name="author" content="">
+
+	<title>Restore - Luogo</title>
+
+	<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
+	<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet">
+	<link href="vendor/simple-line-icons/css/simple-line-icons.css" rel="stylesheet" type="text/css">
+	<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
+
+	<link href="css/place_people.css" rel="stylesheet">
+
+	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
+	<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"></script>
+	<script src="https://d3js.org/d3.v4.js"></script>
+
+	<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" crossorigin="" />
+	<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js" integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA==" crossorigin=""></script>
+
+	<link href="css/styles.min.css" rel="stylesheet">
+</head>
+
+<body>
+	<header class="sticky-top">
+		<nav class="navbar navbar-expand-lg navbar-light bg-white">
+			<div class="container-fluid">
+				<div class="navbar-brand">
+					<img src="img/Logo.png" width="100" alt="Restore" />
+				</div>
+				<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
+					<span class="navbar-toggler-icon"></span>
+				</button>
+				<div class="collapse navbar-collapse justify-content-end" id="navbarNavDropdown">
+					<ul class="navbar-nav">
+						<li class="nav-item">
+							<a class="nav-link" href="index.html">Home</a>
+						</li>
+						<li class="nav-item">
+							<a class="nav-link" href="http://restore.ovi.cnr.it/">Progetto</a>
+						</li>
+						<li class="nav-item active">
+							<a class="nav-link" href="ricerca.html">Ricerca</a>
+						</li>
+						<li class="nav-item">
+							<a class="nav-link" href="#">Indici</a>
+						</li>
+						<li class="nav-item">
+							<a class="nav-link" href="#">Percorsi</a>
+						</li>
+						<li class="nav-item">
+							<a class="nav-link" href="standard.html">Standard</a>
+						</li>
+						<li class="nav-item dropdown">
+							<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Sparql</a>
+							<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
+								<a class="dropdown-item" href="http://dev.restore.ovi.cnr.it:8890/sparql/">Endpoint Sparql</a>
+								<a class="dropdown-item" href="sparql.html">Query</a>
+							</div>
+						</li>
+						<li class="nav-item">
+							<a class="nav-link" href="download.html">Download</a>
+						</li>
+						<li class="nav-item dropdown">
+							<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink1" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Collegamenti esterni</a>
+							<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink1">
+								<a class="dropdown-item" href="http://ckan.restore.ovi.cnr.it/" target="_blank">CKAN</a>
+								<a class="dropdown-item" href="http://dev.restore.ovi.cnr.it/lodlive/" target="_blank">LOD</a>
+							</div>
+						</li>
+					</ul>
+				</div>
+			</div>
+		</nav>
+	</header>
+
+	<main>
+		<section id="container_luogo">
+			<div id="col_graph">
+				<div class="w-content">
+					<div class="container-fluid">
+						<div class="row">
+							<div class="col-auto">
+								<span>Dataset:</span>
+							</div>
+							<div class="col-10" id="grafo"></div>
+						</div>
+					</div>
+				</div>
+			</div>
+
+			<div class="w-content section-small">
+				<div class="container-fluid">
+					<div class="col box-info">
+						<div class="container-fluid">
+							<div class="row box-info-title">
+								<div class="col">
+									<h1 id="nome_luogo" class="box-info-main-title"></h1>
+								</div>
+							</div>
+
+							<div class="row box-info-container">
+								<div class="col-12 mb-3">
+									<ul class="nav nav-tabs">
+										<li class="nav-item">
+											<button type="button" id="btn_info" class="nav-link" onClick="open_info();">Info</button>
+										</li>
+										<li class="nav-item">
+											<button type="button" id="btn_toponimi" class="nav-link" onClick="open_toponimi();">Toponimi associati</button>
+										</li>
+										<li class="nav-item">
+											<button type="button" id="btn_riferimenti" class="nav-link" onClick="open_riferimenti();">Riferimenti</button>
+										</li>
+									</ul>
+								</div>
+
+								<div class="col-12" id="geo_info">
+									<div class="row no-gutters">
+										<div class="col-4" id="info_luogo">
+											<div class="box_info box_info-tabs" id="place_info">
+												<p class="head_box"><b>Informazioni</b></p>
+												<div class="mb-1">
+													<div class="ind">
+														<span class="label">Place id:</span>
+													</div>
+													<div id="aspo_id"></div>
+												</div>
+
+												<div class="mb-1">
+													<div class="ind">
+														<span class="label">Varianti nome:</span>
+													</div>
+													<div id="variants"></div>
+												</div>
+
+												<div class="mb-1">
+													<div class="ind">
+														<span class="label">Altre indicazioni geografiche (da definire):</span>
+													</div>
+													<div id="other"></div>
+												</div>
+
+												<div class="mb-1">
+													<div class="ind">
+														<span class="label">Note:</span>
+													</div>
+													<div id="note"></div>
+												</div>
+											</div>
+
+											<div class="box_info box_info-tabs" id="topo">
+												<p class="head_box"><b>Toponimi associati</b></p>
+												<div class="row" id="toponimi"></div>
+											</div>
+
+											<div class="box_info box_info-tabs" id="rif">
+												<p class="head_box"><b>Links</b></p>
+												<div id="riferimenti"></div>
+											</div>
+										</div>
+
+										<div class="col" id="place_map">
+											<div id="map"></div>
+										</div>
+									</div>
+								</div>
+							</div>
+
+							<hr />
+
+							<div id="container_references" class="row box-info-container">
+
+								<div class="col-12" id="references">
+									<div class="box_results" id="sent">
+										<div class="inner_results left">
+											<div class="def_res">
+												<p><b>Oggetti realizzati a <span id="nome_lu"></span> (<span id="n_send"></span> risultati)</b></p>
+											</div>
+											<div class="results_rows" id="object_send">
+											</div>
+										</div>
+									</div>
+
+									<div class="box_results" id="receive">
+										<div class="inner_results right">
+											<div class="def_res">
+												<p><b>Oggetti arrivati a <span id="nome_lp"></span> (<span id="n_receive"></span> risultati)</b></p>
+											</div>
+											<div class="results_rows" id="object_receive">
+											</div>
+										</div>
+									</div>
+
+									<div class="box_results" id="citations">
+										<div class="inner_results left">
+											<div class="def_res">
+												<p><b>Documenti con citazione di <span id="nome_ll"></span> (<span id="n_cit"></span> risultati)</b></p>
+											</div>
+											<div class="results_rows" id="object_cit">
+											</div>
+										</div>
+									</div>
+
+									<div class="box_results" id="ref_people">
+										<div class="inner_results right">
+											<div class="def_res">
+												<p><b>Persone collegate a <span id="nome_lg"></span> (<span id="n_per"></span> risultati)</b></p>
+											</div>
+											<div class="results_rows" id="object_per">
+											</div>
+										</div>
+									</div>
+								</div>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</section>
+	</main>
+
+	<footer id="footer" class="footer">
+		<div class="container">
+			<div class="row">
+				<div class="col-lg-7 h-100 text-center text-lg-left my-auto">
+					<ul class="list-inline mb-2">
+						<li class="list-inline-item">
+							<a href="#">About</a>
+						</li>
+						<li class="list-inline-item">&sdot;</li>
+						<li class="list-inline-item">
+							<a href="#">Contact</a>
+						</li>
+						<li class="list-inline-item">&sdot;</li>
+						<li class="list-inline-item">
+							<a href="#">Terms of Use</a>
+						</li>
+						<li class="list-inline-item">&sdot;</li>
+						<li class="list-inline-item">
+							<a href="#">Privacy Policy</a>
+						</li>
+					</ul>
+					<p class="small mb-4 mb-lg-0">&copy; RESTORE 2021. All Rights Reserved.</p>
+				</div>
+				<div class="col-lg-5 h-100 text-center my-auto">
+					<ul class="partner-list list-inline mb-0">
+						<li class="list-inline-item mr-3">
+							<a href="#">
+								<img class="img-logo" src="img/CNR.png" />
+							</a>
+						</li>
+						<li class="list-inline-item mr-3">
+							<a href="#">
+								<img class="img-logo" src="img/RegioneToscana.jpg" />
+							</a>
+						</li>
+						<li class="list-inline-item mr-3">
+							<a href="#">
+								<img class="img-logo" src="img/European-Union.png" />
+							</a>
+						</li>
+						<li class="list-inline-item mr-3">
+							<a href="#">
+								<img class="img-logo" src="img/RepubblicaItaliana.png" />
+							</a>
+						</li>
+						<li class="list-inline-item mr-3">
+							<a href="#">
+								<img class="img-logo" src="img/POR-FSE-Regione-Toscana.png" />
+							</a>
+						</li>
+						<li class="list-inline-item">
+							<a href="#">
+								<img class="img-logo" src="img/GiovaniSi.png" />
+							</a>
+						</li>
+					</ul>
+				</div>
+			</div>
+		</div>
+	</footer>
+
+	<script src="js\map.js"></script>
+
+	<!-- Bootstrap core JavaScript -->
+	<script src="vendor/jquery/jquery.min.js"></script>
+	<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
+</body>
+
 </html>

+ 15 - 54
css/place_people.css

@@ -166,18 +166,8 @@ header.masthead {
   width:auto;
 }
 
-#container_luogo .col{
-  padding-left:0px;
-  padding-right: 0px;
-}
-
-/* #container_persona .col{
-  padding-left:0px;
-  padding-right: 0px;
-} */
-
-#map { 
-  height: 100%; 
+#map {
+  height: 100%;
   width:100%;
 }
 
@@ -189,25 +179,11 @@ header.masthead {
   height: 60vh;
 }
 
-#container_luogo {
-  width: 80%;
-  margin-left:auto;
-  margin-right: auto;
-}
-
-#container_persona {
-  /* width: 80%;
-  margin-left: auto;
-  margin-right: auto; */
-  //background-color: #fff;
-}
-
 #info_luogo {
   background-color: #ffffff87;
-  padding: 1%;
-  height: 500px; 
+  height: 500px;
   width:100%;
-  overflow: scroll;
+  overflow: auto;
   display: none;
 }
 
@@ -215,43 +191,25 @@ header.masthead {
   background-color: #fff;
 }
 
-#nome_luogo{
-  font-size: 32px;
-  font-weight: 300;
-  color: #b61924;
-}
-
 #placeholder_luoghi {
   margin-top: 25px;
 }
 
-#container_references {
+/* #container_references {
   margin-left:15px;
   margin-right:15px;
   width: 80%;
   margin-left: auto;
   margin-right:auto;
-}
+} */
 
 #place_info {
   display: none;
 }
 
-#map_buttons button:hover {
-  color: #fff;
-}
-
 a {
   word-wrap: break-word;
-}
-
-#ref_buttons {
-  display: flex;
-}
-
-#ref_buttons .btn {
-  flex: 1
-}
+} 
 
 .box_results {
   margin-bottom: 35px;
@@ -404,11 +362,12 @@ text.source {
 }
 
 #ref_buttons {
-  margin-top:50px;
+  margin-top: 11px;
+  margin-bottom: 28px;
 }
 
 #ref_buttons .btn {
-  font-size:24px;
+  font-size: 19px;
 }
 
 #ref_buttons .active {
@@ -417,8 +376,10 @@ text.source {
   box-shadow: none;
 }
 
-#riferimenti .row {
-  border-bottom: 1px solid #b0b0b0;
+#riferimenti a {
+  display: block;
+  border-bottom: 1px solid #dee2e6;
+  padding: 5px 0;
 }
 
 #riferimenti a:link {
@@ -436,7 +397,7 @@ text.source {
 }
 
 #riferimenti a:hover {
-  color: #007bff;
+  color: #C41C22;
   background-color: transparent;
   text-decoration: underline;
 }

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
css/styles.min.css


+ 871 - 871
js/map.js

@@ -1,871 +1,871 @@
-// Raccatto i parametri dall'URL -- mi aspetto un parametro di nome 'link'!
-thisUrlParams = {};
-window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
-    thisUrlParams[key] = value;
-});
-console.log('URL get params: ', thisUrlParams);
-
-// Funzioni per eseguire le queries
-function prepareQueryURL(query){
-    sparqlEndpoint = 'http://dev.restore.ovi.cnr.it:8890/sparql/';
-    sparqlUrlParams = '?default-graph-uri=&query=' + encodeURIComponent(query) + '&output=json&callback=?';
-    return sparqlEndpoint + sparqlUrlParams;
-}
-
-function doJsonQuery(query){
-
-    queryURL = prepareQueryURL(query);
-
-    response = $.ajax({//OGGETTO
-
-        url: queryURL,
-        dataType: "json",
-        success: function (data){},
-        error: function (e) {}
-    });
-
-    return response;
-
-}
-
-// Funzioni per raccattare + stringhificare l'output
-queryStringOutput = "";
-function stringifyResponse(val){
-    resultArray = val['results']['bindings'];
-    out = "";
-    for(i = 0; i < resultArray.length; i++){
-        out = out + JSON.stringify(resultArray[i])
-    }
-    queryStringOutput = (queryStringOutput + out).replace("}{",",");
-}
-
-prefixes = "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \
-PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \
-PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> \
-PREFIX owl: <http://www.w3.org/2002/07/owl#>"
-
-query = prefixes + " SELECT DISTINCT ?graph ?name_place ?coordinates {\
-GRAPH ?graph {<" + thisUrlParams.link + "> crm:P168_place_is_defined_by ?coordinates;\
-rdfs:label ?name_place .\
-}\
-}"
-
-queryRiferimenti = prefixes + " SELECT DISTINCT ?references {\
-<" + thisUrlParams.link + "> owl:sameAs ?references\
-}"
-
-queryToponimi = prefixes + " SELECT DISTINCT ?toponimi {\
-<" + thisUrlParams.link + "> crm:P1_is_identified_by ?uri_toponym .\
-?uri_toponym rdfs:label ?toponimi\
-}"
-
-queryRicezione = prefixes + " SELECT DISTINCT ?object ?label {\
-<" + thisUrlParams.link + "> owl:sameAs ?place .\
-?event_to crm:P26_moved_to ?place ;\
-rdf:type crm:EL3_Receive_Letter ;\
-rdfs:subClassOf ?event .\
-?object crm:P25i_moved_by ?event ; \
-rdfs:label ?label .\
-} "
-
-queryInvio = prefixes + " SELECT DISTINCT ?object ?label {\
-<" + thisUrlParams.link + "> owl:sameAs ?place .\
-?event_to crm:P27_moved_from ?place ;\
-rdf:type crm:EL2_Send_Letter ;\
-rdfs:subClassOf ?event .\
-?object crm:P25i_moved_by ?event ; \
-rdfs:label ?label .\
-}"
-
-queryCitazione = prefixes + " SELECT DISTINCT ?object ?label\
-{<" + thisUrlParams.link + "> crm:P1_is_identified_by ?toponym .\
-?object crm:P67_refers_to ?toponym ;\
-rdfs:label ?label\
-}"
-
-queryPersone = prefixes + " SELECT DISTINCT ?range ?label \
-WHERE{ \
-  {?place owl:sameAs <" + thisUrlParams.link + "> .\
-  ?event_to crm:P26_moved_to ?place ;\
-  rdf:type crm:EL3_Receive_Letter ;\
-  crm:P01_has_domain ?domain .\
-  ?domain crm:P02_has_range ?range .\
-  ?range rdfs:label ?label .\
-} UNION {\
-  ?place owl:sameAs <" + thisUrlParams.link + "> .\
-  ?event_to crm:P27_moved_from ?place ;\
-  rdf:type crm:EL2_Send_Letter ;\
-  crm:P01_has_domain ?domain .\
-  ?domain crm:P02_has_range ?range .\
-  ?range rdfs:label ?label .\
-  }\
-}"
-
-queryCount = prefixes + " SELECT ?place ?label COUNT(?label) AS ?Count \
-WHERE{ \
-?place_to owl:sameAs <" + thisUrlParams.link + "> . \
-?event_to crm:P26_moved_to ?place_to ; \
-rdf:type crm:EL3_Receive_Letter ; \
-rdfs:subClassOf ?event . \
-?event_from rdfs:subClassOf ?event ; \
-rdf:type crm:EL2_Send_Letter ; \
-crm:P27_moved_from ?place . \
-?place rdfs:label ?label \
-} \
-ORDER BY DESC (?Count)"
-
-queryCount2 = prefixes + " SELECT ?place ?label COUNT(?label) AS ?Count \
-WHERE{ \
-?place_from owl:sameAs <" + thisUrlParams.link + "> . \
-?event_from crm:P27_moved_from ?place_from ; \
-rdf:type crm:EL2_Send_Letter ; \
-rdfs:subClassOf ?event . \
-?event_to rdfs:subClassOf ?event ; \
-rdf:type crm:EL2_Send_Letter ; \
-crm:P27_moved_from ?place . \
-?place rdfs:label ?label . \
-} \
-ORDER BY DESC (?Count) "
-
-queryCountLuogo = prefixes + " SELECT DISTINCT COUNT(?luogo) AS ?occorrenze \
-WHERE { \
-?document crm:P67_refers_to ?luogo . \
-<" + thisUrlParams.link + "> crm:P1_is_identified_by ?luogo . \
-} "
-
-queryCountDataset = prefixes + " SELECT DISTINCT COUNT(?uri) AS ?documenti \
-WHERE {\
-?uri crm:P2_has_type 'Testo Lemmatizzato' } "
-
-querySupportCount = prefixes + " SELECT ?uri_antroponym ?antroponimo COUNT(DISTINCT ?document) AS ?occorrenze COUNT(DISTINCT ?letter) AS ?count \
-WHERE { \
-?document crm:P67_refers_to ?uri . \
-<" + thisUrlParams.link + "> crm:P1_is_identified_by ?uri . \
-?document crm:P67_refers_to ?uri_antroponym . \
-?uri_antroponym crm:P2_has_type 'Antroponimo'; \
-rdfs:label ?antroponimo . \
-?letter crm:P67_refers_to ?uri_antroponym . \
-} \
-GROUP BY ?uri_antroponym ?antroponimo \
-ORDER BY DESC (?occorrenze) "
-
-querySupportLemma = prefixes + " SELECT ?uri_lemma ?lemma COUNT(DISTINCT ?document) AS ?occorrenze COUNT(DISTINCT ?letter) AS ?count \
-WHERE { \
-?document crm:P67_refers_to ?uri . \
-<" + thisUrlParams.link + "> crm:P1_is_identified_by ?uri . \
-?document crm:P67_refers_to ?uri_object . \
-?uri_object crm:P128_carries ?uri_lemma . \
-?uri_lemma rdf:type ?uri_type; \
-rdfs:label ?lemma . \
-?uri_type rdfs:label 'Lemma' . \
-?letter crm:P67_refers_to ?uri_object . \
-} \
-GROUP BY ?uri_lemma ?lemma \
-ORDER BY DESC (?occorrenze) "
-
-/*
-queryCountAntroponym = SELECT DISTINCT ?antroponimi COUNT(?uri) AS ?occorrenze
-WHERE {
-?document crm:P67_refers_to ?uri .
-?uri crm:P2_has_type "Antroponimo" ;
-rdfs:label ?antroponimi .
-}
-GROUP BY ?antroponimi ?uri
-ORDER BY DESC (?occorrenze)
-
-
-queryCountLuogo = SELECT DISTINCT COUNT(?luogo) AS ?occorrenze
-WHERE {
-?document crm:P67_refers_to ?luogo .
-<http://dev.restore.ovi.cnr.it/vocabularies/places/161> crm:P1_is_identified_by ?luogo .
-}
-
-
-queryCountDataset = SELECT DISTINCT COUNT(?uri) AS ?documenti
-WHERE {
-?uri crm:P2_has_type "Testo Lemmatizzato" }
-
-
-querySupportCount = SELECT DISTINCT ?uri_antroponym ?antroponimo COUNT(?antroponimo) AS ?occorrenze
-WHERE {
-?document crm:P67_refers_to ?uri .
-<http://dev.restore.ovi.cnr.it/vocabularies/places/257> crm:P1_is_identified_by ?uri .
-?document crm:P67_refers_to ?uri_antroponym .
-?uri_antroponym crm:P2_has_type "Antroponimo";
-rdfs:label ?antroponimo .
-}
-GROUP BY ?uri_antroponym ?antroponimo
-ORDER BY DESC (?occorrenze)
-*/
-
-queryURL = prepareQueryURL(query);
-
-queryRef = prepareQueryURL(queryRiferimenti);
-
-queryTopo = prepareQueryURL(queryToponimi);
-
-queryRec = prepareQueryURL(queryRicezione);
-
-querySend = prepareQueryURL(queryInvio);
-
-queryCit = prepareQueryURL(queryCitazione);
-
-queryPer = prepareQueryURL(queryPersone);
-
-queryCon1 = prepareQueryURL(queryCount);
-
-queryCon2 = prepareQueryURL(queryCount2);
-
-queryDataset = prepareQueryURL(queryCountDataset);
-
-querySup = prepareQueryURL(querySupportCount);
-
-queryLem = prepareQueryURL(querySupportLemma);
-
-queryOcc = prepareQueryURL(queryCountLuogo);
-
-
-response = $.ajax({//OGGETTO
-
-    url: queryURL,
-    dataType: "json",
-    success: function (data){
-    	handle_data(data);
-    },
-    error: function (e) {}
-});
-
-
-response_ref = $.ajax({//OGGETTO
-
-    url: queryRef,
-    dataType: "json",
-    success: function (data){
-      handle_ref(data);
-    },
-    error: function (e) {}
-});
-
-response_top = $.ajax({//OGGETTO
-
-    url: queryTopo,
-    dataType: "json",
-    success: function (data){
-      handle_toponym(data);
-    },
-    error: function (e) {}
-});
-
-response_receive = $.ajax({//OGGETTO
-
-    url: queryRec,
-    dataType: "json",
-    success: function (data){
-      handle_receive(data);
-    },
-    error: function (e) {}
-});
-
-response_send = $.ajax({//OGGETTO
-
-    url: querySend,
-    dataType: "json",
-    success: function (data){
-      handle_send(data);
-    },
-    error: function (e) {}
-});
-
-response_cit = $.ajax({//OGGETTO
-
-    url: queryCit,
-    dataType: "json",
-    success: function (data){
-      handle_cit(data);
-    },
-    error: function (e) {}
-});
-
-response_per = $.ajax({//OGGETTO
-
-    url: queryPer,
-    dataType: "json",
-    success: function (data){
-      handle_persons(data);
-    },
-    error: function (e) {}
-});
-
-responseCountA = $.ajax({//OGGETTO
-
-    url: queryCon1,
-    dataType: "json",
-    success: function (data){
-      handle_count(data);
-    },
-    error: function (e) {}
-});
-
-responseCountP = $.ajax({//OGGETTO
-
-    url: queryCon2,
-    dataType: "json",
-    success: function (data){
-      handle_count2(data);
-    },
-    error: function (e) {}
-});
-
-responseDataset = $.ajax({//OGGETTO
-
-    url: queryDataset,
-    dataType: "json",
-    success: function (data){
-      get_dataset(data);
-    },
-    error: function (e) {}
-});
-
-
-responseOcc = $.ajax({//OGGETTO
-
-    url: queryOcc,
-    dataType: "json",
-    success: function (data){
-      get_occurrence(data);
-    },
-    error: function (e) {}
-});
-
-
-responseSupp = $.ajax({//OGGETTO
-
-    url: querySup,
-    dataType: "json",
-    success: function (data){
-      get_support(data);
-    },
-    error: function (e) {}
-});
-
-
-responseLemm = $.ajax({//OGGETTO
-
-    url: queryLem,
-    dataType: "json",
-    success: function (data){
-      get_support(data);
-    },
-    error: function (e) {}
-});
-
-
-function handle_data(json) {
-	console.log(json);
-
-	const locations = [];
-
-	$.each(
-			json['results']['bindings'],
-			function (index, value) {
-				const loc = []
-				var graph = value['graph']['value'];
-				var label = value['name_place']['value'];
-				var coord = value['coordinates']['value'];
-				const coordinates = coord.split(", ");
-				loc.push(label);
-				loc.push(coordinates[0]);
-				loc.push(coordinates[1]);
-				locations.push(loc);
-
-        document.getElementById("grafo").innerHTML = graph;
-        document.getElementById("nome_luogo").innerHTML = label;
-        document.getElementById("nome_lu").innerHTML = label;
-        document.getElementById("nome_lp").innerHTML = label;
-        document.getElementById("nome_ll").innerHTML = label;
-        document.getElementById("nome_lg").innerHTML = label;
-				
-			});
-
-	var map = L.map('map').setView([locations[0][1], locations[0][2]], 7);
-	mapLink = '<a href="https://openstreetmap.org">OpenStreetMap</a>';
-
-	L.tileLayer(
-	  'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
-	    attribution: '&copy; ' + mapLink + ' Contributors',
-	    maxZoom: 18,
-	  }).addTo(map);
-
-	for (var i = 0; i < locations.length; i++) {
-	  marker = new L.marker([locations[i][1], locations[i][2]])
-	    .bindPopup(locations[i][0])
-	    .addTo(map);
-	}
-}
-
-
-function handle_ref(json) {
-
-  console.log(json);
-
-  const references = [];
-
-  var list_ref = "";
-
-  $.each(
-      json['results']['bindings'],
-      function (index, value) {
-        var ref = value['references']['value'];
-        references.push(ref);        
-      });
-
-  
-  for (i=0; i<references.length; i++) {
-      list_ref += "<div class='row'><div class='col'><a href='" + references[i] + "'>" + references[i] + "</a></div></div>";
-  }
-  
-  document.getElementById("riferimenti").innerHTML = list_ref;
-  
-}
-
-function handle_toponym(json) {
-
-  console.log(json);
-
-  const toponym = [];
-
-  $.each(
-      json['results']['bindings'],
-      function (index, value) {
-        var topo = value['toponimi']['value'];
-        toponym.push(" " + topo);        
-      });
-  
-  document.getElementById("toponimi").innerHTML = toponym;
-
-}
-
-function handle_receive(json) {
-
-  console.log(json);
-
-  const received = {};
-
-  var i=0;
-
-  $.each(
-      json['results']['bindings'],
-      function (index, value) {
-        key = value['object']['value'];
-        data = value['label']['value'];   
-        received[key] = data;  
-        i++;   
-      });
-
-  var myArray = "";
-
-  for (var key in received) {
-    myArray += "<div class='row'><div class='col-10'>" + received[key] + "</div><div class='col'><a href='" + key + "'><i class='fas fa-external-link-alt' aria-hidden='true'></i></a></div></div>";
-  }
-
-  document.getElementById("n_receive").innerHTML = i;
-  document.getElementById("object_receive").innerHTML = myArray;
-
-  if (i==0) {
-    var messaggio = "<p>Nessun risultato trovato</p>";
-    document.getElementById("object_receive").innerHTML = messaggio;
-  }
-
-}
-
-
-function handle_send(json) {
-
-  console.log(json);
-
-  const sent = {};
-
-  var i=0;
-
-  $.each(
-      json['results']['bindings'],
-      function (index, value) {
-        key = value['object']['value'];
-        data = value['label']['value'];   
-        sent[key] = data;   
-        i++;  
-      });
-
-  var myArray = "";
-
-  for (var key in sent) {
-    myArray += "<div class='row'><div class='col-10'>" + sent[key] + "</div><div class='col'><a href='" + key + "'><i class='fas fa-external-link-alt' aria-hidden='true'></i></a></div></div>";
-  }
-
-  document.getElementById("n_send").innerHTML = i;
-  document.getElementById("object_send").innerHTML = myArray;
-
-  if (i==0) {
-    var messaggio = "<p>Nessun risultato trovato</p>";
-    document.getElementById("object_send").innerHTML = messaggio;
-  }
-
-}
-
-function handle_cit(json) {
-
-  console.log(json);
-
-  const citations = {};
-
-  var i=0;
-
-  $.each(
-      json['results']['bindings'],
-      function (index, value) {
-        key = value['object']['value'];
-        data = value['label']['value'];   
-        citations[key] = data;  
-        i++;   
-      });
-
-  var myArray = "";
-
-  for (var key in citations) {
-    myArray += "<div class='row'><div class='col-10'>" + citations[key] + "</div><div class='col'><a href='" + key + "'><i class='fas fa-external-link-alt' aria-hidden='true'></i></a></div></div>";
-  }
-
-  document.getElementById("n_cit").innerHTML = i;
-  document.getElementById("object_cit").innerHTML = myArray;
-
-  if (i==0) {
-    var messaggio = "<p>Nessun risultato trovato</p>";
-    document.getElementById("object_cit").innerHTML = messaggio;
-  }
-
-}
-
-function handle_persons(json) {
-
-  console.log(json);
-
-  const people = {};
-
-  var i=0;
-
-  $.each(
-      json['results']['bindings'],
-      function (index, value) {
-        key = value['range']['value'];
-        data = value['label']['value'];   
-        people[key] = data;  
-        i++;   
-      });
-
-  var myArray = "";
-
-  for (var key in people) {
-    myArray += "<div class='row'><div class='col-9'>" + people[key] + "</div><div class='persona col' id='" + 
-    key + "'><i class='fa fa-user'></i></div><div class='col'><a href='" + 
-    key + "'><i class='fas fa-external-link-alt' aria-hidden='true'></i></a></div></div>";
-  }
-
-
-  document.getElementById("n_per").innerHTML = i;
-  document.getElementById("object_per").innerHTML = myArray;
-
-  if (i==0) {
-    var messaggio = "<p>Nessun risultato trovato</p>";
-    document.getElementById("object_per").innerHTML = messaggio;
-  }
-
-}
-
-function handle_count(json) {
-  console.log(json);
-
-  const toponimi = [];
-
-  const dataToponimi = [];
-
-  var max = 0;
-
-  $.each(
-      json['results']['bindings'],
-      function (index, value) {
-        const topo = [];
-
-        var toponimo = value['label']['value'];
-        var count = value['Count']['value'];
-        var temp = parseInt(count);
-        toponimi.push(toponimo);
-        dataToponimi.push([toponimo, count]);
-
-        if (temp>max) {
-          max = temp;
-        }
-        
-      });
-
-  // set the dimensions and margins of the graph
-      var margin = {top: 20, right: 30, bottom: 40, left: 90},
-          width = 460 - margin.left - margin.right,
-          height = 400 - margin.top - margin.bottom;
-
-      // append the svg object to the body of the page
-      var svg = d3.select("#my_dataviz")
-        .append("svg")
-          .attr("width", width + margin.left + margin.right)
-          .attr("height", height + margin.top + margin.bottom)
-        .append("g")
-          .attr("transform",
-                "translate(" + margin.left + "," + margin.top + ")");
-
-      // Parse the Data
-      //d3.csv("https://raw.githubusercontent.com/holtzy/data_to_viz/master/Example_dataset/7_OneCatOneNum_header.csv", function(data) {
-        // Add X axis
-        var x = d3.scaleLinear()
-          .domain([0, max])
-          .range([ 0, width]);
-        svg.append("g")
-          .attr("transform", "translate(0," + height + ")")
-          .call(d3.axisBottom(x))
-          .selectAll("text")
-            .attr("transform", "translate(-10,0)rotate(-45)")
-            .style("text-anchor", "end");
-
-        // Y axis
-        var y = d3.scaleBand()
-          .range([ 0, height ])
-          .domain(toponimi)
-          .padding(.1);
-        svg.append("g")
-          .call(d3.axisLeft(y))
-
-        //Bars
-        svg.selectAll("myRect")
-          .data(dataToponimi)
-          .enter()
-          .append("rect")
-          .attr("x", x(0) )
-          .attr("y", function(d) { return y(d[0]); })
-          .attr("width", function(d) { return x(d[1]); })
-          .attr("height", y.bandwidth() )
-          .attr("fill", "#69b3a2")
-
-
-  /*var texts = svg.selectAll("myRect")
-    .data(dataToponimi)
-    .enter()
-    .append("text");
-
-  texts.attr("x", function(d){ return d[1] / 4 - 20})
-      .attr("y", function(d,i){ return 22.26*i +20})
-      .attr("text-anchor", "middle")
-      .attr("fill", "#fff")
-      .text(function(d){ return d[1]});*/
-
-}
-
-
-function handle_count2(json) {
-  console.log(json);
-
-  const toponimi = [];
-
-  const dataToponimi = [];
-
-  const values = [];
-
-  var max = 0;
-
-  $.each(
-      json['results']['bindings'],
-      function (index, value) {
-        const topo = [];
-
-        var toponimo = value['label']['value'];
-        var count = value['Count']['value'];
-        var temp = parseInt(count);
-        toponimi.push(toponimo);
-        dataToponimi.push([toponimo, count]);
-
-        if (temp>max) {
-          max = temp;
-        }
-        
-      });
-
-  // set the dimensions and margins of the graph
-      var margin = {top: 20, right: 30, bottom: 40, left: 90},
-          width = 460 - margin.left - margin.right,
-          height = 400 - margin.top - margin.bottom;
-
-      // append the svg object to the body of the page
-      var svg = d3.select("#my_dataviz2")
-        .append("svg")
-          .attr("width", width + margin.left + margin.right)
-          .attr("height", height + margin.top + margin.bottom)
-        .append("g")
-          .attr("transform",
-                "translate(" + margin.left + "," + margin.top + ")");
-
-      // Parse the Data
-      //d3.csv("https://raw.githubusercontent.com/holtzy/data_to_viz/master/Example_dataset/7_OneCatOneNum_header.csv", function(data) {
-        // Add X axis
-        var x = d3.scaleLinear()
-          .domain([0, max])
-          .range([ 0, width]);
-        
-        svg.append("g")
-          .attr("transform", "translate(0," + height + ")")
-          .call(d3.axisBottom(x))
-          .selectAll("text")
-            .attr("transform", "translate(-10,0)rotate(-45)")
-            .style("text-anchor", "end");
-
-        // Y axis
-        var y = d3.scaleBand()
-          .range([ 0, height ])
-          .domain(toponimi)
-          .padding(.1);
-
-        svg.append("g")
-          .call(d3.axisLeft(y))
-
-        //Bars
-        svg.selectAll("myRect")
-          .data(dataToponimi)
-          .enter()
-          .append("rect")
-          .attr("x", x(0) )
-          .attr("y", function(d) { return y(d[0]); })
-          .attr("width", function(d) { return x(d[1]); })
-          .attr("height", y.bandwidth() )
-          .attr("fill", "#69b3a2")
-
-        svg.selectAll("text2")
-          .data(dataToponimi)
-          .enter().append("text2")
-          .text(function(d) {return d[1]})
-          .attr("class", "text")
-}
-
-
-function get_dataset(json) {
-
-  console.log(json);
-
-  data = json.results.bindings[0].documenti.value;
-
-  console.log(data);
-      
-}
-
-
-function get_occurrence(json) {
-
-}
-
-
-function get_support(json) {
-
-}
-
-function open_info() {
-
-    document.getElementById("info_luogo").style.display = "block";
-    document.getElementById("place_info").style.display = "block";
-    document.getElementById("topo").style.display = "none";
-    document.getElementById("rif").style.display = "none";
-}
-
-function open_toponimi() {
-
-    document.getElementById("info_luogo").style.display = "block";
-    document.getElementById("place_info").style.display = "none";
-    document.getElementById("topo").style.display = "block";
-    document.getElementById("rif").style.display = "none";
-}
-
-function open_riferimenti() {
-
-    document.getElementById("info_luogo").style.display = "block";
-    document.getElementById("place_info").style.display = "none";
-    document.getElementById("topo").style.display = "none";
-    document.getElementById("rif").style.display = "block";
-}
-
-function open_collegamenti() {
-
-    document.getElementById("references").style.display = "flex";
-    document.getElementById("statistiche").style.display = "none";
-    document.getElementById("regole_associazione").style.display = "none";
-}
-
-function open_statistiche() {
-
-    document.getElementById("references").style.display = "none";
-    document.getElementById("statistiche").style.display = "flex";
-    document.getElementById("regole_associazione").style.display = "none";
-}
-
-function open_correlazioni() {
-
-    document.getElementById("references").style.display = "none";
-    document.getElementById("statistiche").style.display = "none";
-    document.getElementById("regole_associazione").style.display = "flex";
-}
-
-var header = document.getElementById("ref_buttons");
-var btns = header.getElementsByClassName("btn");
-for (var i = 0; i < btns.length; i++) {
-  btns[i].addEventListener("click", function() {
-  var current = document.getElementsByClassName("active");
-  current[0].className = current[0].className.replace(" active", "");
-  this.className += " active";
-  });
-}
-
-//out = "";
-//for(i = 0; i < resultArray.length; i++){
- //   out = out + JSON.stringify(resultArray[i])
-//}
-//queryStringOutput = (queryStringOutput + out).replace("}{",",");
-
-
-/*
-
-var locations = [
-  ["LOCATION_1", 11.8166, 122.0942],
-  ["LOCATION_2", 11.9804, 121.9189],
-  ["LOCATION_3", 10.7202, 122.5621],
-  ["LOCATION_4", 11.3889, 122.6277],
-  ["LOCATION_5", 10.5929, 122.6325]
-];
-
-var map = L.map('map').setView([11.206051, 122.447886], 8);
-mapLink =
-  '<a href="http://openstreetmap.org">OpenStreetMap</a>';
-L.tileLayer(
-  'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
-    attribution: '&copy; ' + mapLink + ' Contributors',
-    maxZoom: 18,
-  }).addTo(map);
-
-for (var i = 0; i < locations.length; i++) {
-  marker = new L.marker([locations[i][1], locations[i][2]])
-    .bindPopup(locations[i][0])
-    .addTo(map);
-}
-*/
-
-$(document).on("click", ".persona", function (ev) {
-
-    var link = this.id;
-    //alert(nome_autore);
-    //$('#myModal').text("");
-    window.open("Persona.html?link="+this.id);
-    
-
-  });
+// Raccatto i parametri dall'URL -- mi aspetto un parametro di nome 'link'!
+thisUrlParams = {};
+window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
+    thisUrlParams[key] = value;
+});
+console.log('URL get params: ', thisUrlParams);
+
+// Funzioni per eseguire le queries
+function prepareQueryURL(query){
+    sparqlEndpoint = 'http://dev.restore.ovi.cnr.it:8890/sparql/';
+    sparqlUrlParams = '?default-graph-uri=&query=' + encodeURIComponent(query) + '&output=json&callback=?';
+    return sparqlEndpoint + sparqlUrlParams;
+}
+
+function doJsonQuery(query){
+
+    queryURL = prepareQueryURL(query);
+
+    response = $.ajax({//OGGETTO
+
+        url: queryURL,
+        dataType: "json",
+        success: function (data){},
+        error: function (e) {}
+    });
+
+    return response;
+
+}
+
+// Funzioni per raccattare + stringhificare l'output
+queryStringOutput = "";
+function stringifyResponse(val){
+    resultArray = val['results']['bindings'];
+    out = "";
+    for(i = 0; i < resultArray.length; i++){
+        out = out + JSON.stringify(resultArray[i])
+    }
+    queryStringOutput = (queryStringOutput + out).replace("}{",",");
+}
+
+prefixes = "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \
+PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \
+PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> \
+PREFIX owl: <http://www.w3.org/2002/07/owl#>"
+
+query = prefixes + " SELECT DISTINCT ?graph ?name_place ?coordinates {\
+GRAPH ?graph {<" + thisUrlParams.link + "> crm:P168_place_is_defined_by ?coordinates;\
+rdfs:label ?name_place .\
+}\
+}"
+
+queryRiferimenti = prefixes + " SELECT DISTINCT ?references {\
+<" + thisUrlParams.link + "> owl:sameAs ?references\
+}"
+
+queryToponimi = prefixes + " SELECT DISTINCT ?toponimi {\
+<" + thisUrlParams.link + "> crm:P1_is_identified_by ?uri_toponym .\
+?uri_toponym rdfs:label ?toponimi\
+}"
+
+queryRicezione = prefixes + " SELECT DISTINCT ?object ?label {\
+<" + thisUrlParams.link + "> owl:sameAs ?place .\
+?event_to crm:P26_moved_to ?place ;\
+rdf:type crm:EL3_Receive_Letter ;\
+rdfs:subClassOf ?event .\
+?object crm:P25i_moved_by ?event ; \
+rdfs:label ?label .\
+} "
+
+queryInvio = prefixes + " SELECT DISTINCT ?object ?label {\
+<" + thisUrlParams.link + "> owl:sameAs ?place .\
+?event_to crm:P27_moved_from ?place ;\
+rdf:type crm:EL2_Send_Letter ;\
+rdfs:subClassOf ?event .\
+?object crm:P25i_moved_by ?event ; \
+rdfs:label ?label .\
+}"
+
+queryCitazione = prefixes + " SELECT DISTINCT ?object ?label\
+{<" + thisUrlParams.link + "> crm:P1_is_identified_by ?toponym .\
+?object crm:P67_refers_to ?toponym ;\
+rdfs:label ?label\
+}"
+
+queryPersone = prefixes + " SELECT DISTINCT ?range ?label \
+WHERE{ \
+  {?place owl:sameAs <" + thisUrlParams.link + "> .\
+  ?event_to crm:P26_moved_to ?place ;\
+  rdf:type crm:EL3_Receive_Letter ;\
+  crm:P01_has_domain ?domain .\
+  ?domain crm:P02_has_range ?range .\
+  ?range rdfs:label ?label .\
+} UNION {\
+  ?place owl:sameAs <" + thisUrlParams.link + "> .\
+  ?event_to crm:P27_moved_from ?place ;\
+  rdf:type crm:EL2_Send_Letter ;\
+  crm:P01_has_domain ?domain .\
+  ?domain crm:P02_has_range ?range .\
+  ?range rdfs:label ?label .\
+  }\
+}"
+
+queryCount = prefixes + " SELECT ?place ?label COUNT(?label) AS ?Count \
+WHERE{ \
+?place_to owl:sameAs <" + thisUrlParams.link + "> . \
+?event_to crm:P26_moved_to ?place_to ; \
+rdf:type crm:EL3_Receive_Letter ; \
+rdfs:subClassOf ?event . \
+?event_from rdfs:subClassOf ?event ; \
+rdf:type crm:EL2_Send_Letter ; \
+crm:P27_moved_from ?place . \
+?place rdfs:label ?label \
+} \
+ORDER BY DESC (?Count)"
+
+queryCount2 = prefixes + " SELECT ?place ?label COUNT(?label) AS ?Count \
+WHERE{ \
+?place_from owl:sameAs <" + thisUrlParams.link + "> . \
+?event_from crm:P27_moved_from ?place_from ; \
+rdf:type crm:EL2_Send_Letter ; \
+rdfs:subClassOf ?event . \
+?event_to rdfs:subClassOf ?event ; \
+rdf:type crm:EL2_Send_Letter ; \
+crm:P27_moved_from ?place . \
+?place rdfs:label ?label . \
+} \
+ORDER BY DESC (?Count) "
+
+queryCountLuogo = prefixes + " SELECT DISTINCT COUNT(?luogo) AS ?occorrenze \
+WHERE { \
+?document crm:P67_refers_to ?luogo . \
+<" + thisUrlParams.link + "> crm:P1_is_identified_by ?luogo . \
+} "
+
+queryCountDataset = prefixes + " SELECT DISTINCT COUNT(?uri) AS ?documenti \
+WHERE {\
+?uri crm:P2_has_type 'Testo Lemmatizzato' } "
+
+querySupportCount = prefixes + " SELECT ?uri_antroponym ?antroponimo COUNT(DISTINCT ?document) AS ?occorrenze COUNT(DISTINCT ?letter) AS ?count \
+WHERE { \
+?document crm:P67_refers_to ?uri . \
+<" + thisUrlParams.link + "> crm:P1_is_identified_by ?uri . \
+?document crm:P67_refers_to ?uri_antroponym . \
+?uri_antroponym crm:P2_has_type 'Antroponimo'; \
+rdfs:label ?antroponimo . \
+?letter crm:P67_refers_to ?uri_antroponym . \
+} \
+GROUP BY ?uri_antroponym ?antroponimo \
+ORDER BY DESC (?occorrenze) "
+
+querySupportLemma = prefixes + " SELECT ?uri_lemma ?lemma COUNT(DISTINCT ?document) AS ?occorrenze COUNT(DISTINCT ?letter) AS ?count \
+WHERE { \
+?document crm:P67_refers_to ?uri . \
+<" + thisUrlParams.link + "> crm:P1_is_identified_by ?uri . \
+?document crm:P67_refers_to ?uri_object . \
+?uri_object crm:P128_carries ?uri_lemma . \
+?uri_lemma rdf:type ?uri_type; \
+rdfs:label ?lemma . \
+?uri_type rdfs:label 'Lemma' . \
+?letter crm:P67_refers_to ?uri_object . \
+} \
+GROUP BY ?uri_lemma ?lemma \
+ORDER BY DESC (?occorrenze) "
+
+/*
+queryCountAntroponym = SELECT DISTINCT ?antroponimi COUNT(?uri) AS ?occorrenze
+WHERE {
+?document crm:P67_refers_to ?uri .
+?uri crm:P2_has_type "Antroponimo" ;
+rdfs:label ?antroponimi .
+}
+GROUP BY ?antroponimi ?uri
+ORDER BY DESC (?occorrenze)
+
+
+queryCountLuogo = SELECT DISTINCT COUNT(?luogo) AS ?occorrenze
+WHERE {
+?document crm:P67_refers_to ?luogo .
+<http://dev.restore.ovi.cnr.it/vocabularies/places/161> crm:P1_is_identified_by ?luogo .
+}
+
+
+queryCountDataset = SELECT DISTINCT COUNT(?uri) AS ?documenti
+WHERE {
+?uri crm:P2_has_type "Testo Lemmatizzato" }
+
+
+querySupportCount = SELECT DISTINCT ?uri_antroponym ?antroponimo COUNT(?antroponimo) AS ?occorrenze
+WHERE {
+?document crm:P67_refers_to ?uri .
+<http://dev.restore.ovi.cnr.it/vocabularies/places/257> crm:P1_is_identified_by ?uri .
+?document crm:P67_refers_to ?uri_antroponym .
+?uri_antroponym crm:P2_has_type "Antroponimo";
+rdfs:label ?antroponimo .
+}
+GROUP BY ?uri_antroponym ?antroponimo
+ORDER BY DESC (?occorrenze)
+*/
+
+queryURL = prepareQueryURL(query);
+
+queryRef = prepareQueryURL(queryRiferimenti);
+
+queryTopo = prepareQueryURL(queryToponimi);
+
+queryRec = prepareQueryURL(queryRicezione);
+
+querySend = prepareQueryURL(queryInvio);
+
+queryCit = prepareQueryURL(queryCitazione);
+
+queryPer = prepareQueryURL(queryPersone);
+
+queryCon1 = prepareQueryURL(queryCount);
+
+queryCon2 = prepareQueryURL(queryCount2);
+
+queryDataset = prepareQueryURL(queryCountDataset);
+
+querySup = prepareQueryURL(querySupportCount);
+
+queryLem = prepareQueryURL(querySupportLemma);
+
+queryOcc = prepareQueryURL(queryCountLuogo);
+
+
+response = $.ajax({//OGGETTO
+
+    url: queryURL,
+    dataType: "json",
+    success: function (data){
+    	handle_data(data);
+    },
+    error: function (e) {}
+});
+
+
+response_ref = $.ajax({//OGGETTO
+
+    url: queryRef,
+    dataType: "json",
+    success: function (data){
+      handle_ref(data);
+    },
+    error: function (e) {}
+});
+
+response_top = $.ajax({//OGGETTO
+
+    url: queryTopo,
+    dataType: "json",
+    success: function (data){
+      handle_toponym(data);
+    },
+    error: function (e) {}
+});
+
+response_receive = $.ajax({//OGGETTO
+
+    url: queryRec,
+    dataType: "json",
+    success: function (data){
+      handle_receive(data);
+    },
+    error: function (e) {}
+});
+
+response_send = $.ajax({//OGGETTO
+
+    url: querySend,
+    dataType: "json",
+    success: function (data){
+      handle_send(data);
+    },
+    error: function (e) {}
+});
+
+response_cit = $.ajax({//OGGETTO
+
+    url: queryCit,
+    dataType: "json",
+    success: function (data){
+      handle_cit(data);
+    },
+    error: function (e) {}
+});
+
+response_per = $.ajax({//OGGETTO
+
+    url: queryPer,
+    dataType: "json",
+    success: function (data){
+      handle_persons(data);
+    },
+    error: function (e) {}
+});
+
+responseCountA = $.ajax({//OGGETTO
+
+    url: queryCon1,
+    dataType: "json",
+    success: function (data){
+      handle_count(data);
+    },
+    error: function (e) {}
+});
+
+responseCountP = $.ajax({//OGGETTO
+
+    url: queryCon2,
+    dataType: "json",
+    success: function (data){
+      handle_count2(data);
+    },
+    error: function (e) {}
+});
+
+responseDataset = $.ajax({//OGGETTO
+
+    url: queryDataset,
+    dataType: "json",
+    success: function (data){
+      get_dataset(data);
+    },
+    error: function (e) {}
+});
+
+
+responseOcc = $.ajax({//OGGETTO
+
+    url: queryOcc,
+    dataType: "json",
+    success: function (data){
+      get_occurrence(data);
+    },
+    error: function (e) {}
+});
+
+
+responseSupp = $.ajax({//OGGETTO
+
+    url: querySup,
+    dataType: "json",
+    success: function (data){
+      get_support(data);
+    },
+    error: function (e) {}
+});
+
+
+responseLemm = $.ajax({//OGGETTO
+
+    url: queryLem,
+    dataType: "json",
+    success: function (data){
+      get_support(data);
+    },
+    error: function (e) {}
+});
+
+
+function handle_data(json) {
+	console.log(json);
+
+	const locations = [];
+
+	$.each(
+			json['results']['bindings'],
+			function (index, value) {
+				const loc = []
+				var graph = value['graph']['value'];
+				var label = value['name_place']['value'];
+				var coord = value['coordinates']['value'];
+				const coordinates = coord.split(", ");
+				loc.push(label);
+				loc.push(coordinates[0]);
+				loc.push(coordinates[1]);
+				locations.push(loc);
+
+        document.getElementById("grafo").innerHTML = graph;
+        document.getElementById("nome_luogo").innerHTML = label;
+        document.getElementById("nome_lu").innerHTML = label;
+        document.getElementById("nome_lp").innerHTML = label;
+        document.getElementById("nome_ll").innerHTML = label;
+        document.getElementById("nome_lg").innerHTML = label;
+				
+			});
+
+	var map = L.map('map').setView([locations[0][1], locations[0][2]], 7);
+	mapLink = '<a href="https://openstreetmap.org">OpenStreetMap</a>';
+
+	L.tileLayer(
+	  'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
+	    attribution: '&copy; ' + mapLink + ' Contributors',
+	    maxZoom: 18,
+	  }).addTo(map);
+
+	for (var i = 0; i < locations.length; i++) {
+	  marker = new L.marker([locations[i][1], locations[i][2]])
+	    .bindPopup(locations[i][0])
+	    .addTo(map);
+	}
+}
+
+
+function handle_ref(json) {
+
+  console.log(json);
+
+  const references = [];
+
+  var list_ref = "";
+
+  $.each(
+      json['results']['bindings'],
+      function (index, value) {
+        var ref = value['references']['value'];
+        references.push(ref);        
+      });
+
+  
+  for (i=0; i<references.length; i++) {
+      list_ref += "<a target='_blank' href='" + references[i] + "'>" + references[i] + "</a>";
+  }
+  
+  document.getElementById("riferimenti").innerHTML = list_ref;
+  
+}
+
+function handle_toponym(json) {
+
+  console.log(json);
+
+  const toponym = [];
+
+  $.each(
+      json['results']['bindings'],
+      function (index, value) {
+        var topo = value['toponimi']['value'];
+        toponym.push(" " + topo);        
+      });
+  
+  document.getElementById("toponimi").innerHTML = toponym;
+
+}
+
+function handle_receive(json) {
+
+  console.log(json);
+
+  const received = {};
+
+  var i=0;
+
+  $.each(
+      json['results']['bindings'],
+      function (index, value) {
+        key = value['object']['value'];
+        data = value['label']['value'];   
+        received[key] = data;  
+        i++;   
+      });
+
+  var myArray = "";
+
+  for (var key in received) {
+    myArray += "<div class='row res'><div class='col-10'>" + received[key] + "</div><div class='class='col d-flex align-items-start justify-content-end'><a class='btn-icon' target='_blank' href='" + key + "'><i class='fas fa-external-link-alt' aria-hidden='true'></i></a></div></div>";
+  }
+
+  document.getElementById("n_receive").innerHTML = i;
+  document.getElementById("object_receive").innerHTML = myArray;
+
+  if (i==0) {
+    var messaggio = "<p class='no-results'>Nessun risultato trovato</p>";
+    document.getElementById("object_receive").innerHTML = messaggio;
+  }
+
+}
+
+
+function handle_send(json) {
+
+  console.log(json);
+
+  const sent = {};
+
+  var i=0;
+
+  $.each(
+      json['results']['bindings'],
+      function (index, value) {
+        key = value['object']['value'];
+        data = value['label']['value'];   
+        sent[key] = data;   
+        i++;  
+      });
+
+  var myArray = "";
+
+  for (var key in sent) {
+    myArray += "<div class='row res'><div class='col-10'>" + sent[key] + "</div><div class='col d-flex align-items-start justify-content-end'><a class='btn-icon' target='_blank' href='" + key + "'><i class='fas fa-external-link-alt' aria-hidden='true'></i></a></div></div>";
+  }
+
+  document.getElementById("n_send").innerHTML = i;
+  document.getElementById("object_send").innerHTML = myArray;
+
+  if (i==0) {
+    var messaggio = "<p class='no-results'>Nessun risultato trovato</p>";
+    document.getElementById("object_send").innerHTML = messaggio;
+  }
+
+}
+
+function handle_cit(json) {
+
+  console.log(json);
+
+  const citations = {};
+
+  var i=0;
+
+  $.each(
+      json['results']['bindings'],
+      function (index, value) {
+        key = value['object']['value'];
+        data = value['label']['value'];   
+        citations[key] = data;  
+        i++;   
+      });
+
+  var myArray = "";
+
+  for (var key in citations) {
+    myArray += "<div class='row res'><div class='col-10'>" + citations[key] + "</div><div class='col d-flex align-items-start justify-content-end'><a class='btn-icon' target='_blank' href='" + key + "'><i class='fas fa-external-link-alt' aria-hidden='true'></i></a></div></div>";
+  }
+
+  document.getElementById("n_cit").innerHTML = i;
+  document.getElementById("object_cit").innerHTML = myArray;
+
+  if (i==0) {
+    var messaggio = "<p class='no-results'>Nessun risultato trovato</p>";
+    document.getElementById("object_cit").innerHTML = messaggio;
+  }
+
+}
+
+function handle_persons(json) {
+
+  console.log(json);
+
+  const people = {};
+
+  var i=0;
+
+  $.each(
+      json['results']['bindings'],
+      function (index, value) {
+        key = value['range']['value'];
+        data = value['label']['value'];   
+        people[key] = data;  
+        i++;   
+      });
+
+  var myArray = "";
+
+  for (var key in people) {
+    myArray += "<div class='row res'><div class='col-10'>" + people[key] + "</div><div class='col d-flex align-items-center justify-content-end'><div class='persona' id='" + 
+    key + "'><i class='fa fa-user' style='cursor: pointer'></i></div><div class='ml-3'><a class='btn-icon' target='_blank' href='" + 
+    key + "'><i class='fas fa-external-link-alt' aria-hidden='true'></i></a></div></div></div>";
+  }
+
+
+  document.getElementById("n_per").innerHTML = i;
+  document.getElementById("object_per").innerHTML = myArray;
+
+  if (i==0) {
+    var messaggio = "<p class='no-results'>Nessun risultato trovato</p>";
+    document.getElementById("object_per").innerHTML = messaggio;
+  }
+
+}
+
+function handle_count(json) {
+  console.log(json);
+
+  const toponimi = [];
+
+  const dataToponimi = [];
+
+  var max = 0;
+
+  $.each(
+      json['results']['bindings'],
+      function (index, value) {
+        const topo = [];
+
+        var toponimo = value['label']['value'];
+        var count = value['Count']['value'];
+        var temp = parseInt(count);
+        toponimi.push(toponimo);
+        dataToponimi.push([toponimo, count]);
+
+        if (temp>max) {
+          max = temp;
+        }
+        
+      });
+
+  // set the dimensions and margins of the graph
+      var margin = {top: 20, right: 30, bottom: 40, left: 90},
+          width = 460 - margin.left - margin.right,
+          height = 400 - margin.top - margin.bottom;
+
+      // append the svg object to the body of the page
+      var svg = d3.select("#my_dataviz")
+        .append("svg")
+          .attr("width", width + margin.left + margin.right)
+          .attr("height", height + margin.top + margin.bottom)
+        .append("g")
+          .attr("transform",
+                "translate(" + margin.left + "," + margin.top + ")");
+
+      // Parse the Data
+      //d3.csv("https://raw.githubusercontent.com/holtzy/data_to_viz/master/Example_dataset/7_OneCatOneNum_header.csv", function(data) {
+        // Add X axis
+        var x = d3.scaleLinear()
+          .domain([0, max])
+          .range([ 0, width]);
+        svg.append("g")
+          .attr("transform", "translate(0," + height + ")")
+          .call(d3.axisBottom(x))
+          .selectAll("text")
+            .attr("transform", "translate(-10,0)rotate(-45)")
+            .style("text-anchor", "end");
+
+        // Y axis
+        var y = d3.scaleBand()
+          .range([ 0, height ])
+          .domain(toponimi)
+          .padding(.1);
+        svg.append("g")
+          .call(d3.axisLeft(y))
+
+        //Bars
+        svg.selectAll("myRect")
+          .data(dataToponimi)
+          .enter()
+          .append("rect")
+          .attr("x", x(0) )
+          .attr("y", function(d) { return y(d[0]); })
+          .attr("width", function(d) { return x(d[1]); })
+          .attr("height", y.bandwidth() )
+          .attr("fill", "#69b3a2")
+
+
+  /*var texts = svg.selectAll("myRect")
+    .data(dataToponimi)
+    .enter()
+    .append("text");
+
+  texts.attr("x", function(d){ return d[1] / 4 - 20})
+      .attr("y", function(d,i){ return 22.26*i +20})
+      .attr("text-anchor", "middle")
+      .attr("fill", "#fff")
+      .text(function(d){ return d[1]});*/
+
+}
+
+
+function handle_count2(json) {
+  console.log(json);
+
+  const toponimi = [];
+
+  const dataToponimi = [];
+
+  const values = [];
+
+  var max = 0;
+
+  $.each(
+      json['results']['bindings'],
+      function (index, value) {
+        const topo = [];
+
+        var toponimo = value['label']['value'];
+        var count = value['Count']['value'];
+        var temp = parseInt(count);
+        toponimi.push(toponimo);
+        dataToponimi.push([toponimo, count]);
+
+        if (temp>max) {
+          max = temp;
+        }
+        
+      });
+
+  // set the dimensions and margins of the graph
+      var margin = {top: 20, right: 30, bottom: 40, left: 90},
+          width = 460 - margin.left - margin.right,
+          height = 400 - margin.top - margin.bottom;
+
+      // append the svg object to the body of the page
+      var svg = d3.select("#my_dataviz2")
+        .append("svg")
+          .attr("width", width + margin.left + margin.right)
+          .attr("height", height + margin.top + margin.bottom)
+        .append("g")
+          .attr("transform",
+                "translate(" + margin.left + "," + margin.top + ")");
+
+      // Parse the Data
+      //d3.csv("https://raw.githubusercontent.com/holtzy/data_to_viz/master/Example_dataset/7_OneCatOneNum_header.csv", function(data) {
+        // Add X axis
+        var x = d3.scaleLinear()
+          .domain([0, max])
+          .range([ 0, width]);
+        
+        svg.append("g")
+          .attr("transform", "translate(0," + height + ")")
+          .call(d3.axisBottom(x))
+          .selectAll("text")
+            .attr("transform", "translate(-10,0)rotate(-45)")
+            .style("text-anchor", "end");
+
+        // Y axis
+        var y = d3.scaleBand()
+          .range([ 0, height ])
+          .domain(toponimi)
+          .padding(.1);
+
+        svg.append("g")
+          .call(d3.axisLeft(y))
+
+        //Bars
+        svg.selectAll("myRect")
+          .data(dataToponimi)
+          .enter()
+          .append("rect")
+          .attr("x", x(0) )
+          .attr("y", function(d) { return y(d[0]); })
+          .attr("width", function(d) { return x(d[1]); })
+          .attr("height", y.bandwidth() )
+          .attr("fill", "#69b3a2")
+
+        svg.selectAll("text2")
+          .data(dataToponimi)
+          .enter().append("text2")
+          .text(function(d) {return d[1]})
+          .attr("class", "text")
+}
+
+
+function get_dataset(json) {
+
+  console.log(json);
+
+  data = json.results.bindings[0].documenti.value;
+
+  console.log(data);
+      
+}
+
+
+function get_occurrence(json) {
+
+}
+
+
+function get_support(json) {
+
+}
+
+function open_info() {
+
+    document.getElementById("info_luogo").style.display = "block";
+    document.getElementById("place_info").style.display = "block";
+    document.getElementById("topo").style.display = "none";
+    document.getElementById("rif").style.display = "none";
+}
+
+function open_toponimi() {
+
+    document.getElementById("info_luogo").style.display = "block";
+    document.getElementById("place_info").style.display = "none";
+    document.getElementById("topo").style.display = "block";
+    document.getElementById("rif").style.display = "none";
+}
+
+function open_riferimenti() {
+
+    document.getElementById("info_luogo").style.display = "block";
+    document.getElementById("place_info").style.display = "none";
+    document.getElementById("topo").style.display = "none";
+    document.getElementById("rif").style.display = "block";
+}
+
+function open_collegamenti() {
+
+    document.getElementById("references").style.display = "flex";
+    document.getElementById("statistiche").style.display = "none";
+    document.getElementById("regole_associazione").style.display = "none";
+}
+
+function open_statistiche() {
+
+    document.getElementById("references").style.display = "none";
+    document.getElementById("statistiche").style.display = "flex";
+    document.getElementById("regole_associazione").style.display = "none";
+}
+
+function open_correlazioni() {
+
+    document.getElementById("references").style.display = "none";
+    document.getElementById("statistiche").style.display = "none";
+    document.getElementById("regole_associazione").style.display = "flex";
+}
+
+var header = document.getElementById("ref_buttons");
+var btns = header.getElementsByClassName("btn");
+for (var i = 0; i < btns.length; i++) {
+  btns[i].addEventListener("click", function() {
+  var current = document.getElementsByClassName("active");
+  current[0].className = current[0].className.replace(" active", "");
+  this.className += " active";
+  });
+}
+
+//out = "";
+//for(i = 0; i < resultArray.length; i++){
+ //   out = out + JSON.stringify(resultArray[i])
+//}
+//queryStringOutput = (queryStringOutput + out).replace("}{",",");
+
+
+/*
+
+var locations = [
+  ["LOCATION_1", 11.8166, 122.0942],
+  ["LOCATION_2", 11.9804, 121.9189],
+  ["LOCATION_3", 10.7202, 122.5621],
+  ["LOCATION_4", 11.3889, 122.6277],
+  ["LOCATION_5", 10.5929, 122.6325]
+];
+
+var map = L.map('map').setView([11.206051, 122.447886], 8);
+mapLink =
+  '<a href="http://openstreetmap.org">OpenStreetMap</a>';
+L.tileLayer(
+  'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
+    attribution: '&copy; ' + mapLink + ' Contributors',
+    maxZoom: 18,
+  }).addTo(map);
+
+for (var i = 0; i < locations.length; i++) {
+  marker = new L.marker([locations[i][1], locations[i][2]])
+    .bindPopup(locations[i][0])
+    .addTo(map);
+}
+*/
+
+$(document).on("click", ".persona", function (ev) {
+
+    var link = this.id;
+    //alert(nome_autore);
+    //$('#myModal').text("");
+    window.open("Persona.html?link="+this.id);
+    
+
+  });

+ 24 - 0
scss/_global.scss

@@ -117,6 +117,12 @@ a {
     margin-bottom: 0;
 }
 
+.box_info-tabs {
+    height: 100%;
+    border: 1px solid #dee2e6;
+    padding: 5px 13px;
+}
+
 #map_buttons a {
     color: #30383f;
     font-size: 15px;
@@ -132,3 +138,21 @@ a {
     font-size: 16px;
     padding: 10px 0;
 }
+
+.nav-tabs {
+    .nav-link {
+        background-color: transparent;
+        padding: 0 15px;
+        font-size: 15px;
+        border: 0;
+        font-weight: 700;
+        text-transform: uppercase;
+        border-bottom: 2px solid transparent;
+        &:hover,
+        &:focus,
+        &:active {
+            border-bottom: 2px solid $theme-color;
+            outline: none;
+        }
+    }
+}

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott