33< head >
44 < meta charset ="UTF-8 ">
55 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6- < title > Service Queue</ title >
6+ < title > Queue - Please Wait</ title >
7+
8+ <!-- Multiple refresh mechanisms -->
79 < meta http-equiv ="refresh " content ="[[.RefreshInterval]] ">
10+ < meta http-equiv ="Cache-Control " content ="no-store, no-cache, must-revalidate, max-age=0 ">
11+ < meta http-equiv ="Pragma " content ="no-cache ">
12+ < meta http-equiv ="Expires " content ="0 ">
13+
814 < style >
915 body {
10- font-family : 'Segoe UI' , Tahoma, Geneva, Verdana, sans-serif;
11- background-color : # f8f9fa ;
12- color : # 333 ;
13- line-height : 1.6 ;
16+ font-family : 'Segoe UI' , Arial, sans-serif;
1417 margin : 0 ;
1518 padding : 0 ;
1619 display : flex;
1720 justify-content : center;
1821 align-items : center;
1922 min-height : 100vh ;
23+ background-color : # f5f5f5 ;
2024 }
21-
2225 .container {
23- max-width : 650px ;
26+ max-width : 600px ;
27+ width : 100% ;
2428 background : white;
2529 padding : 30px ;
2630 border-radius : 10px ;
2731 box-shadow : 0 5px 15px rgba (0 , 0 , 0 , 0.1 );
2832 text-align : center;
2933 }
30-
3134 h1 {
3235 color : # 2c3e50 ;
3336 margin-bottom : 20px ;
34- font-weight : 600 ;
35- }
36-
37- .status {
38- font-size : 1.1em ;
39- margin : 20px 0 ;
4037 }
41-
42- .highlight {
43- font-weight : bold;
44- color : # 3498db ;
45- }
46-
4738 .progress-container {
4839 width : 100% ;
4940 background-color : # e9ecef ;
5041 border-radius : 10px ;
51- padding : 3px ;
5242 margin : 25px 0 ;
5343 }
54-
5544 .progress-bar {
5645 height : 20px ;
5746 background : linear-gradient (90deg , # 4caf50, # 8bc34a );
58- border-radius : 7px ;
59- transition : width 0.5s ease;
60- display : flex;
61- align-items : center;
62- justify-content : center;
47+ border-radius : 10px ;
48+ text-align : center;
6349 color : white;
64- font-size : 0.8em ;
65- font-weight : bold;
66- text-shadow : 0 1px 1px rgba (0 , 0 , 0 , 0.2 );
50+ line-height : 20px ;
6751 }
68-
6952 .info-grid {
7053 display : grid;
7154 grid-template-columns : 1fr 1fr ;
7255 gap : 15px ;
7356 margin : 20px 0 ;
74- text-align : left;
7557 }
76-
7758 .info-box {
7859 background-color : # f0f4f8 ;
7960 padding : 15px ;
8061 border-radius : 8px ;
8162 border-left : 4px solid # 3498db ;
63+ text-align : left;
8264 }
83-
84- .info-box h3 {
85- margin-top : 0 ;
86- font-size : 1em ;
87- color : # 666 ;
88- }
89-
90- .info-box p {
91- margin-bottom : 0 ;
92- font-size : 1.2em ;
93- font-weight : 600 ;
94- }
95-
96- .refresh-info {
97- font-size : 0.9em ;
98- color : # 666 ;
65+ .countdown {
9966 margin-top : 20px ;
100- }
101-
102- .logo {
103- margin-bottom : 20px ;
104- font-size : 2em ;
67+ color : # 666 ;
10568 font-weight : bold;
106- color : # 3498db ;
10769 }
10870 </ style >
10971</ head >
11072< body >
11173 < div class ="container ">
112- < div class ="logo "> ⏳</ div >
11374 < h1 > You're in the queue</ h1 >
11475 < p > Our service is currently experiencing high demand. You've been placed in a queue and will be automatically redirected when it's your turn.</ p >
11576
116- < div class ="progress-container ">
11777 < div class ="progress-container ">
11878 < div class ="progress-bar " style ="width: [[.ProgressPercentage]]%; "> [[.ProgressPercentage]]%</ div >
11979 </ div >
80+
12081 < div class ="info-grid ">
12182 < div class ="info-box ">
12283 < h3 > Your position</ h3 >
123- < p > < span class =" highlight " > [[.Position]]</ span > of [[.QueueSize]]</ p >
84+ < p > < strong > [[.Position]]</ strong > of [[.QueueSize]]</ p >
12485 </ div >
12586 < div class ="info-box ">
12687 < h3 > Estimated wait time</ h3 >
127- < p > < span class =" highlight " > [[.EstimatedWaitTime]]</ span > minutes</ p >
88+ < p > < strong > [[.EstimatedWaitTime]]</ strong > minutes</ p >
12889 </ div >
12990 </ div >
13091
131- < div class ="status ">
132- [[.Message]]
133- </ div >
92+ < p > [[.Message]]</ p >
13493
135- < div class ="refresh-info ">
94+ < div id =" countdown " class ="countdown ">
13695 This page will automatically refresh in [[.RefreshInterval]] seconds.
13796 </ div >
13897 </ div >
98+
99+ <!-- JavaScript that ensures page refresh -->
100+ < script >
101+ // Countdown timer
102+ let countdown = [ [ . RefreshInterval ] ] ;
103+ const countdownElement = document . getElementById ( 'countdown' ) ;
104+
105+ function updateCountdown ( ) {
106+ countdown -- ;
107+ if ( countdown <= 0 ) {
108+ window . location . reload ( ) ;
109+ } else {
110+ countdownElement . innerText = `This page will automatically refresh in ${ countdown } seconds.` ;
111+ }
112+ }
113+
114+ // Update countdown every second
115+ setInterval ( updateCountdown , 1000 ) ;
116+
117+ // Force refresh as a backup
118+ setTimeout ( function ( ) {
119+ window . location . reload ( ) ;
120+ } , [ [ . RefreshInterval ] ] * 1000 ) ;
121+ </ script >
139122</ body >
140123</ html >
0 commit comments