fyp/webpage/src/routes/Page404.svelte

47 lines
758 B
Svelte
Raw Normal View History

2024-02-23 23:49:23 +00:00
<script lang="ts">
2024-04-14 15:22:46 +01:00
let { message, goBackLink } = $props<{ message?: string; goBackLink?: string }>();
2024-02-23 23:49:23 +00:00
</script>
<div class="page404">
2024-04-14 15:22:46 +01:00
<div>
<h1>404</h1>
{#if message}
<h2>
{message}
</h2>
{#if goBackLink}
<div class="description">
<a href={goBackLink}> 👈 Go back </a>
</div>
{/if}
{:else}
<h2>Page Not found</h2>
<div class="description">The page you were looking for does not exist</div>
{/if}
</div>
2024-02-23 23:49:23 +00:00
</div>
<style lang="scss">
2024-04-14 15:22:46 +01:00
.page404 {
display: grid;
place-items: center;
height: calc(100vh - 60px);
text-align: center;
2024-02-23 23:49:23 +00:00
2024-04-14 15:22:46 +01:00
h1 {
font-size: 10em;
margin: 0;
}
2024-02-23 23:49:23 +00:00
2024-04-14 15:22:46 +01:00
h2 {
font-size: 5em;
margin: 0;
margin-bottom: 0.3em;
}
2024-02-23 23:49:23 +00:00
2024-04-14 15:22:46 +01:00
div.description {
font-size: 1.5em;
}
}
2024-02-23 23:49:23 +00:00
</style>