This commit is contained in:
Julian Lobbes 2023-06-04 13:04:27 +02:00
parent d9cd2bda60
commit 4e4036896e
4 changed files with 12 additions and 3 deletions

View file

@ -5,12 +5,13 @@ PUBLIC_TITLE="Example TODO App"
PUBLIC_DESCRIPTION="An example TODO app built with sveltekit and fastapi."
PUBLIC_AUTHOR="John Doe"
# These set how node serves the sveltekit app
HOST="0.0.0.0"
PORT="3000"
# WARNING: only set these if running behind a trusted reverse proxy!
# See `https://kit.svelte.dev/docs/adapter-node#environment-variables-origin-protocol-header-and-host-header`.
ORIGIN=http://localhost
#ORIGIN=http://localhost
PROTOCOL_HEADER="x-forwarded-proto"
HOST_HEADER="x-forwarded-host"

View file

@ -1,5 +1,5 @@
# See `https://kit.svelte.dev/docs/adapter-node#environment-variables-origin-protocol-header-and-host-header`.
ORIGIN=http://localhost
ORIGIN=http://localhost:8000
# See `https://kit.svelte.dev/docs/adapter-node#environment-variables-address-header-and-xff-depth`.
ADDRESS_HEADER="X-Forwarded-For"

View file

@ -0,0 +1,7 @@
<script lang="ts">
export let id: string;
export let value: string;
export let disabled: boolean = false;
</script>
<textarea {id} bind:value {disabled}></textarea>

View file

@ -2,6 +2,7 @@
import type { TodoDetailPage } from './+page';
import type { TodoItem } from '$lib/api/types';
import { markdownToHtml } from '$lib/utils/markdown';
import Textarea from '$lib/components/input/Textarea.svelte';
export let data: TodoDetailPage;
@ -33,7 +34,7 @@
<form action="" method="post" on:submit={handleFormSubmit}>
<fieldset>
<div class="field-pair">
<textarea id="title" bind:value={todo.title} disabled={!editingEnabled} on:input={adjustTextareaRows} rows="1" cols="1"></textarea>
<Textarea id="title" value={todo.title}/>
<label for="title">Title</label>
</div>
</fieldset>