A lot of stuff
This commit is contained in:
parent
a1c9b30cf6
commit
ad969e5807
13 changed files with 227 additions and 167 deletions
|
@ -29,7 +29,6 @@
|
|||
}
|
||||
|
||||
#header {
|
||||
border-bottom: var(--dark-2) solid 2px;
|
||||
width: calc(100% - 30px);
|
||||
|
||||
}
|
||||
|
|
28
src/lib/components/Form.svelte
Normal file
28
src/lib/components/Form.svelte
Normal file
|
@ -0,0 +1,28 @@
|
|||
<script>
|
||||
import Area from '$lib/components/Area.svelte';
|
||||
import { handleSubmit } from '$lib/util.js';
|
||||
|
||||
export let form = {};
|
||||
export let action = '/';
|
||||
export let name = 'Empty form';
|
||||
|
||||
let submitFunc = async e => form = JSON.parse(await handleSubmit(e))
|
||||
</script>
|
||||
|
||||
<Area handleSubmit=''>
|
||||
<span slot="header">
|
||||
{name}
|
||||
</span>
|
||||
|
||||
<span slot='main'>
|
||||
<form action={action} on:submit|preventDefault={submitFunc} method='POST'>
|
||||
<slot></slot>
|
||||
</form>
|
||||
</span>
|
||||
<p slot="footer">
|
||||
{#if form?.success}
|
||||
<p>{form?.success}</p>
|
||||
{/if}
|
||||
By using the Sanifae service, you agree to the <a href='/tos'>Terms of Service</a>.
|
||||
</p>
|
||||
</Area>
|
|
@ -70,6 +70,7 @@
|
|||
width: 50px;
|
||||
height: 50px;
|
||||
margin-right: 10px;
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.date {
|
||||
|
@ -94,7 +95,7 @@
|
|||
{:else}
|
||||
<Area>
|
||||
<span slot="header" id='header'>
|
||||
<img class='pfp' src='/pfp/{username}.png'/>
|
||||
<img class='pfp' src='/img/pfp/{username}.png'/>
|
||||
<div class='header-area'>
|
||||
<div><a href='/users/{username}'>
|
||||
{username}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue