-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
77 lines (68 loc) · 2.92 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
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>V'Lille service status</title>
<meta name="description" content="V'Lille service status">
<meta name="author" content="fmachen">
<link rel="manifest" href="manifest.json">
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="main.css" media="screen">
<script src="https://unpkg.com/vue"></script>
</head>
<body>
<main>
<h1>V'Lille service status
<small>{{ filteredStations.length }} stations</small>
</h1>
<nav>
<label for="filterSearch">
<img src="assets/search.png" alt="search" title="filter by id, name or adress" width="48px">
</label>
<input type="search" v-model="filterSearch" id="filterSearch" placeholder="filter">
<input type="checkbox" v-model="filterFavorite" id="filterFavorite">
<label for="filterFavorite">
<img src="assets/favorite.png" alt="star" title="filter favorites" width="48px">
</label>
</nav>
<section>
<table>
<tr>
<th></th>
<th>id</th>
<th>nom</th>
<th>adresse</th>
<th>dispo</th>
<th>libre</th>
<th>etat</th>
<th>CB</th>
<th>GPS</th>
</tr>
<tr is="station" v-for="station in filteredStations" :station="station" v-on:favorite-update="favoriteUpdate"></tr>
</table>
</section>
</main>
<template id="tpl-station">
<tr :key="station.id">
<td @click="favoriteUpdate(station)">
<img src="assets/favorite.png" alt="star" :title="[station.isFavorite() ? 'favorite' : 'no favorite']" width="24px" :class="[station.isFavorite() ? '' : 'grayscale']">
</td>
<td v-text="station.id"></td>
<td v-text="station.name"></td>
<td v-text="station.adress"></td>
<td v-text="station.nbBikes"></td>
<td v-text="station.nbSlots"></td>
<td>
<img src="assets/success.png" alt="station ok" title="station ok" width="24px" v-if="station.state == 'EN SERVICE/CONNECTEE'">
<img src="assets/repair.png" alt="station repair" title="station repair" width="24px" v-else-if="station.state == 'EN SERVICE/DECONNECTEE'">
<img src="assets/security.png" alt="station ok" title="station ok" width="24px" v-else>
</td>
<td>
<img src="assets/cb.png" alt="cb" :title="[station.acceptCb ? 'cb' : 'no cb']" width="24px" :class="[station.acceptCb ? '' : 'grayscale']">
</td>
<td>{{ station.gps[0] }} - {{ station.gps[1] }}</td>
</tr>
</template>
<script src="main.js"></script>
</body>
</html>