diff options
Diffstat (limited to 'cmd/web/templates/articles/partials')
5 files changed, 13 insertions, 13 deletions
diff --git a/cmd/web/templates/articles/partials/comments-form.tmpl b/cmd/web/templates/articles/partials/comments-form.tmpl index 3fe5064..c88cac6 100644 --- a/cmd/web/templates/articles/partials/comments-form.tmpl +++ b/cmd/web/templates/articles/partials/comments-form.tmpl @@ -1,6 +1,6 @@ -<form id="article-comment-form" class="card comment-form" - hx-post="/htmx/articles/{{ .Project.Slug }}/comments" - hx-target="#article-comments-wrapper" hx-swap="afterbegin show:top" +<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" diff --git a/cmd/web/templates/articles/partials/comments-wrapper.tmpl b/cmd/web/templates/articles/partials/comments-wrapper.tmpl index 048f945..2f401de 100644 --- a/cmd/web/templates/articles/partials/comments-wrapper.tmpl +++ b/cmd/web/templates/articles/partials/comments-wrapper.tmpl @@ -1,13 +1,13 @@ -<div id="article-comments-wrapper"> +<div id="project-comments-wrapper"> {{ range $comment := .Project.Comments }} - {{ template "articles/partials/comments-card" Dict "Comment" $comment }} + {{ template "projects/partials/comments-card" Dict "Comment" $comment }} {{ end }} </div> {{ if .IsAuthenticated }} <div id="form-message"></div> - {{ template "articles/partials/comments-form" . }} + {{ template "projects/partials/comments-form" . }} {{ else }} <div> <a href="/htmx/sign-in" hx-get="/htmx/sign-in" hx-target="#app-body" @@ -21,6 +21,6 @@ > sign up </a> - to add comments on this article. + to add comments on this project. </div> {{ end }}
\ No newline at end of file diff --git a/cmd/web/templates/articles/partials/detail-post-meta.tmpl b/cmd/web/templates/articles/partials/detail-post-meta.tmpl index 313f818..eb957b4 100644 --- a/cmd/web/templates/articles/partials/detail-post-meta.tmpl +++ b/cmd/web/templates/articles/partials/detail-post-meta.tmpl @@ -24,9 +24,9 @@ </button> <button class="btn btn-outline-danger btn-sm delete-button" - hx-delete="/htmx/articles/{{ .Project.Slug }}" + hx-delete="/htmx/projects/{{ .Project.Slug }}" hx-target="#app-body" - hx-confirm="Are you sure you wish to delete the article?" + hx-confirm="Are you sure you wish to delete the project?" > <i class="ion-trash-a"></i> Delete Project @@ -34,9 +34,9 @@ {{ else }} - {{ template "articles/partials/follow-button" . }} + {{ template "projects/partials/follow-button" . }} - {{ template "articles/partials/favorite-button" . }} + {{ template "projects/partials/favorite-button" . }} {{ end }} </div>
\ No newline at end of file diff --git a/cmd/web/templates/articles/partials/favorite-button.tmpl b/cmd/web/templates/articles/partials/favorite-button.tmpl index 7d0f28a..f72a320 100644 --- a/cmd/web/templates/articles/partials/favorite-button.tmpl +++ b/cmd/web/templates/articles/partials/favorite-button.tmpl @@ -1,5 +1,5 @@ <button class="btn btn-outline-primary btn-sm {{ if .IsProjectFavorited }} active {{ end }} favorite-button" - hx-post="/htmx/articles/{{ .Project.Slug }}/favorite" + hx-post="/htmx/projects/{{ .Project.Slug }}/favorite" {{ if .IsOob }} hx-swap-oob="outerHTML:.favorite-button" diff --git a/cmd/web/templates/articles/partials/follow-button.tmpl b/cmd/web/templates/articles/partials/follow-button.tmpl index f866db2..73cd023 100644 --- a/cmd/web/templates/articles/partials/follow-button.tmpl +++ b/cmd/web/templates/articles/partials/follow-button.tmpl @@ -1,5 +1,5 @@ <button class="btn btn-sm btn-outline-secondary follow-button" - hx-post="/htmx/articles/follow-user/{{ .Project.Slug }}" + hx-post="/htmx/projects/follow-user/{{ .Project.Slug }}" {{ if .IsOob }} hx-swap-oob="outerHTML:.follow-button" |