aboutsummaryrefslogtreecommitdiff
path: root/cmd/web/templates/home
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/web/templates/home')
-rw-r--r--cmd/web/templates/home/partials/article-favorite-button.tmpl2
-rw-r--r--cmd/web/templates/home/partials/post-preview.tmpl36
2 files changed, 19 insertions, 19 deletions
diff --git a/cmd/web/templates/home/partials/article-favorite-button.tmpl b/cmd/web/templates/home/partials/article-favorite-button.tmpl
index c26226a..341f458 100644
--- a/cmd/web/templates/home/partials/article-favorite-button.tmpl
+++ b/cmd/web/templates/home/partials/article-favorite-button.tmpl
@@ -1,5 +1,5 @@
<button class="btn btn-outline-primary btn-sm pull-xs-right {{ if .IsFavorited }} active {{ end }}"
- hx-post="/htmx/home/articles/{{ .Slug }}/favorite"
+ hx-post="/htmx/home/projects/{{ .Slug }}/favorite"
hx-swap="outerHTML"
>
<i class="ion-heart"></i> {{ .GetFavoriteCount }}
diff --git a/cmd/web/templates/home/partials/post-preview.tmpl b/cmd/web/templates/home/partials/post-preview.tmpl
index 03c2f87..6d0f004 100644
--- a/cmd/web/templates/home/partials/post-preview.tmpl
+++ b/cmd/web/templates/home/partials/post-preview.tmpl
@@ -1,46 +1,46 @@
<div id="feed-post-preview" hx-swap-oob="true">
{{ if .HasProjects }}
- {{ 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 "home/partials/article-favorite-button" $article }}
+ {{ template "home/partials/project-favorite-button" $project }}
</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>
@@ -53,7 +53,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 }}