Replicate basic layout from POC

This commit is contained in:
2026-02-03 12:31:22 +13:00
parent 7278cc5b4d
commit 783d9016eb
3 changed files with 25 additions and 9 deletions

View File

@@ -1,5 +1,8 @@
<script lang="ts"> <script lang="ts">
let { image = $bindable('') } = $props() let {
image = $bindable(''),
edit = $bindable(true)
} = $props()
let fileinput: HTMLInputElement let fileinput: HTMLInputElement
@@ -34,6 +37,6 @@
@import 'tailwindcss'; @import 'tailwindcss';
#img-upload-button { #img-upload-button {
@apply text-center bg-white/30 h-90 w-full rounded-2xl block hover:text-white/30 transition-all; @apply text-center bg-white/30 h-60 w-full rounded-2xl block hover:text-white/30 transition-all;
} }
</style> </style>

View File

@@ -2,16 +2,17 @@
import ImageTarget from "./imageTarget.svelte" import ImageTarget from "./imageTarget.svelte"
import TextEditor from "./textEditor.svelte" import TextEditor from "./textEditor.svelte"
let image = $state('') let {
let content = $state('') edit = $bindable(true),
let editorState = $state({editor: null}) image = $bindable(''),
content = $bindable(''),
let edit = true editorState = $bindable({editor: null})
} = $props()
function getContent() { function getContent() {
return editorState.editor.getJSON() return editorState.editor.getJSON()
} }
</script> </script>
<ImageTarget bind:image /> <ImageTarget bind:image bind:edit />
<TextEditor bind:content bind:editorState bind:edit /> <TextEditor bind:content bind:editorState bind:edit />

View File

@@ -1,5 +1,17 @@
<script lang="ts"> <script lang="ts">
import Calendar from '$lib/components/calendar.svelte'
import Editor from '$lib/components/editor/index.svelte'; import Editor from '$lib/components/editor/index.svelte';
let edit = $state(true)
</script> </script>
<Editor /> <div class="flex flex-col md:flex-row md:space-x-4 space-y-4 w-full">
<div class="md:w-1/2">
<Calendar />
<div id="entry-list" />
</div>
<div id="right" class="md:w-1/2">
<Editor bind:edit />
</div>
</div>