frontend: initial author block
This commit is contained in:
parent
f4e9090dae
commit
f36d5aac0c
5 changed files with 47 additions and 3 deletions
|
@ -25,7 +25,6 @@
|
||||||
/* Кнопка "плюс" */
|
/* Кнопка "плюс" */
|
||||||
.plus {
|
.plus {
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
aspect-ratio: 1 / 1;
|
|
||||||
font-size: x-large;
|
font-size: x-large;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
38
frontend/src/lib/components/authors.svelte
Normal file
38
frontend/src/lib/components/authors.svelte
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
<script>
|
||||||
|
import Image from "./image.svelte";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="authors input rounded">
|
||||||
|
<Image shape="round"/>
|
||||||
|
<div>
|
||||||
|
<input type="text" class="input dotted rounded" placeholder="Название">
|
||||||
|
<textarea class="input dotted rounded" placeholder="Описание" rows="3"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.authors {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.authors div {
|
||||||
|
display: grid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dotted {
|
||||||
|
margin: 0.25rem !important;
|
||||||
|
border: 0.15rem dashed;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: light) {
|
||||||
|
.dotted {
|
||||||
|
border-color: #CCCCCC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.dotted {
|
||||||
|
border-color: #CCCCCC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -1,6 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import AddButton from "./add_button.svelte";
|
import AddButton from "./add_button.svelte";
|
||||||
let { direction = "horisontal" } = $props();
|
let { direction = "horisontal", shape = "rounded" } = $props();
|
||||||
let images = $state();
|
let images = $state();
|
||||||
let image = $state();
|
let image = $state();
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="{direction} input img-div rounded">
|
<div class="{direction} input img-div {shape}">
|
||||||
<AddButton type="image" bind:files={images}/>
|
<AddButton type="image" bind:files={images}/>
|
||||||
<img bind:this={image} src="" alt="">
|
<img bind:this={image} src="" alt="">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -31,6 +31,7 @@ button {
|
||||||
.round {
|
.round {
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
aspect-ratio: 1 / 1 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Закруглённый элемент */
|
/* Закруглённый элемент */
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import favicon from '$lib/assets/favicon.svg';
|
import favicon from '$lib/assets/favicon.svg';
|
||||||
|
|
||||||
|
import Authors from '$lib/components/authors.svelte';
|
||||||
import Calendar from '$lib/components/calendar.svelte';
|
import Calendar from '$lib/components/calendar.svelte';
|
||||||
import CreateButton from '$lib/components/create_button.svelte';
|
import CreateButton from '$lib/components/create_button.svelte';
|
||||||
import Image from '$lib/components/image.svelte';
|
import Image from '$lib/components/image.svelte';
|
||||||
|
@ -38,6 +40,10 @@
|
||||||
<!-- Описание -->
|
<!-- Описание -->
|
||||||
<textarea class="input rounded" placeholder="Описание" rows="4" bind:value={page_data["description"]}></textarea>
|
<textarea class="input rounded" placeholder="Описание" rows="4" bind:value={page_data["description"]}></textarea>
|
||||||
|
|
||||||
|
<!-- Авторы -->
|
||||||
|
<p>Авторы</p>
|
||||||
|
<Authors />
|
||||||
|
|
||||||
<!-- Время на чтение -->
|
<!-- Время на чтение -->
|
||||||
<div class="horisontal-bar">
|
<div class="horisontal-bar">
|
||||||
<p>Время на чтение</p>
|
<p>Время на чтение</p>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue