-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
158 lines (140 loc) · 6.13 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>GPX Viewer</title>
<link rel="stylesheet" href="resources/styles/vendor.css">
<link rel="stylesheet" href="resources/styles/app.css">
<script type="text/javascript">
window.onbeforeunload = function() {
return "Are you sure?";
};
</script>
<template type="javascript/template" id="map-point-template">
<div class="map-point">
{{ point.name }}<br/>
{{ point.$.lat }},{{ point.$.lon }}<br/>
<hr>
<span class="btn btn-secondary btn-sm" data-action="edit">
<i class="mdi mdi-pencil"></i>
</span>
</div>
</template>
<template type="javascript/template" id="list-point-template">
<div class="list-point">
<div class="d-flex">
<div class="p-2 flex-grow-1 text-nowrap text-truncate">
<span class="btn btn-light btn-sm">
<i class="mdi mdi-{{ icon }}"></i>
</span>
<span class="list-point-name" title="{{ point.name }}">{{ point.name }}</span>
</div>
<div class="p-2">
<span class="btn btn-secondary btn-sm" data-action="target">
<i class="mdi mdi-target"></i>
</span>
</div>
<div class="p-2">
<span class="btn btn-secondary btn-sm" data-action="edit">
<i class="mdi mdi-pencil"></i>
</span>
</div>
</div>
</div>
</template>
<template type="javascript/template" id="edit-popup-template">
<form class="modal fade" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{{ point.name }}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="edit-popup-name" class="col-form-label">Name:</label>
<input type="text"
class="form-control"
name="edit-popup-name"
id="edit-popup-name"
required>
</div>
<div class="form-group">
<label for="edit-popup-name" class="col-form-label">Description:</label>
<input type="text"
class="form-control"
name="edit-popup-desc"
id="edit-popup-desc">
</div>
<div class="form-group">
<label for="edit-popup-name" class="col-form-label">Category:</label>
<input type="text"
class="form-control"
name="edit-popup-type"
id="edit-popup-type">
</div>
<div class="form-group">
<label class="col-form-label">Icon:</label>
{{#icons}}
<div class="form-check">
<input type="radio"
class="form-check-input"
name="edit-popup-icon"
id="edit-popup-icon-{{ value }}"
value="{{ value }}">
<label class="form-check-label" for="edit-popup-icon-{{ value }}">
<i class="mdi mdi-{{ icon }}"></i>
</label>
</div>
{{/icons}}
</div>
</div>
<div class="modal-footer">
<span class="btn btn-danger mr-auto" data-action="delete">Delete</span>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</form>
</template>
</head>
<body>
<div id="sidebar" class="leaflet-sidebar collapsed">
<div class="leaflet-sidebar-tabs">
<ul role="tablist">
<li><a href="#home" role="tab"><i class="mdi mdi-menu"></i></a></li>
</ul>
<div class="footer">
<input id="gpx" type="file" accept="application/gpx+xml" class="d-none">
<label id="open" for="gpx">
<i class="mdi mdi-folder-open"></i>
</label>
<a id="download"
href="#"
target="_blank"
style="display: none;">
<i class="mdi mdi-content-save"></i>
</a>
<span id="clear" style="display: none;">
<i class="mdi mdi-delete-empty"></i>
</span>
</div>
</div>
<div class="leaflet-sidebar-content">
<div class="leaflet-sidebar-pane" id="home">
<div id="list-empty">
<div class="text-center"><i class="mdi mdi-map-search-outline"></i></div>
Please <label for="gpx" class="text-primary">open file</label> or use right mouse click for create new point.
</div>
<div id="list"></div>
</div>
</div>
</div>
<div id="map"></div>
<script src="https://api-maps.yandex.ru/2.1/?lang=en_RU&apikey=<your API-key>" type="text/javascript"></script>
<script src="resources/scripts/app.js"></script>
</body>
</html>