diff options
Diffstat (limited to 'cmd/web/templates/users/partials/post-preview.tmpl')
-rw-r--r-- | cmd/web/templates/users/partials/post-preview.tmpl | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/cmd/web/templates/users/partials/post-preview.tmpl b/cmd/web/templates/users/partials/post-preview.tmpl index a015860..00542a9 100644 --- a/cmd/web/templates/users/partials/post-preview.tmpl +++ b/cmd/web/templates/users/partials/post-preview.tmpl @@ -1,47 +1,47 @@ <div id="user-post-preview"> {{ if .HasProjects }} {{ $isSelf := .IsSelf }} - {{ range $article := .Projects }} + {{ range $project := .Projects }} <div class="post-preview"> <div class="post-meta"> - <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" > - <img src="{{ $article.User.Image }}" /> + <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> - {{ template "users/partials/article-favorite-button" Dict "Project" $article "IsSelf" $isSelf }} + {{ template "users/partials/project-favorite-button" Dict "Project" $project "IsSelf" $isSelf }} </div> - <a href="/articles/{{ $article.Slug }}" - hx-push-url="/articles/{{ $article.Slug }}" - hx-get="/htmx/articles/{{ $article.Slug }}" + <a href="/projects/{{ $project.Slug }}" + hx-push-url="/projects/{{ $project.Slug }}" + hx-get="/htmx/projects/{{ $project.Slug }}" hx-target="#app-body" class="preview-link" > - <h1>{{ $article.Title }}</h1> - <p>{{ $article.Description }}</p> + <h1>{{ $project.Title }}</h1> + <p>{{ $project.Description }}</p> <div class="m-t-1"> <span>Read more...</span> <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> @@ -54,7 +54,7 @@ {{ if not .HasProjects }} <div class="post-preview"> <div class="alert alert-warning" role="alert"> - No articles are here... yet. + No projects are here... yet. </div> </div> {{ end }} |