add urllist to page
This commit is contained in:
parent
817d3f3175
commit
b8b1de9b59
|
@ -57,7 +57,7 @@
|
||||||
a {
|
a {
|
||||||
color: var(--link)
|
color: var(--link)
|
||||||
}
|
}
|
||||||
code {
|
code, pre {
|
||||||
font-family: "Space Mono", monospace, monospace;
|
font-family: "Space Mono", monospace, monospace;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -3,4 +3,8 @@ export async function load({ request, parent }) {
|
||||||
const { user } = await parent();
|
const { user } = await parent();
|
||||||
if (!user)
|
if (!user)
|
||||||
launchLogin(request)
|
launchLogin(request)
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: request.url
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { User } from "$lib/types";
|
import type { User } from "$lib/types";
|
||||||
|
|
||||||
export let data: {user: User};
|
export let data: {user: User, url: string};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
@ -30,12 +30,40 @@
|
||||||
form > label {
|
form > label {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
summary::marker {
|
||||||
|
content: ""
|
||||||
|
}
|
||||||
|
summary {
|
||||||
|
color: var(--link);
|
||||||
|
cursor:pointer;
|
||||||
|
}
|
||||||
|
details > div {
|
||||||
|
border-left: 0.25em solid var(--link);
|
||||||
|
padding-left: 1em;
|
||||||
|
overflow-x: auto;
|
||||||
|
background-color: var(--crust);
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<h1>Hi, {data.user.name}</h1>
|
<h1>Hi, {data.user.name}</h1>
|
||||||
<p>
|
<p>
|
||||||
The <code>sub</code> claim is set to <code>{data.user.sub}</code>.
|
<details>
|
||||||
Your identifier is <code>{data.user.identifier}</code>.
|
<summary>View user information...</summary>
|
||||||
|
<div>
|
||||||
|
<pre>{JSON.stringify(data.user, null, 4)}</pre>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
<details>
|
||||||
|
<summary>Avatar URLs...</summary>
|
||||||
|
<div>
|
||||||
|
<ul>
|
||||||
|
{#each ["", "32", "64", "128", "256", "512"] as variant}
|
||||||
|
<li>{new URL(`/avatar/${data.user.identifier}/${variant}`, data.url)}</li>
|
||||||
|
{/each}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
</p>
|
</p>
|
||||||
<form method="post" enctype="multipart/form-data">
|
<form method="post" enctype="multipart/form-data">
|
||||||
<label for="newAvatar">Set a new avatar:</label>
|
<label for="newAvatar">Set a new avatar:</label>
|
||||||
|
|
Loading…
Reference in a new issue