Skip to content

Commit

Permalink
Add resources
Browse files Browse the repository at this point in the history
  • Loading branch information
f3l1x committed Jul 31, 2023
1 parent 9da9258 commit dbe1abb
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
65 changes: 65 additions & 0 deletions src/resources/500.html
@@ -0,0 +1,65 @@
<!DOCTYPE html><!-- "' --></script></style></noscript></xmp>
<meta charset="utf-8">
<meta name="robots" content="noindex">
<title>Server Error</title>

<style>
#error-body { background: white; width: 500px; margin: 70px auto; padding: 10px 20px }
#error-body h1 { font: bold 47px/1.5 sans-serif; background: none; color: #333; margin: .6em 0 }
#error-body p { font: 21px/1.5 Georgia,serif; background: none; color: #333; margin: 1.5em 0 }
#error-body small { font-size: 70%; color: gray }
</style>

<div id="error-body">
<h1>Server Error</h1>

<p>We're sorry! The server encountered an internal error and
was unable to complete your request. Please try again later.</p>

<p><small>HTTP 500 - Internal Server Error</small></p>
</div>


<?php

/**
* Default error page.
*/

declare(strict_types=1);

namespace Tracy;

/**
* @var bool $logged
*/
?>
<!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>
<meta charset="utf-8">
<meta name=robots content=noindex>
<meta name=generator content="Tracy">
<title>Server Error</title>

<style>
#tracy-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 }
#tracy-error div { all: initial; max-width: 550px; background: white; color: #333; display: block }
#tracy-error h1 { all: initial; font: bold 50px/1.1 sans-serif; display: block; margin: 40px }
#tracy-error p { all: initial; font: 20px/1.4 sans-serif; margin: 40px; display: block }
#tracy-error small { color: gray }
#tracy-error small span { color: silver }
</style>

<div id=tracy-error>
<div>
<h1>Server Error</h1>

<p>We're sorry! The server encountered an internal error and
was unable to complete your request. Please try again later.</p>

<p><small>error 500 <span> | <?php echo date('j. n. Y H:i') ?></span><?php if (!$logged): ?><br>Tracy is unable to log error.<?php endif ?></small></p>
</div>
</div>

<script>
document.body.insertBefore(document.getElementById('tracy-error'), document.body.firstChild);
</script>
4 changes: 4 additions & 0 deletions src/resources/500.json
@@ -0,0 +1,4 @@
{
"code": 500,
"error": "Internal server error"
}
1 change: 1 addition & 0 deletions src/resources/500.txt
@@ -0,0 +1 @@
Internal server error

0 comments on commit dbe1abb

Please sign in to comment.