File tree 1 file changed +36
-2
lines changed
1 file changed +36
-2
lines changed Original file line number Diff line number Diff line change 1
1
{{ define "main" }}
2
- < div class ="bg-white ">
2
+ < script >
3
+ function redirectPage ( ) {
4
+ const pageRedirects = { } ;
5
+
6
+ const path = window . location . pathname ;
7
+
8
+ if ( pageRedirects [ path ] ) {
9
+ document . getElementById ( "404-content" ) . style . display = "none" ;
10
+ document . getElementById ( "redirect-content" ) . style . display = "block" ;
11
+ const newUrl = pageRedirects [ path ] ;
12
+ document . getElementById ( "redirect-link" ) . href = newUrl ;
13
+ window . location . replace ( newUrl ) ;
14
+ }
15
+ }
16
+
17
+ window . onload = function ( ) {
18
+ redirectPage ( ) ;
19
+ } ;
20
+ </ script >
21
+ < div class ="isolate ">
3
22
< main class ="mx-auto w-full max-w-7xl px-6 lg:px-8 ">
4
23
< div class ="mx-auto max-w-xl py-16 sm:py-24 ">
5
- < div class ="text-center ">
24
+ < div id =" 404-content " class ="text-center ">
6
25
< p class ="text-base font-semibold text-indigo-600 "> 404</ p >
7
26
< h1
8
27
class ="mt-2 text-4xl font-bold tracking-tight text-gray-900 sm:text-5xl ">
12
31
The page you are looking for could not be found.
13
32
</ p >
14
33
</ div >
34
+ < div id ="redirect-content " style ="display: none; " class ="text-center ">
35
+ < h1
36
+ class ="mt-2 text-4xl font-bold tracking-tight text-gray-900 sm:text-5xl ">
37
+ Redirecting...
38
+ </ h1 >
39
+ < p class ="mt-2 text-lg text-gray-500 ">
40
+ If you're not redirected automatically,
41
+ < a
42
+ id ="redirect-link "
43
+ class ="text-base font-semibold text-indigo-600 "
44
+ href ="# ">
45
+ click here
46
+ </ a >
47
+ </ p >
48
+ </ div >
15
49
</ div >
16
50
</ main >
17
51
</ div >
You can’t perform that action at this time.
0 commit comments