From 55ac4b7502eed02418326a737ee0aab203faae58 Mon Sep 17 00:00:00 2001 From: OleSTEEP Date: Sun, 28 Sep 2025 00:22:55 +0300 Subject: [PATCH] some kind of reactivity --- README.md | 4 +++ .../src/lib/components/create_button.svelte | 6 ++++- .../src/lib/components/horisontal_bar.svelte | 13 +++++++-- .../src/lib/components/horisontal_item.svelte | 7 +++++ vnshed/src/routes/+layout.svelte | 27 ++++++++++++++----- 5 files changed, 47 insertions(+), 10 deletions(-) create mode 100644 README.md create mode 100644 vnshed/src/lib/components/horisontal_item.svelte diff --git a/README.md b/README.md new file mode 100644 index 0000000..64513c6 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# Ситуация + +На свелте мне нравится что получается что-то, но пока не нравится что получается. +Как будто бы надо будет сделать больбшой рефакторинг, но пока пускай будет хоть что-то. \ No newline at end of file diff --git a/vnshed/src/lib/components/create_button.svelte b/vnshed/src/lib/components/create_button.svelte index e63d230..fa52e37 100644 --- a/vnshed/src/lib/components/create_button.svelte +++ b/vnshed/src/lib/components/create_button.svelte @@ -1,4 +1,8 @@ + +
- +
\ No newline at end of file diff --git a/vnshed/src/lib/components/horisontal_bar.svelte b/vnshed/src/lib/components/horisontal_bar.svelte index c526646..3dabf63 100644 --- a/vnshed/src/lib/components/horisontal_bar.svelte +++ b/vnshed/src/lib/components/horisontal_bar.svelte @@ -31,15 +31,24 @@ } -->

{label}

{#if type == "text"} - {}} /> + {#each items as item} + + {/each} + { + items.push("test"); + value = items; + }} /> {:else if type == "image"} {/if} diff --git a/vnshed/src/lib/components/horisontal_item.svelte b/vnshed/src/lib/components/horisontal_item.svelte new file mode 100644 index 0000000..2a71fca --- /dev/null +++ b/vnshed/src/lib/components/horisontal_item.svelte @@ -0,0 +1,7 @@ + + +
+ {text} +
\ No newline at end of file diff --git a/vnshed/src/routes/+layout.svelte b/vnshed/src/routes/+layout.svelte index 7b67679..651db22 100644 --- a/vnshed/src/routes/+layout.svelte +++ b/vnshed/src/routes/+layout.svelte @@ -7,6 +7,19 @@ import QueueItem from '$lib/components/queue_item.svelte'; let { children } = $props(); + + let page_data = { + title: "", + description: "", + time_to_read: "", + genres: [], + tags: [], + badges: [] + } + + function send_json() { + console.log(JSON.stringify(page_data)) + } @@ -21,15 +34,15 @@
- + - +

Время на чтение

- @@ -37,9 +50,9 @@
- - - + + +

Скриншоты

@@ -57,7 +70,7 @@
- +