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