Navigation bar and empty login page
- Added nav bar; - Added an empty login page - Fixed .gitignore, which had been overwritten on previous commit.
This commit is contained in:
parent
ce4b899320
commit
c8a02fb468
20 changed files with 232 additions and 1308 deletions
25
packages/src/routes/+error.svelte
Normal file
25
packages/src/routes/+error.svelte
Normal file
|
@ -0,0 +1,25 @@
|
|||
<script>
|
||||
import { page } from '$app/stores'
|
||||
</script>
|
||||
|
||||
<div class='error-page'>
|
||||
<h1>Supawiki</h1>
|
||||
|
||||
<h2>Oops... Something went wrong!</h2>
|
||||
|
||||
{#if $page.status === 401}
|
||||
<h3>Error {$page.status}: {$page.error?.message}</h3>
|
||||
<p>
|
||||
Go to <a href="/auth/login">log in</a> page.
|
||||
</p>
|
||||
{:else}
|
||||
<h3>{$page.status}: {$page.error?.message}</h3>
|
||||
<p>We are looking into it.</p>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.error-page {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
56
packages/src/routes/+layout.svelte
Normal file
56
packages/src/routes/+layout.svelte
Normal file
|
@ -0,0 +1,56 @@
|
|||
<script>
|
||||
import NavBar from '$lib/components/nav-bar.svelte'
|
||||
</script>
|
||||
|
||||
<div class='content'>
|
||||
<NavBar />
|
||||
|
||||
<slot></slot>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--border-color: #3b3b3b;
|
||||
--font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
|
||||
--navbar-height: 3em;
|
||||
--theme-background: white;
|
||||
--theme-color: #555555;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
margin: auto;
|
||||
height: calc(100vh - 6em);
|
||||
overflow: clip;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
:global(body) {
|
||||
margin: 0;
|
||||
font-family: var(--font-family);
|
||||
font-weight: 400;
|
||||
background: var(--theme-background);
|
||||
color: var(--theme-color);
|
||||
overflow: clip;
|
||||
}
|
||||
|
||||
:global(button){
|
||||
margin: 1em;
|
||||
width: 10em;
|
||||
height: 3em;
|
||||
font-family: var(--font-family-text);
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
color: var(--button-color);
|
||||
}
|
||||
|
||||
:global(button:hover) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
:global(button:disabled) {
|
||||
background-color: light-dark(rgba(239, 239, 239, 0.3), rgba(19, 1, 1, 0.3));
|
||||
color: light-dark(rgba(16, 16, 16, 0.3), rgba(255, 255, 255, 0.3));
|
||||
border-color: light-dark(rgba(118, 118, 118, 0.3), rgba(195, 195, 195, 0.3));
|
||||
}
|
||||
</style>
|
|
@ -1,2 +1,14 @@
|
|||
<h1>Welcome to SvelteKit</h1>
|
||||
<p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>
|
||||
<script>
|
||||
import { goto } from '$app/navigation'
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Home page</title>
|
||||
<meta name='description' content='Home page'/>
|
||||
</svelte:head>
|
||||
|
||||
<div class='landing-page'>
|
||||
<h1>Private facts</h1>
|
||||
|
||||
<button onclick={() => goto('/auth/login')}>Login</button>
|
||||
</div>
|
||||
|
|
8
packages/src/routes/auth/login/+page.svelte
Normal file
8
packages/src/routes/auth/login/+page.svelte
Normal file
|
@ -0,0 +1,8 @@
|
|||
<svelte:head>
|
||||
<title>Login page</title>
|
||||
<meta name='description' content='Login page'/>
|
||||
</svelte:head>
|
||||
|
||||
<div class='login-content'>
|
||||
<h1>Login</h1>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue