diff options
author | Vikas Kushwaha <dev@vikas.rocks> | 2025-02-11 17:50:21 +0530 |
---|---|---|
committer | Vikas Kushwaha <dev@vikas.rocks> | 2025-02-11 17:50:21 +0530 |
commit | e44397dcbb9454f89b8263738d5ccf1e20a12074 (patch) | |
tree | 1c2b5816c597ddd10c7afb68ed2af7cc2c26d56d /cmd/web/templates/articles/partials | |
parent | c720f1f85e5ec7c93604462b7a70e1f84a1ce244 (diff) |
Diffstat (limited to 'cmd/web/templates/articles/partials')
6 files changed, 0 insertions, 143 deletions
diff --git a/cmd/web/templates/articles/partials/comments-card.tmpl b/cmd/web/templates/articles/partials/comments-card.tmpl deleted file mode 100644 index 1e6062a..0000000 --- a/cmd/web/templates/articles/partials/comments-card.tmpl +++ /dev/null @@ -1,25 +0,0 @@ -<div class="card"> - <div class="card-block"> - <p class="card-text">{{ .Comment.Body }}</p> - </div> - <div class="card-footer"> - <a href="/users/{{ .Comment.User.Username }}" - hx-push-url="/users/{{ .Comment.User.Username }}" - hx-get="/htmx/users/{{ .Comment.User.Username }}" - hx-target="#app-body" - class="comment-author" - > - <img src="{{ .Comment.User.Image }}" class="comment-author-img" /> - </a> - - <a href="/users/{{ .Comment.User.Username }}" - hx-push-url="/users/{{ .Comment.User.Username }}" - hx-get="/htmx/users/{{ .Comment.User.Username }}" - hx-target="#app-body" - class="comment-author" - > - {{ .Comment.User.Name }} - </a> - <span class="date-posted">{{ .Comment.GetFormattedCreatedAt }}</span> - </div> -</div>
\ 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 deleted file mode 100644 index c88cac6..0000000 --- a/cmd/web/templates/articles/partials/comments-form.tmpl +++ /dev/null @@ -1,18 +0,0 @@ -<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" - {{ end }} -> - <div class="card-block"> - <textarea class="form-control" placeholder="Write a comment..." rows="3" name="comment"></textarea> - </div> - <div class="card-footer"> - <img src="{{ .Project.User.Image }}" class="comment-author-img" /> - <button class="btn btn-sm btn-primary"> - Post Comment - </button> - </div> -</form>
\ No newline at end of file diff --git a/cmd/web/templates/articles/partials/comments-wrapper.tmpl b/cmd/web/templates/articles/partials/comments-wrapper.tmpl deleted file mode 100644 index 2f401de..0000000 --- a/cmd/web/templates/articles/partials/comments-wrapper.tmpl +++ /dev/null @@ -1,26 +0,0 @@ -<div id="project-comments-wrapper"> - {{ range $comment := .Project.Comments }} - {{ template "projects/partials/comments-card" Dict "Comment" $comment }} - {{ end }} -</div> - -{{ if .IsAuthenticated }} - <div id="form-message"></div> - - {{ template "projects/partials/comments-form" . }} -{{ else }} - <div> - <a href="/htmx/sign-in" hx-get="/htmx/sign-in" hx-target="#app-body" - hx-push-url="/sign-in" - > - Sign in - </a> - or - <a href="/htmx/sign-up" hx-get="/htmx/sign-up" hx-target="#app-body" - hx-push-url="/sign-up" - > - sign up - </a> - 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 deleted file mode 100644 index eb957b4..0000000 --- a/cmd/web/templates/articles/partials/detail-post-meta.tmpl +++ /dev/null @@ -1,42 +0,0 @@ -<div class="post-meta"> - <a href="#"><img src="{{ .Project.User.Image }}" /></a> - <div class="info"> - <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" - > - {{ .Project.User.Name }} - </a> - <span class="date">{{ .Project.GetFormattedCreatedAt }}</span> - </div> - - {{ if .IsSelf }} - - <button class="btn btn-outline-secondary btn-sm edit-button" - hx-get="/htmx/editor/{{ .Project.Slug }}" - hx-target="#app-body" - hx-push-url="/editor/{{ .Project.Slug }}" - > - <i class="ion-edit"></i> - Edit Project - </button> - - <button class="btn btn-outline-danger btn-sm delete-button" - hx-delete="/htmx/projects/{{ .Project.Slug }}" - hx-target="#app-body" - hx-confirm="Are you sure you wish to delete the project?" - > - <i class="ion-trash-a"></i> - Delete Project - </button> - - {{ else }} - - {{ template "projects/partials/follow-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 deleted file mode 100644 index f72a320..0000000 --- a/cmd/web/templates/articles/partials/favorite-button.tmpl +++ /dev/null @@ -1,15 +0,0 @@ -<button class="btn btn-outline-primary btn-sm {{ if .IsProjectFavorited }} active {{ end }} favorite-button" - hx-post="/htmx/projects/{{ .Project.Slug }}/favorite" - - {{ if .IsOob }} - hx-swap-oob="outerHTML:.favorite-button" - {{ end }} -> - <i class="ion-heart"></i> - {{ if .IsProjectFavorited }} - Unfavorite Post - {{ else }} - Favorite Post - {{ end }} - ({{ .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 deleted file mode 100644 index 73cd023..0000000 --- a/cmd/web/templates/articles/partials/follow-button.tmpl +++ /dev/null @@ -1,17 +0,0 @@ -<button class="btn btn-sm btn-outline-secondary follow-button" - hx-post="/htmx/projects/follow-user/{{ .Project.Slug }}" - - {{ if .IsOob }} - hx-swap-oob="outerHTML:.follow-button" - {{ end }} -> - {{ if .IsFollowed }} - <i class="ion-minus-round"></i> - Unfollow - {{ else }} - <i class="ion-plus-round"></i> - Follow - {{ end }} - {{ .Project.User.Name }} - <span class="counter">({{ .Project.User.FollowersCount }})</span> -</button>
\ No newline at end of file |