fix(comments): move decorative image properly inside textarea background layer

This commit is contained in:
xfy 2026-06-29 15:20:48 +08:00
parent 0b53e968c1
commit 656e35c79f

View File

@ -147,10 +147,10 @@ pub fn CommentForm(post_id: i32, parent_id: Option<i64>, parent_indent: Option<i
class: "block text-sm font-medium text-paper-secondary mb-1", class: "block text-sm font-medium text-paper-secondary mb-1",
"内容 *" "内容 *"
} }
div { class: "relative", div { class: "relative bg-paper-entry rounded-lg",
textarea { textarea {
id: "comment-content-{id_suffix}", id: "comment-content-{id_suffix}",
class: "{INPUT_CLASS} peer min-h-[100px] resize-y", class: "{INPUT_CLASS} !bg-transparent relative z-10 peer block min-h-[100px] resize-y",
value: "{content_md}", value: "{content_md}",
disabled: submitting(), disabled: submitting(),
oninput: move |e| content_md.set(e.value()), oninput: move |e| content_md.set(e.value()),
@ -158,7 +158,7 @@ pub fn CommentForm(post_id: i32, parent_id: Option<i64>, parent_indent: Option<i
img { img {
src: "/images/xiantiaoxiaogou_03.webp", src: "/images/xiantiaoxiaogou_03.webp",
alt: "", alt: "",
class: "absolute bottom-2 right-2 w-24 pointer-events-none opacity-60 peer-focus:opacity-10 transition-opacity duration-300", class: "absolute bottom-1.5 right-1.5 w-24 pointer-events-none opacity-60 peer-focus:opacity-10 transition-opacity duration-300 z-0",
} }
} }
} }