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:
Rodrigo Pinto 2024-11-19 01:46:59 -03:00
commit c8a02fb468
20 changed files with 232 additions and 1308 deletions

View 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>

View 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>

View file

@ -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>

View 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>