Update report style (map and gallery)
This commit is contained in:
parent
167545ffbf
commit
37f51955e6
@ -60,7 +60,7 @@ table.table th {
|
||||
border: none;
|
||||
}
|
||||
#map {
|
||||
height: 600px;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
/* Print styles */
|
||||
|
10
js/ds.js
10
js/ds.js
@ -1,4 +1,8 @@
|
||||
'use strict';
|
||||
/**
|
||||
* @namespace DataSpace
|
||||
*/
|
||||
const DataSpace = {};
|
||||
|
||||
export const BASE_URL = 'http://dataspace.ispc.cnr.it';
|
||||
const RES_ENDPOINT = '/resources/';
|
||||
@ -87,17 +91,13 @@ export function printReport() {
|
||||
});
|
||||
}
|
||||
export function attachMap(coordinates, htmlId = 'map') {
|
||||
const map = L.map(htmlId).setView(coordinates, 13);
|
||||
const map = L.map(htmlId).setView(coordinates, 18);
|
||||
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
|
||||
L.marker(coordinates).addTo(map);
|
||||
/*
|
||||
.bindPopup('A pretty CSS3 popup.<br> Easily customizable.')
|
||||
.openPopup();
|
||||
*/
|
||||
}
|
||||
/**
|
||||
* @todo Use TS to define object shape
|
||||
|
@ -88,7 +88,8 @@ document.addEventListener('readystatechange', async () => {
|
||||
// Create image gallery
|
||||
// TODO refactor...
|
||||
let gallery = document.querySelector('#gallery');
|
||||
gallery.classList.remove('d-hide');
|
||||
gallery.parentElement
|
||||
.classList.remove('d-hide');
|
||||
|
||||
for (const src of files) {
|
||||
const img = document.createElement('img');
|
||||
|
@ -45,8 +45,11 @@
|
||||
<div class="column col-6 p-2 mt-2">
|
||||
<div id="map"></div>
|
||||
</div>
|
||||
<div class="container grid-md">
|
||||
<div class="columns d-hide mt-2" id="gallery">
|
||||
<div class="container d-hide mt-2 pt-2 grid-md">
|
||||
<p class="text-small">
|
||||
Click on any image to open gallery
|
||||
</p>
|
||||
<div class="columns mt-2" id="gallery">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user