errorPage.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <!DOCTYPE html>
  2. <?php /** @var \Spatie\Ignition\ErrorPage\ErrorPageViewModel $viewModel */ ?>
  3. <html lang="en" class="<?= $viewModel->theme() ?>">
  4. <!--
  5. <?= $viewModel->throwableString() ?>
  6. -->
  7. <head>
  8. <!-- Hide dumps asap -->
  9. <style>
  10. pre.sf-dump {
  11. display: none !important;
  12. }
  13. </style>
  14. <meta charset="UTF-8">
  15. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  16. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  17. <meta name="robots" content="noindex, nofollow">
  18. <title><?= $viewModel->title() ?></title>
  19. <script>
  20. // Livewire modals remove CSS classes on the `html` element so we re-add
  21. // the theme class again using JavaScript.
  22. document.documentElement.classList.add('<?= $viewModel->theme() ?>');
  23. // Process `auto` theme as soon as possible to avoid flashing of white background.
  24. if (document.documentElement.classList.contains('auto') && window.matchMedia('(prefers-color-scheme: dark)').matches) {
  25. document.documentElement.classList.add('dark');
  26. }
  27. </script>
  28. <style><?= $viewModel->getAssetContents('ignition.css') ?></style>
  29. <?= $viewModel->customHtmlHead() ?>
  30. </head>
  31. <body class="scrollbar-lg">
  32. <script>
  33. window.data = <?=
  34. $viewModel->jsonEncode([
  35. 'report' => $viewModel->report(),
  36. 'shareableReport' => $viewModel->shareableReport(),
  37. 'config' => $viewModel->config(),
  38. 'solutions' => $viewModel->solutions(),
  39. 'updateConfigEndpoint' => $viewModel->updateConfigEndpoint(),
  40. ])
  41. ?>;
  42. </script>
  43. <!-- The noscript representation is for HTTP client like Postman that have JS disabled. -->
  44. <noscript>
  45. <pre><?= $viewModel->throwableString() ?></pre>
  46. </noscript>
  47. <div id="app"></div>
  48. <script>
  49. <?= $viewModel->getAssetContents('ignition.js') ?>
  50. </script>
  51. <script>
  52. window.ignite(window.data);
  53. </script>
  54. <?= $viewModel->customHtmlBody() ?>
  55. <!--
  56. <?= $viewModel->throwableString() ?>
  57. -->
  58. </body>
  59. </html>