feat(comments): add decorative image to comment input with focus fade effect

This commit is contained in:
xfy 2026-06-29 14:42:03 +08:00
parent fbd706b198
commit 0b53e968c1

View File

@ -147,12 +147,19 @@ 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",
"内容 *" "内容 *"
} }
textarea { div { class: "relative",
id: "comment-content-{id_suffix}", textarea {
class: "{INPUT_CLASS} min-h-[100px] resize-y", id: "comment-content-{id_suffix}",
value: "{content_md}", class: "{INPUT_CLASS} peer min-h-[100px] resize-y",
disabled: submitting(), value: "{content_md}",
oninput: move |e| content_md.set(e.value()), disabled: submitting(),
oninput: move |e| content_md.set(e.value()),
}
img {
src: "/images/xiantiaoxiaogou_03.webp",
alt: "",
class: "absolute bottom-2 right-2 w-24 pointer-events-none opacity-60 peer-focus:opacity-10 transition-opacity duration-300",
}
} }
} }