aboutsummaryrefslogtreecommitdiff
path: root/cmd/web/templates/projects/partials/comments-wrapper.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-wrapper.tmpl
parentc720f1f85e5ec7c93604462b7a70e1f84a1ce244 (diff)
Substituted 'article' with 'project' in filenamesHEADmaster
Diffstat (limited to 'cmd/web/templates/projects/partials/comments-wrapper.tmpl')
-rw-r--r--cmd/web/templates/projects/partials/comments-wrapper.tmpl26
1 files changed, 26 insertions, 0 deletions
diff --git a/cmd/web/templates/projects/partials/comments-wrapper.tmpl b/cmd/web/templates/projects/partials/comments-wrapper.tmpl
new file mode 100644
index 0000000..2f401de
--- /dev/null
+++ b/cmd/web/templates/projects/partials/comments-wrapper.tmpl
@@ -0,0 +1,26 @@
+<div id="project-comments-wrapper">
+ {{ range $comment := .Project.Comments }}
+ {{ template "projects/partials/comments-card" Dict "Comment" $comment }}
+ {{ end }}
+</div>
+
+{{ if .IsAuthenticated }}
+ <div id="form-message"></div>
+
+ {{ template "projects/partials/comments-form" . }}
+{{ else }}
+ <div>
+ <a href="/htmx/sign-in" hx-get="/htmx/sign-in" hx-target="#app-body"
+ hx-push-url="/sign-in"
+ >
+ Sign in
+ </a>
+ or
+ <a href="/htmx/sign-up" hx-get="/htmx/sign-up" hx-target="#app-body"
+ hx-push-url="/sign-up"
+ >
+ sign up
+ </a>
+ to add comments on this project.
+ </div>
+{{ end }} \ No newline at end of file