diff options
Diffstat (limited to 'cmd/web/templates/articles')
6 files changed, 25 insertions, 25 deletions
diff --git a/cmd/web/templates/articles/partials/comments-form.tmpl b/cmd/web/templates/articles/partials/comments-form.tmpl index 09f9697..3fe5064 100644 --- a/cmd/web/templates/articles/partials/comments-form.tmpl +++ b/cmd/web/templates/articles/partials/comments-form.tmpl @@ -1,5 +1,5 @@ <form id="article-comment-form" class="card comment-form" - hx-post="/htmx/articles/{{ .Article.Slug }}/comments" + hx-post="/htmx/articles/{{ .Project.Slug }}/comments" hx-target="#article-comments-wrapper" hx-swap="afterbegin show:top" {{ if .IsOob }} @@ -10,7 +10,7 @@ <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" /> + <img src="{{ .Project.User.Image }}" class="comment-author-img" /> <button class="btn btn-sm btn-primary"> Post Comment </button> diff --git a/cmd/web/templates/articles/partials/comments-wrapper.tmpl b/cmd/web/templates/articles/partials/comments-wrapper.tmpl index 266b4e5..048f945 100644 --- a/cmd/web/templates/articles/partials/comments-wrapper.tmpl +++ b/cmd/web/templates/articles/partials/comments-wrapper.tmpl @@ -1,5 +1,5 @@ <div id="article-comments-wrapper"> - {{ range $comment := .Article.Comments }} + {{ range $comment := .Project.Comments }} {{ template "articles/partials/comments-card" Dict "Comment" $comment }} {{ end }} </div> diff --git a/cmd/web/templates/articles/partials/detail-post-meta.tmpl b/cmd/web/templates/articles/partials/detail-post-meta.tmpl index a871b44..313f818 100644 --- a/cmd/web/templates/articles/partials/detail-post-meta.tmpl +++ b/cmd/web/templates/articles/partials/detail-post-meta.tmpl @@ -1,35 +1,35 @@ <div class="post-meta"> - <a href="#"><img src="{{ .Article.User.Image }}" /></a> + <a href="#"><img src="{{ .Project.User.Image }}" /></a> <div class="info"> - <a href="/users/{{ .Article.User.Username }}" - hx-push-url="/users/{{ .Article.User.Username }}" - hx-get="/htmx/users/{{ .Article.User.Username }}" + <a href="/users/{{ .Project.User.Username }}" + hx-push-url="/users/{{ .Project.User.Username }}" + hx-get="/htmx/users/{{ .Project.User.Username }}" hx-target="#app-body" class="author" > - {{ .Article.User.Name }} + {{ .Project.User.Name }} </a> - <span class="date">{{ .Article.GetFormattedCreatedAt }}</span> + <span class="date">{{ .Project.GetFormattedCreatedAt }}</span> </div> {{ if .IsSelf }} <button class="btn btn-outline-secondary btn-sm edit-button" - hx-get="/htmx/editor/{{ .Article.Slug }}" + hx-get="/htmx/editor/{{ .Project.Slug }}" hx-target="#app-body" - hx-push-url="/editor/{{ .Article.Slug }}" + hx-push-url="/editor/{{ .Project.Slug }}" > <i class="ion-edit"></i> - Edit Article + Edit Project </button> <button class="btn btn-outline-danger btn-sm delete-button" - hx-delete="/htmx/articles/{{ .Article.Slug }}" + hx-delete="/htmx/articles/{{ .Project.Slug }}" hx-target="#app-body" hx-confirm="Are you sure you wish to delete the article?" > <i class="ion-trash-a"></i> - Delete Article + Delete Project </button> {{ else }} diff --git a/cmd/web/templates/articles/partials/favorite-button.tmpl b/cmd/web/templates/articles/partials/favorite-button.tmpl index 3146830..7d0f28a 100644 --- a/cmd/web/templates/articles/partials/favorite-button.tmpl +++ b/cmd/web/templates/articles/partials/favorite-button.tmpl @@ -1,15 +1,15 @@ -<button class="btn btn-outline-primary btn-sm {{ if .IsArticleFavorited }} active {{ end }} favorite-button" - hx-post="/htmx/articles/{{ .Article.Slug }}/favorite" +<button class="btn btn-outline-primary btn-sm {{ if .IsProjectFavorited }} active {{ end }} favorite-button" + hx-post="/htmx/articles/{{ .Project.Slug }}/favorite" {{ if .IsOob }} hx-swap-oob="outerHTML:.favorite-button" {{ end }} > <i class="ion-heart"></i> - {{ if .IsArticleFavorited }} + {{ if .IsProjectFavorited }} Unfavorite Post {{ else }} Favorite Post {{ end }} - ({{ .Article.GetFavoriteCount }}) + ({{ .Project.GetFavoriteCount }}) </button>
\ No newline at end of file diff --git a/cmd/web/templates/articles/partials/follow-button.tmpl b/cmd/web/templates/articles/partials/follow-button.tmpl index 7184278..f866db2 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/{{ .Article.Slug }}" + hx-post="/htmx/articles/follow-user/{{ .Project.Slug }}" {{ if .IsOob }} hx-swap-oob="outerHTML:.follow-button" @@ -12,6 +12,6 @@ <i class="ion-plus-round"></i> Follow {{ end }} - {{ .Article.User.Name }} - <span class="counter">({{ .Article.User.FollowersCount }})</span> + {{ .Project.User.Name }} + <span class="counter">({{ .Project.User.FollowersCount }})</span> </button>
\ No newline at end of file diff --git a/cmd/web/templates/articles/show.tmpl b/cmd/web/templates/articles/show.tmpl index 364444e..cd372d4 100644 --- a/cmd/web/templates/articles/show.tmpl +++ b/cmd/web/templates/articles/show.tmpl @@ -3,7 +3,7 @@ <div class="banner"> <div class="container"> <h1 id="article-detail__title"> - {{ .Article.Title }} + {{ .Project.Title }} </h1> {{ template "articles/partials/detail-post-meta" . }} @@ -13,11 +13,11 @@ <div class="article-detail container page"> <div class="row post-content"> <div class="col-md-12"> - {{ .Article.Body }} + {{ .Project.Body }} </div> <div class="col-md-12 m-t-2"> <ul class="tag-list"> - {{ range $tag := .Article.Tags }} + {{ range $tag := .Project.Tags }} <li class="tag-default tag-pill tag-outline">{{ $tag.Name }}</li> {{ end }} </ul> @@ -31,7 +31,7 @@ </div> <div class="row"> - <div class="col-md-8 col-md-offset-2" hx-get="/htmx/articles/{{ .Article.Slug }}/comments" hx-trigger="load"></div> + <div class="col-md-8 col-md-offset-2" hx-get="/htmx/articles/{{ .Project.Slug }}/comments" hx-trigger="load"></div> </div> </div> |