2020-12-24 20:32:05 +02:00
|
|
|
<script>
|
2023-08-02 19:35:27 +01:00
|
|
|
import { goto } from '$app/navigation';
|
|
|
|
|
import { browser } from '$app/environment';
|
2025-11-01 15:49:29 +01:00
|
|
|
import { page } from '$app/state';
|
2024-02-01 20:18:03 +01:00
|
|
|
import { globalStore } from '$lib/utils/store/app';
|
2023-08-02 19:35:27 +01:00
|
|
|
import ErrorIcon from '$lib/components/Icons/ErrorIcon.svelte';
|
|
|
|
|
import ErrorIconDarkMode from '$lib/components/Icons/ErrorIconDarkMode.svelte';
|
2023-07-15 19:45:04 +00:00
|
|
|
|
2025-11-01 15:49:29 +01:00
|
|
|
if (page.status == 404 && browser) {
|
2023-07-15 19:45:04 +00:00
|
|
|
goto('/404');
|
2021-08-21 10:18:10 +03:00
|
|
|
}
|
2025-11-01 15:49:29 +01:00
|
|
|
console.error(page.error?.message);
|
2020-12-24 20:32:05 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<svelte:head>
|
2025-11-01 15:49:29 +01:00
|
|
|
<title>{page.status}</title>
|
2020-12-24 20:32:05 +02:00
|
|
|
</svelte:head>
|
|
|
|
|
|
2023-07-15 19:45:04 +00:00
|
|
|
<div
|
2025-11-01 15:49:29 +01:00
|
|
|
class="error-container m-auto flex h-full flex-col-reverse items-center justify-center py-10 md:flex-col-reverse lg:flex-row dark:bg-black"
|
2023-07-15 19:45:04 +00:00
|
|
|
>
|
2025-11-01 15:49:29 +01:00
|
|
|
<div class="p-2 md:w-full lg:w-2/4">
|
|
|
|
|
<h2 class="w-full text-lg font-medium lg:text-3xl lg:font-normal">Something unexpected occured.</h2>
|
|
|
|
|
<p class="my-6 w-full text-base font-normal text-gray-600 dark:text-white">
|
|
|
|
|
Don't worry, your learning is safe. It isn't your fault, it is ours. We have gotten the error notification and
|
|
|
|
|
will push a fix ASAP. In the meantime, take a short break and come back a bit later.
|
2023-07-15 19:45:04 +00:00
|
|
|
</p>
|
|
|
|
|
<a
|
2025-11-01 15:49:29 +01:00
|
|
|
class="bg-primary-700 hover:bg-primary-900 mt-3 rounded-xl px-9 py-3 text-white transition-all hover:no-underline"
|
2023-11-23 22:18:31 +00:00
|
|
|
href="/">Go Home</a
|
2023-07-15 19:45:04 +00:00
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-11-01 15:49:29 +01:00
|
|
|
<div class="flex w-72 items-center justify-center lg:w-2/4">
|
2023-07-15 19:45:04 +00:00
|
|
|
<!-- to check if it's in dark mode so as to render the appropriate svg -->
|
2024-02-01 20:18:03 +01:00
|
|
|
{#if $globalStore.isDark}
|
2025-11-01 15:49:29 +01:00
|
|
|
<ErrorIcon size="{16}DarkMode" />
|
2023-07-15 19:45:04 +00:00
|
|
|
{:else}
|
2025-11-01 15:49:29 +01:00
|
|
|
<ErrorIcon size={16} />
|
2023-07-15 19:45:04 +00:00
|
|
|
{/if}
|
|
|
|
|
</div>
|
2021-08-21 10:18:10 +03:00
|
|
|
</div>
|
2020-12-24 20:32:05 +02:00
|
|
|
|
2021-07-31 23:06:14 +03:00
|
|
|
<style>
|
2023-07-15 19:45:04 +00:00
|
|
|
.error-container {
|
|
|
|
|
max-width: 964px;
|
2021-07-31 23:06:14 +03:00
|
|
|
}
|
|
|
|
|
</style>
|