-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathredirect.html
More file actions
94 lines (80 loc) · 2.08 KB
/
Copy pathredirect.html
File metadata and controls
94 lines (80 loc) · 2.08 KB
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
---
layout: default
title: Doorsturen...
---
<div class="redirect-container">
<div class="redirect-content">
<div class="loading-spinner">
<div class="spinner"></div>
</div>
<h2>Je wordt doorgestuurd...</h2>
<p id="service-info">Een moment geduld terwijl we je doorsturen naar de dienst.</p>
</div>
</div>
<style>
.redirect-container {
min-height: 80vh;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.redirect-content {
text-align: center;
max-width: 500px;
}
.loading-spinner {
margin-bottom: 24px;
}
.spinner {
width: 40px;
height: 40px;
border: 4px solid #f3f3f3;
border-top: 4px solid #EB8C3A;
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.redirect-content h2 {
color: #333;
margin-bottom: 12px;
}
.redirect-content p {
color: #666;
font-size: 1.1rem;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Get session ID from URL parameters
const urlParams = new URLSearchParams(window.location.search);
const sessionId = urlParams.get('session');
if (!sessionId) {
document.getElementById('service-info').textContent = 'Ongeldige sessie. Je wordt teruggestuurd naar de homepage.';
setTimeout(() => {
window.location.href = '/';
}, 2000);
return;
}
// Get the history entry from localStorage
const storedUrls = JSON.parse(localStorage.getItem('opendienstenStoredUrls') || '[]');
const entry = storedUrls.find(item => item.sessionId === sessionId);
if (!entry) {
document.getElementById('service-info').textContent = 'Sessie niet gevonden. Je wordt teruggestuurd naar de homepage.';
setTimeout(() => {
window.location.href = '/';
}, 2000);
return;
}
// Update the info text
document.getElementById('service-info').textContent = `Je wordt doorgestuurd naar ${entry.service.naam}...`;
// Redirect after a short delay
setTimeout(() => {
window.location.href = entry.url;
}, 1500);
});
</script>