ruscomap/public/index.html

118 lines
3.9 KiB
HTML
Raw Normal View History

2024-06-30 22:56:19 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="stylesheet"
2024-08-25 16:21:01 +02:00
href="./js/dist/leaflet.css"
2024-06-30 22:56:19 +02:00
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
crossorigin=""
/>
2024-09-21 00:13:41 +02:00
<link rel="icon" type="image/png" sizes="16x16" href="../img/trashw.png" />
2024-06-30 22:56:19 +02:00
<script
2024-08-25 16:21:01 +02:00
src="./js/dist/leaflet.js"
2024-06-30 22:56:19 +02:00
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
crossorigin=""
></script>
<link rel="stylesheet" href="/css/map.css" />
2024-08-25 16:42:50 +02:00
<!-- importa control.locate senza cdn -->
<link rel="stylesheet" href="./js/dist/L.Control.Locate.css" />
2024-08-17 21:02:10 +02:00
<title>RuscoMap</title>
2024-06-30 22:56:19 +02:00
</head>
<body>
2024-09-21 00:39:45 +02:00
<button id="addMarkerBtn"><img src="../img/marker-icon18.png" alt="Button Image" /></button>
2024-06-30 22:56:19 +02:00
<div id="markerFormContainer">
<form id="markerForm" enctype="multipart/form-data">
2024-09-21 00:13:41 +02:00
<div id="noticeCoordsPicker" style="display: none">
<text
>Clicca sul punto della mappa in cui vuoi inserire il rusco
avvistato</text
>
<input id="formInputCoordY" name="lat" type="hidden" />
<input id="formInputCoordX" name="long" type="hidden" />
2024-06-30 22:56:19 +02:00
</div>
2024-09-21 00:13:41 +02:00
<div id="remainingForm" style="display: none">
2024-06-30 22:56:19 +02:00
<label>Nome</label>
2024-09-21 00:13:41 +02:00
<br />
2024-08-20 23:14:59 +02:00
<input name="name" required type="text" />
2024-09-21 00:13:41 +02:00
<br /><br />
2024-08-20 23:14:59 +02:00
<label>Descrizione</label>
2024-09-21 00:13:41 +02:00
<br />
2024-08-20 23:14:59 +02:00
<textarea name="description" required></textarea>
2024-09-21 00:13:41 +02:00
<br /><br />
2024-08-20 23:14:59 +02:00
<div class="file-upload">
2024-09-21 00:13:41 +02:00
<input
name="image"
required
type="file"
id="file-input"
class="file-input"
accept="image/x-png,image/jpeg,image/jpg"
/>
2024-08-20 23:14:59 +02:00
<label for="file-input" class="file-label">Scegli File</label>
2024-09-21 00:13:41 +02:00
<br /><br />
<span class="file-chosen"> </span>
2024-08-20 22:30:08 +02:00
</div>
2024-09-21 00:13:41 +02:00
<br />
2024-08-20 23:14:59 +02:00
<button>Aggiungi Marker</button>
2024-06-30 22:56:19 +02:00
</div>
</form>
</div>
2024-09-21 00:39:45 +02:00
<div id="map"> </div>
2024-08-25 16:42:50 +02:00
2024-09-21 00:13:41 +02:00
<!-- bottone gps -->
<!-- <button id="gps-button" type="button">
2024-08-25 16:42:50 +02:00
<img src="../img/target30.png" alt="GPS" style="display: flex"> </button> -->
2024-09-21 00:13:41 +02:00
<div class="popup" id="popup">
<!-- <img src="qualcosa.jpg" alt="Popup Image"> -->
<p id="istruzioni">
<img
src="../img/trashg.png"
alt="Description of Image"
width="20"
height="20"
/><b>RuscoMap</b> è una mappa dove utenti in anonimo possono inserire
dei marker con nome, descrizione e foto di oggetti abbandonati,
segnalandoli a tutti i visitatori della mappa. <br />
<br />
Sulla falsa riga del <i>te lo regalo se vieni a prenderlo</i>, questo è
più il
<i>segnalo che c'è 'sta roba lì, è tua se te la vai a prendere</i>.
<br />
<br />
Clicca <a href="./tutorial.html">qui</a> per leggere il tutorial.
</p>
<div>
<button id="popupstart" type="button" onclick="closePopup()">X</button>
2024-08-23 19:38:23 +02:00
</div>
2024-09-21 00:13:41 +02:00
</div>
2024-08-23 19:38:23 +02:00
2024-09-21 00:13:41 +02:00
<script>
function closePopup() {
var popup = document.getElementById("popup");
popup.style.display = "none";
}
// Popup si chiude automaticamente dopo 13 secondi
setTimeout(closePopup, 13000);
2024-08-24 15:12:53 +02:00
</script>
2024-09-21 00:39:45 +02:00
<script>
window.addEventListener('load', () => {
// Add a click event listener to the button
const gpsButton = document.getElementById("gps-button");
gpsButton.addEventListener("click", function () {
if (lc.isFollowing()) {
lc.stop();
} else {
lc.start();
}
});
});
</script>
<script src="./js/dist/L.Control.Locate.min.js"></script>
2024-06-30 22:56:19 +02:00
<script type="module" type="text/javascript" src="/js/map.js"></script>
2024-09-21 00:39:45 +02:00
</body>
<footer></footer>
2024-06-30 22:56:19 +02:00
</html>