@@ -18,21 +18,30 @@ $messages = [
18
18
$ message = isset ($ messages [$ code ]) ? $ messages [$ code ] : $ messages [0 ];
19
19
20
20
?>
21
- <!DOCTYPE html>
21
+ <!DOCTYPE html><!-- "' --></textarea></script></style></pre></xmp></a></audio></button></canvas></datalist></details></dialog></iframe></listing></meter></noembed></noframes></noscript></optgroup></option></progress></rp></select></table></template></title></video>
22
22
<meta charset="utf-8">
23
23
<meta name=robots content=noindex>
24
24
<meta name=generator content="Nette Framework">
25
+ <title><?= $ message [0 ] ?> </title>
26
+
25
27
<style>
26
- body { color: #333; background: white; width: 500px; margin: 100px auto }
27
- h1 { font: bold 47px/1.5 sans-serif; margin: .6em 0 }
28
- p { font: 21px/1.5 Georgia,serif; margin: 1.5em 0 }
29
- small { font-size: 70%; color: gray }
28
+ #nette-error { all: initial; position: absolute; top: 0; left: 0; right: 0; height: 70vh; min-height: 400px; display: flex; align-items: center; justify-content: center; z-index: 1000 }
29
+ #nette-error div { all: initial; max-width: 550px; background: white; color: #333; display: block }
30
+ #nette-error h1 { all: initial; font: bold 50px/1.1 sans-serif; display: block; margin: 40px }
31
+ #nette-error p { all: initial; font: 20px/1.4 sans-serif; margin: 40px; display: block }
32
+ #nette-error small { color: gray }
30
33
</style>
31
34
32
- <title><?= $ message [0 ] ?> </title>
35
+ <div id=nette-error>
36
+ <div>
37
+ <h1><?= $ message [0 ] ?> </h1>
33
38
34
- <h1 ><?= $ message [0 ] ?> </h1 >
39
+ <p ><?= $ message [1 ] ?> </p >
35
40
36
- <p><?= $ message [1 ] ?> </p>
41
+ <?php if ($ code ): ?> <p><small>error <?= $ code ?> </small></p><?php endif ?>
42
+ </div>
43
+ </div>
37
44
38
- <?php if ($ code ): ?> <p><small>error <?= $ code ?> </small></p><?php endif ?>
45
+ <script>
46
+ document.body.insertBefore(document.getElementById('nette-error'), document.body.firstChild);
47
+ </script>
0 commit comments