forked from evilfactorylabs/evilfactorylabs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create top-level wrapper route components
- Loading branch information
Fariz Rizaldy
committed
Jan 13, 2020
1 parent
6f5964c
commit 5e689f5
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<script> | ||
import Container from '../components/Container' | ||
export let status | ||
export let error | ||
const dev = process.env.NODE_ENV === 'development' | ||
</script> | ||
|
||
<style> | ||
h1, | ||
p { | ||
margin: 0 auto; | ||
} | ||
h1 { | ||
font-size: 2.8em; | ||
font-weight: 700; | ||
margin: 0 0 0.5em 0; | ||
} | ||
p { | ||
font-size: 2rem; | ||
margin: 1em auto; | ||
} | ||
@media (min-width: 480px) { | ||
h1 { | ||
font-size: 4em; | ||
} | ||
} | ||
</style> | ||
|
||
<svelte:head> | ||
<title>{status} - {error.message}</title> | ||
</svelte:head> | ||
|
||
<Container> | ||
<h1>{status}</h1> | ||
|
||
<p>{error.message}. But we have trace this, thank you.</p> | ||
|
||
<a href="/">Back to home</a> | ||
|
||
{#if dev && error.stack} | ||
<pre>{error.stack}</pre> | ||
{/if} | ||
</Container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<script> | ||
import Navbar from '../components/Navbar' | ||
</script> | ||
|
||
<main> | ||
<slot /> | ||
<Navbar /> | ||
</main> |