-
Notifications
You must be signed in to change notification settings - Fork 0
/
rer.html
108 lines (91 loc) · 3.75 KB
/
rer.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
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Passage RER</title>
<link rel="icon" href="./img/rer-logo.svg">
<link rel="stylesheet" href="./css/app.css">
</head>
<body style="margin: 0;">
<div class="menu">
<div>
<div class="logoLigne">
<img src="./img/rer-logo.svg" id="icon" alt="">
</div>
<h1 id="station">Choisissez une station.</h1>
</div>
</div>
<div class="configPanel" id="config" style="padding: 15px; z-index: 9999">
<form action="">
<label for="stationSearch" style="display:none">Rechercher une station</label>
<input type="text" id="stationSearch" oninput="rechercherStation()" placeholder="Auber, Nation, ...">
<ul id="stationSearchResults"></ul>
</form>
</div>
<div id="horaires" style="margin: .75rem;">
</div>
<div class="now" id="now"></div>
<script src="./js/app.js"></script>
<script src="./js/rer.js"></script>
<script>
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const getLine = urlParams.get('line');
if (!getLine) {
document.location.href = "index.html";
}
updateHorairesv2(stop_Id, getLine)
if (getLine === "C" || getLine === "D" || getLine === "E") {
document.body.classList.add("sncf")
}
function trierHoraires() {
// Boucle sur les deux conteneurs d'horaires
for (let i = 1; i <= 2; i++) {
const conteneurHoraires = document.getElementById('horaires' + i);
// Vérifie si le conteneur existe avant de continuer
if (conteneurHoraires) {
// Crée un tableau des éléments enfants pour le trier
let elementsATrier = Array.from(conteneurHoraires.children);
elementsATrier.sort((a, b) => parseInt(a.id) - parseInt(b.id));
// Supprime les éléments existants du DOM
while (conteneurHoraires.firstChild) {
conteneurHoraires.removeChild(conteneurHoraires.firstChild);
}
// Ajoute les éléments triés de nouveau au DOM
elementsATrier.forEach(element => {
conteneurHoraires.appendChild(element);
});
}
}
}
document.addEventListener('DOMContentLoaded', function () {
});
</script>
<style>
.connect-wifi {
position: fixed;
bottom: 0;
left: 0;
margin: 1rem;
padding: 1rem 1rem;
height: 40px !important;
border-radius: 50em;
background: rgba(217, 217, 217, 0.85);
}
.connect-wifi {
background: #f696a0;
}
.connect-wifi .bi {
fill: #a60316;
}
</style>
<div class="connect-wifi" id="icone-wifi">
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" class="bi bi-wifi"
viewBox="0 0 16 16">
<path d="M15.384 6.115a.485.485 0 0 0-.047-.736A12.44 12.44 0 0 0 8 3C5.259 3 2.723 3.882.663 5.379a.485.485 0 0 0-.048.736.52.52 0 0 0 .668.05A11.45 11.45 0 0 1 8 4c2.507 0 4.827.802 6.716 2.164.205.148.49.13.668-.049"/>
<path d="M13.229 8.271a.482.482 0 0 0-.063-.745A9.46 9.46 0 0 0 8 6c-1.905 0-3.68.56-5.166 1.526a.48.48 0 0 0-.063.745.525.525 0 0 0 .652.065A8.46 8.46 0 0 1 8 7a8.46 8.46 0 0 1 4.576 1.336c.206.132.48.108.653-.065m-2.183 2.183c.226-.226.185-.605-.1-.75A6.5 6.5 0 0 0 8 9c-1.06 0-2.062.254-2.946.704-.285.145-.326.524-.1.75l.015.015c.16.16.407.19.611.09A5.5 5.5 0 0 1 8 10c.868 0 1.69.201 2.42.56.203.1.45.07.61-.091zM9.06 12.44c.196-.196.198-.52-.04-.66A2 2 0 0 0 8 11.5a2 2 0 0 0-1.02.28c-.238.14-.236.464-.04.66l.706.706a.5.5 0 0 0 .707 0l.707-.707z"/>
</svg>
</div>
</body>
</html>