Index.vue 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <script setup>
  2. import { computed } from 'vue'
  3. import { Head, Link } from '@inertiajs/inertia-vue3'
  4. const props = defineProps({
  5. status: null,
  6. })
  7. const title = computed(() => {
  8. return {
  9. 503: '503: Service Unavailable',
  10. 500: '500: Server Error',
  11. 404: '404: Page Not Found',
  12. 403: '403: Forbidden',
  13. }[props.status]
  14. })
  15. const description = computed(() => {
  16. return {
  17. 503: 'Sorry, we are doing some maintenance. Please check back soon.',
  18. 500: 'Whoops, something went wrong on our servers.',
  19. 404: 'Sorry, the page you are looking for could not be found.',
  20. 403: 'Sorry, you are forbidden from accessing this page.',
  21. }[props.status]
  22. })
  23. </script>
  24. <template>
  25. <Head :title="title" />
  26. <div
  27. class="surface-0 flex align-items-center justify-content-center min-h-screen min-w-screen overflow-hidden"
  28. >
  29. <div class="grid justify-content-center p-2 lg:p-0" style="min-width: 80%">
  30. <div class="col-12 mt-5 xl:mt-0 text-center">
  31. <img
  32. src="/images/logo.svg"
  33. alt="Brand Logo"
  34. class="mb-5"
  35. style="width: 81px; height: 60px"
  36. />
  37. </div>
  38. <div class="col-12 xl:col-6 border-gradient">
  39. <div class="h-full w-full m-0 py-7 px-4 bg-gradient">
  40. <div class="grid flex flex-column align-items-center">
  41. <div
  42. class="flex justify-content-center align-items-center bg-pink-500 border-circle"
  43. style="height: 3.2rem; width: 3.2rem"
  44. >
  45. <i class="pi pi-fw pi-exclamation-circle text-2xl text-50"></i>
  46. </div>
  47. <h1 class="font-bold text-5xl text-900 mb-2">{{ title }}</h1>
  48. <span class="text-600">{{ description }}</span>
  49. <div class="col-12 mt-5 text-center">
  50. <i
  51. class="pi pi-fw pi-arrow-left text-blue-500 mr-2"
  52. style="vertical-align: center"
  53. ></i>
  54. <Link href="/" class="text-blue-500">Kembali ke Dashboard</Link>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </template>
  62. <style lang="scss" scoped>
  63. .border-gradient {
  64. border-radius: 4px;
  65. padding: 0.3rem;
  66. background: linear-gradient(
  67. 180deg,
  68. rgba(233, 30, 99, 0.4) 10%,
  69. rgba(33, 150, 243, 0) 30%
  70. );
  71. }
  72. .bg-gradient {
  73. border-radius: 3px;
  74. background: linear-gradient(
  75. 180deg,
  76. var(--surface-50) 38.9%,
  77. var(--surface-0)
  78. );
  79. }
  80. </style>