-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
142 lines (124 loc) · 5.63 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="shortcut icon" href=https://carto.com/favicon.ico> <!-- Include CSS elements -->
<link rel="stylesheet" href="https://libs.cartocdn.com/airship-style/v1.0.0-alpha.44/airship.css">
<!-- Include icons -->
<link rel="stylesheet" href="https://libs.cartocdn.com/airship-icons/v1.0.0-alpha.44/icons.css">
<!-- Include airship components -->
<script src="https://libs.cartocdn.com/airship-components/v1.0.0-alpha.44/airship.js"></script>
<link href="https://unpkg.com/[email protected]/dist/leaflet.css" rel="stylesheet">
<style>
:root {
--as-color--secondary: #f24440;
--as-color--primary: #1FAC06;
}
@media (min-width: 812px) {
.as-panel--left {
left: 60px;
}
}
.check-box-caption {
display: inline-block;
vertical-align: middle;
}
.infowindow-image {
max-width: 100px;
margin: 0;
}
.hide{
display:none;
}
</style>
</head>
<body class="as-app">
<as-responsive-content>
<div class="as-modal hide" id="modal">
<div class="as-modal__content">
<h1 class="as-title">Airship demo</h1>
<p class="as-body">
This is a demo of <a href="https://carto.com">CARTO</a>
<a href="https://github.com/cartodb/airship">Airship</a> and
<a href="https://carto.com/developers/carto-js/">CARTO.js</a> libraries. You are seeing fake dynamic data that
rotates every 6 hours displaying Málaga city bus network along with fake
company data.
</p>
<p style="text-align: center">
<button class="as-btn as-btn--primary as-btn--l" id="js-modal-ok"> OK </button>
</p>
</div>
</div>
<aside class="as-sidebar as-sidebar--right" data-name="Widgets">
<div class="as-container">
<section class="as-box">
<a class="as-toolbar__item as-p--8" href="https://carto.com">
<img src="resources/logo_CARTO_positive_90.png" style="width:100%" />
</a>
</section>
<section class="as-box">
<h3 class="as-title">
<span id="js-count-buses">0</span> buses
</h3>
</section>
<section class="as-box">
<as-category-widget id="bus-lines-category" heading="Bus lines" description="Select coaches by bus line"
default-bar-color="#f24440" show-clear-button="true">
</as-category-widget>
</section>
<section class="as-box">
<as-category-widget id="bus-companies-category" heading="Companies" description="Select coaches by company"
default-bar-color="#f24440" show-clear-button="true">
</as-category-widget>
</section>
<section class="as-box">
<p class="as-body">Data is on average
<span class="as-font--medium" id="js-avg-diff"></span>
seconds old
</p>
</section>
<section class="as-box">
<p style="text-align: center;">
<button class="as-btn as-btn--primary as-color--complementary" id="js-about">About</button>
</p>
</section>
</div>
</aside>
<main class="as-main">
<div class="as-map-area">
<div id="map"></div>
<div class="as-map-panels" data-name="Filters">
<div class="as-panel as-panel--top as-panel--left as-panel--vertical">
<div class="as-panel__element">
<section class="as-box">
<p class="as-title">Layers</p>
<div>
<as-switch checked id="switch_forward" name="switch_forward" title="switch-1"></as-switch>
<div class="check-box-caption">
<p class="as-body" style="color: #7F3C8D;">Forward</p>
</div>
</div>
<div>
<as-switch checked id="switch_backward" name="switch_backward" title="switch-1"></as-switch>
<div class="check-box-caption">
<p class="as-body" style="color:#11A579;">Backwards</p>
</div>
</div>
</section>
</div>
</div>
</div>
</div>
</main>
</as-responsive-content>
<!-- Include CARTO.js -->
<script src="https://libs.cartocdn.com/carto.js/v4.1.6/carto.min.js"></script>
<!-- Include Leaflet -->
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<!-- Leaflet Hash -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-hash/0.2.1/leaflet-hash.min.js"></script>
<script src="js/app.js"></script>
</body>
</html>