Skip to content

Commit 43138ef

Browse files
committed
styling
1 parent 433d30c commit 43138ef

File tree

4 files changed

+66
-15
lines changed

4 files changed

+66
-15
lines changed

src/app.css

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
*,
2+
*::before,
3+
*::after {
4+
box-sizing: border-box;
5+
-webkit-font-smoothing: antialiased;
6+
-moz-osx-font-smoothing: grayscale;
7+
}
8+
9+
html,
10+
body {
11+
height: 100%;
12+
overflow: hidden;
13+
}
14+
15+
body {
16+
font-family: Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
17+
Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
18+
19+
background-color: #202224;
20+
margin: 0 1rem;
21+
color: #f0f1f2;
22+
}
23+
24+
a {
25+
font-size: 1.25rem;
26+
color: #50b7e0;
27+
}

src/routes/(app)/+layout.svelte

+34-13
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,39 @@
3434
</script>
3535

3636
<main>
37-
{#if data.user}
38-
<h2>Welcome, {data.user.id}!</h2>
39-
<form action="/logout" method="POST">
40-
<button type="submit">Logout</button>
41-
</form>
42-
{:else}
43-
<a
44-
href={url.toString()}
45-
on:click={() => {
46-
window.localStorage.setItem('state', state);
47-
}}>Connect with Twitch</a
48-
>
49-
{/if}
37+
<div class="header">
38+
{#if data.user}
39+
<h2>Welcome, {data.user.email}!</h2>
40+
<form action="/logout" method="POST">
41+
<button type="submit">Logout</button>
42+
</form>
43+
{:else}
44+
<a
45+
href={url.toString()}
46+
on:click={() => {
47+
window.localStorage.setItem('state', state);
48+
}}>Connect with Twitch</a
49+
>
50+
{/if}
51+
</div>
5052
<slot />
5153
</main>
54+
55+
<style>
56+
.header {
57+
display: flex;
58+
justify-content: space-between;
59+
align-items: center;
60+
margin: 1rem 0;
61+
}
62+
63+
h2 {
64+
margin: 0;
65+
font-size: 1.25rem;
66+
}
67+
68+
button {
69+
cursor: pointer;
70+
font-size: 1.25rem;
71+
}
72+
</style>

src/routes/(app)/+page.svelte

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
<h1>Welcome to SvelteKit</h1>
2-
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
1+
<h1>Welcome to a SvelteKit + Pocketbase OAuth2 Demo</h1>

src/routes/+layout.svelte

+4
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
<script lang="ts">
2+
import '../app.css';
3+
</script>
4+
15
<slot />

0 commit comments

Comments
 (0)