frontend: properly designed authors

This commit is contained in:
OleSTEEP 2025-10-16 19:41:26 +03:00
parent 775a7a243e
commit b22c2875c7

View file

@ -1,22 +1,38 @@
<script> <script lang="ts">
import Image from "./image.svelte"; import Image from "./image.svelte";
let data = $state({
title: "",
description: "",
avatar: null
});
</script> </script>
<div class="authors input rounded"> <div class="authors input rounded">
<Image shape="round"/> <Image shape="round" bind:image={data["avatar"]}/>
<div> <div>
<input type="text" class="input dotted rounded" placeholder="Название"> <input type="text" class="input dotted rounded" placeholder="Название" bind:value={data["title"]}>
<textarea class="input dotted rounded" placeholder="Описание" rows="3"></textarea> <textarea class="input dotted rounded" placeholder="Описание" rows="3" bind:value={data["description"]}></textarea>
</div> </div>
</div> </div>
<style> <style>
.authors { .authors {
display: flex; display: grid;
grid-template-columns: 5.5rem auto;
} }
.authors div { .authors div {
display: grid; display: grid;
width: 100%;
}
:global(.authors .img-div) {
width: 5rem;
height: 5rem;
background-color: white;
border: 0.15rem dashed;
} }
.dotted { .dotted {
@ -28,11 +44,20 @@
.dotted { .dotted {
border-color: #CCCCCC; border-color: #CCCCCC;
} }
:global(.authors .img-div) {
border-color: #CCCCCC;
}
} }
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
.dotted { .dotted {
border-color: #CCCCCC; border-color: #0C0F14;
}
:global(.authors .img-div) {
border-color: #0C0F14;
} }
} }
</style> </style>