diff options
author | Vikas Kushwaha <dev@vikas.rocks> | 2025-02-11 17:45:19 +0530 |
---|---|---|
committer | Vikas Kushwaha <dev@vikas.rocks> | 2025-02-11 17:45:19 +0530 |
commit | d7d066cfa1cd16dd502000077696388043c4dab9 (patch) | |
tree | f43b009ae023f1aec580f0096e7712861cbab655 /cmd/web/templates/users | |
parent | a28b31e0f40a34674a7e14405d21bdbc5d53c2fb (diff) |
Substituted 'Article' with 'Project'
Diffstat (limited to 'cmd/web/templates/users')
-rw-r--r-- | cmd/web/templates/users/partials/article-favorite-button.tmpl | 6 | ||||
-rw-r--r-- | cmd/web/templates/users/partials/post-preview.tmpl | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/cmd/web/templates/users/partials/article-favorite-button.tmpl b/cmd/web/templates/users/partials/article-favorite-button.tmpl index c63182a..ffa4613 100644 --- a/cmd/web/templates/users/partials/article-favorite-button.tmpl +++ b/cmd/web/templates/users/partials/article-favorite-button.tmpl @@ -1,5 +1,5 @@ -<button class="btn btn-outline-primary btn-sm pull-xs-right {{ if .Article.IsFavorited }} active {{ end }}" - hx-post="/htmx/users/articles/{{ .Article.Slug }}/favorite" +<button class="btn btn-outline-primary btn-sm pull-xs-right {{ if .Project.IsFavorited }} active {{ end }}" + hx-post="/htmx/users/articles/{{ .Project.Slug }}/favorite" {{ if .IsSelf }} hx-swap="delete" @@ -8,5 +8,5 @@ hx-swap="outerHTML" {{ end }} > - <i class="ion-heart"></i> {{ .Article.GetFavoriteCount }} + <i class="ion-heart"></i> {{ .Project.GetFavoriteCount }} </button>
\ No newline at end of file diff --git a/cmd/web/templates/users/partials/post-preview.tmpl b/cmd/web/templates/users/partials/post-preview.tmpl index 4e00357..a015860 100644 --- a/cmd/web/templates/users/partials/post-preview.tmpl +++ b/cmd/web/templates/users/partials/post-preview.tmpl @@ -1,7 +1,7 @@ <div id="user-post-preview"> - {{ if .HasArticles }} + {{ if .HasProjects }} {{ $isSelf := .IsSelf }} - {{ range $article := .Articles }} + {{ range $article := .Projects }} <div class="post-preview"> <div class="post-meta"> @@ -25,7 +25,7 @@ <span class="date">{{ $article.GetFormattedCreatedAt }}</span> </div> - {{ template "users/partials/article-favorite-button" Dict "Article" $article "IsSelf" $isSelf }} + {{ template "users/partials/article-favorite-button" Dict "Project" $article "IsSelf" $isSelf }} </div> <a href="/articles/{{ $article.Slug }}" @@ -51,7 +51,7 @@ {{ end }} {{ end }} - {{ if not .HasArticles }} + {{ if not .HasProjects }} <div class="post-preview"> <div class="alert alert-warning" role="alert"> No articles are here... yet. |