-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
48 lines (44 loc) · 1.62 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="favicon.ico?o=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png?o=1">
<title>Raleigh Trail Statuses</title>
<link href="styles.css" rel="stylesheet">
<script>
var trails = [
{id: 3778, label: 'Crabtree'},
{id: 45958, label: 'Forest Ridge'},
{id: 45959, label: 'Green Hills'},
{id: 10922, label: 'Harris'},
{id: 3779, label: 'RTP'},
{id: 41867, label: 'Williamson Preserve'},
];
</script>
</head>
<body>
<div id="trail-list"></div>
<script>
(function () {
function injectList(htmlStr) {
var fragment = document.createDocumentFragment(),
$elem = document.createElement('div');
$elem.innerHTML = htmlStr;
while($elem.firstChild) {
fragment.appendChild($elem.firstChild);
}
document.getElementById('trail-list').appendChild(fragment);
}
var html = '';
trails.forEach(function(obj) {
html += '<div class="trail-item"><div class="TrailforksWidgetRegionStatus" data-w="30px" data-h="24px" data-rid="'+obj.id+'" data-activitytype="1" data-status="1" data-st="0" data-ct="0" data-date="0" data-style="https://ecumike.github.io/trailstatus/styles.css"></div><div>'+obj.label+'</div></div>';
});
injectList(html);
})();
</script>
<script src="https://es.pinkbike.org/326/sprt/j/trailforks/iframeResizer.min.js"></script>
<script src="https://es.pinkbike.org/ttl-86400/sprt/j/trailforks/widget.js"></script>
</body>
</html>