better posting text area #6
All checks were successful
ci/woodpecker/push/publish Pipeline was successful

This commit is contained in:
Mylloon 2024-03-08 18:52:29 +01:00
parent 4f9e8002f7
commit c0e5e32f9b
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 30 additions and 5 deletions

View file

@ -59,13 +59,31 @@ aside button {
}
aside textarea {
/* config of what the textarea looks like */
min-width: 40em;
min-height: 15em;
font-size: xx-large;
resize: none;
overflow: hidden;
}
/* move resize arrow to the left */
direction: rtl;
text-align: left;
aside div {
/* mandotory for the reactive textarea */
display: grid;
}
aside div::after {
/* update the content of the textarea */
content: attr(data-replicated-value) " ";
white-space: pre-wrap;
visibility: hidden;
}
aside div > textarea,
aside div::after {
/* textarea position after new input */
padding: 0.5rem;
font-size: xx-large;
grid-area: 1 / 1 / 2 / 2;
}
/* breakpoint */

View file

@ -3,7 +3,14 @@
action="{{ config.sanitized_base() }}/{% if name %}{{ post_file_id(name) }}{% endif %}"
method="post"
>
<textarea name="p">{{ "\n".join(file) }}</textarea>
<div>
<textarea
name="p"
onInput="this.parentNode.dataset.replicatedValue = this.value"
>
{{ "\n".join(file) }}</textarea
>
</div>
<br />
<button type="submit">send</button>
</form>