aboutsummaryrefslogtreecommitdiff
path: root/cmd/web/templates/articles
diff options
context:
space:
mode:
authorVikas Kushwaha <dev@vikas.rocks>2025-02-11 17:50:21 +0530
committerVikas Kushwaha <dev@vikas.rocks>2025-02-11 17:50:21 +0530
commite44397dcbb9454f89b8263738d5ccf1e20a12074 (patch)
tree1c2b5816c597ddd10c7afb68ed2af7cc2c26d56d /cmd/web/templates/articles
parentc720f1f85e5ec7c93604462b7a70e1f84a1ce244 (diff)
Substituted 'article' with 'project' in filenamesHEADmaster
Diffstat (limited to 'cmd/web/templates/articles')
-rw-r--r--cmd/web/templates/articles/htmx-article-page.tmpl3
-rw-r--r--cmd/web/templates/articles/htmx-post-comments.tmpl2
-rw-r--r--cmd/web/templates/articles/htmx-show.tmpl3
-rw-r--r--cmd/web/templates/articles/partials/comments-card.tmpl25
-rw-r--r--cmd/web/templates/articles/partials/comments-form.tmpl18
-rw-r--r--cmd/web/templates/articles/partials/comments-wrapper.tmpl26
-rw-r--r--cmd/web/templates/articles/partials/detail-post-meta.tmpl42
-rw-r--r--cmd/web/templates/articles/partials/favorite-button.tmpl15
-rw-r--r--cmd/web/templates/articles/partials/follow-button.tmpl17
-rw-r--r--cmd/web/templates/articles/show.tmpl38
10 files changed, 0 insertions, 189 deletions
diff --git a/cmd/web/templates/articles/htmx-article-page.tmpl b/cmd/web/templates/articles/htmx-article-page.tmpl
deleted file mode 100644
index c7a567c..0000000
--- a/cmd/web/templates/articles/htmx-article-page.tmpl
+++ /dev/null
@@ -1,3 +0,0 @@
-{{ 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
deleted file mode 100644
index 7a1aba4..0000000
--- a/cmd/web/templates/articles/htmx-post-comments.tmpl
+++ /dev/null
@@ -1,2 +0,0 @@
-{{ 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
deleted file mode 100644
index e5f6875..0000000
--- a/cmd/web/templates/articles/htmx-show.tmpl
+++ /dev/null
@@ -1,3 +0,0 @@
-{{ 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-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>
- &nbsp;
- <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
diff --git a/cmd/web/templates/articles/show.tmpl b/cmd/web/templates/articles/show.tmpl
deleted file mode 100644
index 2078016..0000000
--- a/cmd/web/templates/articles/show.tmpl
+++ /dev/null
@@ -1,38 +0,0 @@
-<div class="post-page">
-
- <div class="banner">
- <div class="container">
- <h1 id="project-detail__title">
- {{ .Project.Title }}
- </h1>
-
- {{ template "projects/partials/detail-post-meta" . }}
- </div>
- </div>
-
- <div class="project-detail container page">
- <div class="row post-content">
- <div class="col-md-12">
- {{ .Project.Body }}
- </div>
- <div class="col-md-12 m-t-2">
- <ul class="tag-list">
- {{ range $tag := .Project.Tags }}
- <li class="tag-default tag-pill tag-outline">{{ $tag.Name }}</li>
- {{ end }}
- </ul>
- </div>
- </div>
-
- <hr />
-
- <div class="post-actions">
- {{ template "projects/partials/detail-post-meta" . }}
- </div>
-
- <div class="row">
- <div class="col-md-8 col-md-offset-2" hx-get="/htmx/projects/{{ .Project.Slug }}/comments" hx-trigger="load"></div>
- </div>
-
- </div>
-</div> \ No newline at end of file