aboutsummaryrefslogtreecommitdiff
path: root/cmd/web/templates/projects/partials/comments-form.tmpl
diff options
context:
space:
mode:
authorVikas Kushwaha <dev@vikas.rocks>2025-02-11 17:50:21 +0530
committerVikas Kushwaha <dev@vikas.rocks>2025-02-11 17:50:21 +0530
commite44397dcbb9454f89b8263738d5ccf1e20a12074 (patch)
tree1c2b5816c597ddd10c7afb68ed2af7cc2c26d56d /cmd/web/templates/projects/partials/comments-form.tmpl
parentc720f1f85e5ec7c93604462b7a70e1f84a1ce244 (diff)
Substituted 'article' with 'project' in filenamesHEADmaster
Diffstat (limited to 'cmd/web/templates/projects/partials/comments-form.tmpl')
-rw-r--r--cmd/web/templates/projects/partials/comments-form.tmpl18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmd/web/templates/projects/partials/comments-form.tmpl b/cmd/web/templates/projects/partials/comments-form.tmpl
new file mode 100644
index 0000000..c88cac6
--- /dev/null
+++ b/cmd/web/templates/projects/partials/comments-form.tmpl
@@ -0,0 +1,18 @@
+<form id="project-comment-form" class="card comment-form"
+ hx-post="/htmx/projects/{{ .Project.Slug }}/comments"
+ hx-target="#project-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="{{ .Project.User.Image }}" class="comment-author-img" />
+ <button class="btn btn-sm btn-primary">
+ Post Comment
+ </button>
+ </div>
+</form> \ No newline at end of file