diff options
author | Vikas Kushwaha <dev@vikas.rocks> | 2025-02-11 17:49:16 +0530 |
---|---|---|
committer | Vikas Kushwaha <dev@vikas.rocks> | 2025-02-11 17:49:16 +0530 |
commit | c720f1f85e5ec7c93604462b7a70e1f84a1ce244 (patch) | |
tree | 6e994a84d2f1b241c31f54e2a2eeca00795faf77 /cmd/web | |
parent | d7d066cfa1cd16dd502000077696388043c4dab9 (diff) |
Substituted 'article' with 'project'
Diffstat (limited to 'cmd/web')
15 files changed, 64 insertions, 64 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> diff --git a/cmd/web/templates/editor/form.tmpl b/cmd/web/templates/editor/form.tmpl index 2aeb9b8..dc1bb49 100644 --- a/cmd/web/templates/editor/form.tmpl +++ b/cmd/web/templates/editor/form.tmpl @@ -24,7 +24,7 @@ > </fieldset> <fieldset class="form-group"> - <input type="text" name="description" class="form-control form-control-md" placeholder="What's this article about?" + <input type="text" name="description" class="form-control form-control-md" placeholder="What's this project about?" value="{{ .Project.Description }}" > </fieldset> 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 }} diff --git a/cmd/web/templates/users/partials/article-favorite-button.tmpl b/cmd/web/templates/users/partials/article-favorite-button.tmpl index ffa4613..5a70718 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 .Project.IsFavorited }} active {{ end }}" - hx-post="/htmx/users/articles/{{ .Project.Slug }}/favorite" + hx-post="/htmx/users/projects/{{ .Project.Slug }}/favorite" {{ if .IsSelf }} hx-swap="delete" 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 }} diff --git a/cmd/web/templates/users/show.tmpl b/cmd/web/templates/users/show.tmpl index cf9f1d7..b2b8bab 100644 --- a/cmd/web/templates/users/show.tmpl +++ b/cmd/web/templates/users/show.tmpl @@ -41,7 +41,7 @@ {{ if .IsLoadFavorites }} hx-get="/htmx/users/{{ .User.Username }}/favorites" {{ else }} - hx-get="/htmx/users/{{ .User.Username }}/articles" + hx-get="/htmx/users/{{ .User.Username }}/projects" {{ end }} hx-trigger="load" ></div> |