|
1 | 1 | {{define "base"}} |
2 | | -<html> |
| 2 | +<html lang="en"> |
3 | 3 | <head> |
4 | | - <!-- refresh the page --> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
5 | 6 | <title>Preparing your environment | Lagoon</title> |
6 | 7 | <meta http-equiv="refresh" content="{{ .RefreshInterval }}"> |
| 8 | + <meta name="robots" content="noindex, nofollow"> |
7 | 9 | <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> |
8 | | - <script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha384-vk5WoKIaW/vJyUAd9n/wmopsmNhiy+L2Z+SBxGYnUkunIxVxAv/UtMOhba/xskxh" crossorigin="anonymous"></script> |
9 | | - <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script> |
10 | | - <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script> |
11 | 10 | <style> |
12 | 11 | /* |
13 | | - * Globals |
14 | | - */ |
15 | | - /* Custom default button */ |
| 12 | + * Globals |
| 13 | + */ |
16 | 14 | .btn-secondary, |
17 | 15 | .btn-secondary:hover, |
18 | 16 | .btn-secondary:focus { |
19 | | - color: #333; |
20 | | - text-shadow: none; /* Prevent inheritance from `body` */ |
| 17 | + color: #333; |
| 18 | + text-shadow: none; /* Prevent inheritance from `body` */ |
21 | 19 | } |
22 | 20 | /* |
23 | | - * Base structure |
24 | | - */ |
| 21 | + * Base structure |
| 22 | + */ |
25 | 23 | body { |
26 | | - text-shadow: 0 .05rem .1rem rgba(0, 0, 0, 0.05); |
27 | | - box-shadow: inset 0 0 25rem rgba(0, 0, 0, .5); |
28 | | - font-size: larger; |
| 24 | + text-shadow: 0 .05rem .1rem rgba(0, 0, 0, 0.05); |
| 25 | + box-shadow: inset 0 0 25rem rgba(0, 0, 0, .5); |
| 26 | + font-size: larger; |
29 | 27 | } |
30 | 28 | .cover-container { |
31 | | - max-width: 60em; |
| 29 | + max-width: 60em; |
32 | 30 | } |
33 | 31 | /* |
34 | | - * Header |
35 | | - */ |
| 32 | + * Header |
| 33 | + */ |
36 | 34 | .nav-masthead .nav-link { |
37 | | - padding: .25rem 0; |
38 | | - font-weight: 700; |
39 | | - color: rgba(255, 255, 255, .5); |
40 | | - background-color: transparent; |
41 | | - border-bottom: .25rem solid transparent; |
| 35 | + padding: .25rem 0; |
| 36 | + font-weight: 700; |
| 37 | + color: rgba(255, 255, 255, .5); |
| 38 | + background-color: transparent; |
| 39 | + border-bottom: .25rem solid transparent; |
42 | 40 | } |
43 | 41 | .nav-masthead .nav-link:hover, |
44 | 42 | .nav-masthead .nav-link:focus { |
45 | | - border-bottom-color: rgba(255, 255, 255, .25); |
| 43 | + border-bottom-color: rgba(255, 255, 255, .25); |
46 | 44 | } |
47 | 45 | .nav-masthead .nav-link + .nav-link { |
48 | | - margin-left: 1rem; |
| 46 | + margin-left: 1rem; |
49 | 47 | } |
50 | 48 | .nav-masthead .active { |
51 | | - color: #fff; |
52 | | - border-bottom-color: #fff; |
| 49 | + color: #fff; |
| 50 | + border-bottom-color: #fff; |
53 | 51 | } |
54 | 52 | </style> |
55 | 53 | </head> |
@@ -84,25 +82,34 @@ <h3 class="float-md-start mb-0">Preparing your environment</h3> |
84 | 82 | </p> |
85 | 83 | </main> |
86 | 84 | <footer class="mt-auto text-dark"> |
87 | | - <p>Refreshing in <span id="countdowntimer">{{ .RefreshInterval }} </span> Seconds</p> |
| 85 | + <p>Refreshing in <span id="countdowntimer">{{ .RefreshInterval }}</span> Seconds</p> |
88 | 86 | <small class="text-muted">If this page persists, contact your Lagoon administrator to check for issues unidling</small> |
89 | 87 | </footer> |
90 | 88 | </div> |
91 | | - <script type="text/javascript"> |
92 | | - var timeleft = {{ .RefreshInterval }}; |
93 | | - var downloadTimer = setInterval(function(){ |
94 | | - timeleft--; |
95 | | - document.getElementById("countdowntimer").textContent = timeleft; |
96 | | - if(timeleft <= 0) |
97 | | - clearInterval(downloadTimer); |
98 | | - },1000); |
| 89 | + <script> |
| 90 | + var timeleft = {{ .RefreshInterval }}; |
| 91 | + var downloadTimer = setInterval(function() { |
| 92 | + timeleft--; |
| 93 | + var countdownElement = document.getElementById('countdowntimer'); |
| 94 | + if (countdownElement) { |
| 95 | + countdownElement.textContent = timeleft; |
| 96 | + } |
| 97 | + if (timeleft <= 0) { |
| 98 | + clearInterval(downloadTimer); |
| 99 | + } |
| 100 | + }, 1000); |
| 101 | + </script> |
99 | 102 | {{if ne .Verifier ""}} |
100 | | - var host = window.location.origin; |
101 | | - jQuery(document).ready(function(){ |
102 | | - jQuery.get(host+"?verifier={{ .Verifier }}", () => {}); |
103 | | - }); |
104 | | - {{ end }} |
| 103 | + <script> |
| 104 | + const host = window.location.origin; |
| 105 | + document.addEventListener('DOMContentLoaded', () => { |
| 106 | + fetch( |
| 107 | + host + '?verifier={{ .Verifier }}', |
| 108 | + { method: 'GET' } |
| 109 | + ); |
| 110 | + }); |
105 | 111 | </script> |
| 112 | + {{ end }} |
106 | 113 | </body> |
107 | 114 | </html> |
108 | 115 | {{end}} |
0 commit comments