diff options
Diffstat (limited to 'cmd/web/templates/articles')
9 files changed, 24 insertions, 24 deletions
diff --git a/cmd/web/templates/articles/htmx-article-page.tmpl b/cmd/web/templates/articles/htmx-article-page.tmpl index 9380c0a..c7a567c 100644 --- a/cmd/web/templates/articles/htmx-article-page.tmpl +++ b/cmd/web/templates/articles/htmx-article-page.tmpl @@ -1,3 +1,3 @@ -{{ template "articles/show" . }} +{{ template "projects/show" . }} {{ template "components/navbar" . }} {{ template "components/head" . }}
\ No newline at end of file diff --git a/cmd/web/templates/articles/htmx-post-comments.tmpl b/cmd/web/templates/articles/htmx-post-comments.tmpl index 742b339..7a1aba4 100644 --- a/cmd/web/templates/articles/htmx-post-comments.tmpl +++ b/cmd/web/templates/articles/htmx-post-comments.tmpl @@ -1,2 +1,2 @@ -{{ template "articles/partials/comments-card" . }} -{{ template "articles/partials/comments-form" . }}
\ No newline at end of file +{{ template "projects/partials/comments-card" . }} +{{ template "projects/partials/comments-form" . }}
\ No newline at end of file diff --git a/cmd/web/templates/articles/htmx-show.tmpl b/cmd/web/templates/articles/htmx-show.tmpl index 9021bb2..e5f6875 100644 --- a/cmd/web/templates/articles/htmx-show.tmpl +++ b/cmd/web/templates/articles/htmx-show.tmpl @@ -1,3 +1,3 @@ -{{ template "articles/partials/detail-title" . }} -{{ template "articles/partials/detail-post-meta" . }} -{{ template "articles/partials/detail-post-content" . }}
\ No newline at end of file +{{ template "projects/partials/detail-title" . }} +{{ template "projects/partials/detail-post-meta" . }} +{{ template "projects/partials/detail-post-content" . }}
\ No newline at end of file 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" diff --git a/cmd/web/templates/articles/show.tmpl b/cmd/web/templates/articles/show.tmpl index cd372d4..2078016 100644 --- a/cmd/web/templates/articles/show.tmpl +++ b/cmd/web/templates/articles/show.tmpl @@ -2,15 +2,15 @@ <div class="banner"> <div class="container"> - <h1 id="article-detail__title"> + <h1 id="project-detail__title"> {{ .Project.Title }} </h1> - {{ template "articles/partials/detail-post-meta" . }} + {{ template "projects/partials/detail-post-meta" . }} </div> </div> - <div class="article-detail container page"> + <div class="project-detail container page"> <div class="row post-content"> <div class="col-md-12"> {{ .Project.Body }} @@ -27,11 +27,11 @@ <hr /> <div class="post-actions"> - {{ template "articles/partials/detail-post-meta" . }} + {{ template "projects/partials/detail-post-meta" . }} </div> <div class="row"> - <div class="col-md-8 col-md-offset-2" hx-get="/htmx/articles/{{ .Project.Slug }}/comments" hx-trigger="load"></div> + <div class="col-md-8 col-md-offset-2" hx-get="/htmx/projects/{{ .Project.Slug }}/comments" hx-trigger="load"></div> </div> </div> |