diff options
author | Vikas Kushwaha <dev@vikas.rocks> | 2025-02-11 16:31:08 +0530 |
---|---|---|
committer | Vikas Kushwaha <dev@vikas.rocks> | 2025-02-11 16:31:08 +0530 |
commit | 57eb8f6712361a3bf75983ce153fac4846dc0273 (patch) | |
tree | 269a168d59c917c4e313c819e2b4c3ff8175f912 /cmd/web/templates/articles/partials/comments-form.tmpl |
Initial commit
Diffstat (limited to 'cmd/web/templates/articles/partials/comments-form.tmpl')
-rw-r--r-- | cmd/web/templates/articles/partials/comments-form.tmpl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cmd/web/templates/articles/partials/comments-form.tmpl b/cmd/web/templates/articles/partials/comments-form.tmpl new file mode 100644 index 0000000..09f9697 --- /dev/null +++ b/cmd/web/templates/articles/partials/comments-form.tmpl @@ -0,0 +1,18 @@ +<form id="article-comment-form" class="card comment-form" + hx-post="/htmx/articles/{{ .Article.Slug }}/comments" + hx-target="#article-comments-wrapper" hx-swap="afterbegin show:top" + + {{ if .IsOob }} + hx-swap-oob="true" + {{ end }} +> + <div class="card-block"> + <textarea class="form-control" placeholder="Write a comment..." rows="3" name="comment"></textarea> + </div> + <div class="card-footer"> + <img src="{{ .Article.User.Image }}" class="comment-author-img" /> + <button class="btn btn-sm btn-primary"> + Post Comment + </button> + </div> +</form>
\ No newline at end of file |