frontend: containers refactor
This commit is contained in:
parent
5be65229f4
commit
09c0f12692
11 changed files with 126 additions and 72 deletions
9
frontend/src/lib/components/containers/files.svelte
Normal file
9
frontend/src/lib/components/containers/files.svelte
Normal file
|
@ -0,0 +1,9 @@
|
|||
<script>
|
||||
import File from '$lib/components/file.svelte';
|
||||
import AddButton from '$lib/components/add_button.svelte';
|
||||
</script>
|
||||
|
||||
<div class="input rounded">
|
||||
<File />
|
||||
<AddButton type="file"/>
|
||||
</div>
|
25
frontend/src/lib/components/containers/images.svelte
Normal file
25
frontend/src/lib/components/containers/images.svelte
Normal file
|
@ -0,0 +1,25 @@
|
|||
<script lang="ts">
|
||||
import Image from "../image.svelte";
|
||||
|
||||
let { value = $bindable([]) } = $props();
|
||||
|
||||
</script>
|
||||
|
||||
<div class="img-conatiner rounded">
|
||||
<Image />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
/* Горизонтальный список */
|
||||
.img-conatiner {
|
||||
display: flex;
|
||||
overflow-x: scroll;
|
||||
align-content: center;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.img-conatiner :global(*) {
|
||||
margin: 0;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
</style>
|
39
frontend/src/lib/components/containers/marks.svelte
Normal file
39
frontend/src/lib/components/containers/marks.svelte
Normal file
|
@ -0,0 +1,39 @@
|
|||
<script lang="ts">
|
||||
import Mark from "../mark.svelte";
|
||||
import AddButton from "../add_button.svelte";
|
||||
|
||||
let { value = $bindable([]), label = "" } = $props();
|
||||
let items: string[] = $state([]);
|
||||
</script>
|
||||
|
||||
<div class="marks-container input rounded">
|
||||
<p>{label}</p>
|
||||
|
||||
{#each items as item}
|
||||
<Mark text={item}/>
|
||||
{/each}
|
||||
<AddButton handler={() => {
|
||||
items.push("");
|
||||
value = items;
|
||||
}} />
|
||||
|
||||
</div>
|
||||
|
||||
<style>
|
||||
/* Горизонтальный список */
|
||||
.marks-container {
|
||||
display: flex;
|
||||
overflow-x: scroll;
|
||||
align-content: center;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.marks-container :global(*) {
|
||||
margin: 0;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
.marks-container p {
|
||||
align-content: center;
|
||||
}
|
||||
</style>
|
8
frontend/src/lib/components/containers/queue.svelte
Normal file
8
frontend/src/lib/components/containers/queue.svelte
Normal file
|
@ -0,0 +1,8 @@
|
|||
<script>
|
||||
import QueueItem from '$lib/components/queue_item.svelte';
|
||||
</script>
|
||||
|
||||
<div class="input rounded">
|
||||
<QueueItem date="28.11.24" name="Fate/Stay Night (Судьба/Ночь схватки)"/>
|
||||
<QueueItem date="30.11.24" name="Fate/Hollow Ataraxia (Судьба/Святая атараксия)"/>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue