Replicate basic layout from POC
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
<script lang="ts">
|
||||
let { image = $bindable('') } = $props()
|
||||
let {
|
||||
image = $bindable(''),
|
||||
edit = $bindable(true)
|
||||
} = $props()
|
||||
|
||||
let fileinput: HTMLInputElement
|
||||
|
||||
@@ -34,6 +37,6 @@
|
||||
@import 'tailwindcss';
|
||||
|
||||
#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>
|
||||
@@ -2,16 +2,17 @@
|
||||
import ImageTarget from "./imageTarget.svelte"
|
||||
import TextEditor from "./textEditor.svelte"
|
||||
|
||||
let image = $state('')
|
||||
let content = $state('')
|
||||
let editorState = $state({editor: null})
|
||||
|
||||
let edit = true
|
||||
let {
|
||||
edit = $bindable(true),
|
||||
image = $bindable(''),
|
||||
content = $bindable(''),
|
||||
editorState = $bindable({editor: null})
|
||||
} = $props()
|
||||
|
||||
function getContent() {
|
||||
return editorState.editor.getJSON()
|
||||
}
|
||||
</script>
|
||||
|
||||
<ImageTarget bind:image />
|
||||
<ImageTarget bind:image bind:edit />
|
||||
<TextEditor bind:content bind:editorState bind:edit />
|
||||
@@ -1,5 +1,17 @@
|
||||
<script lang="ts">
|
||||
import Calendar from '$lib/components/calendar.svelte'
|
||||
import Editor from '$lib/components/editor/index.svelte';
|
||||
|
||||
let edit = $state(true)
|
||||
</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>
|
||||
Reference in New Issue
Block a user