aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2019-12-20 18:30:20 +0000
committerr <r@freesoftwareextremist.com>2019-12-20 18:30:20 +0000
commita1f49af1d93bccdd56d4538b149884418bd2ca2c (patch)
treeadd621fe17d9dbcf3625bcc7de1738ea8c89bc9f /templates
parent3d1e4cfa4c17eea9a64b8672df769c540fefdaeb (diff)
downloadbloat-a1f49af1d93bccdd56d4538b149884418bd2ca2c.tar.gz
bloat-a1f49af1d93bccdd56d4538b149884418bd2ca2c.zip
Add user page and follow/unfollow calls
Diffstat (limited to 'templates')
-rw-r--r--templates/notification.tmpl12
-rw-r--r--templates/status.tmpl12
-rw-r--r--templates/user.tmpl54
3 files changed, 72 insertions, 6 deletions
diff --git a/templates/notification.tmpl b/templates/notification.tmpl
index 099f17e..da6164b 100644
--- a/templates/notification.tmpl
+++ b/templates/notification.tmpl
@@ -6,7 +6,9 @@
<div class="notification-container {{if .Pleroma}}{{if not .Pleroma.IsSeen}}unread{{end}}{{end}}">
{{if eq .Type "follow"}}
<div class="notification-follow-container">
- <img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
+ <a href="/user/{{.Account.ID}}" >
+ <img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
+ </a>
<div>
<div>
<span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
@@ -24,7 +26,9 @@
{{else if eq .Type "reblog"}}
<div class="notification-retweet-container">
- <img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
+ <a href="/user/{{.Account.ID}}" >
+ <img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
+ </a>
<div>
<div>
<span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
@@ -37,7 +41,9 @@
{{else if eq .Type "favourite"}}
<div class="notification-like-container">
- <img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
+ <a href="/user/{{.Account.ID}}" >
+ <img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
+ </a>
<div>
<div>
<span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
diff --git a/templates/status.tmpl b/templates/status.tmpl
index 4dbbe3c..618398f 100644
--- a/templates/status.tmpl
+++ b/templates/status.tmpl
@@ -1,7 +1,9 @@
<div id="status-{{if .Reblog}}{{.Reblog.ID}}{{else}}{{.ID}}{{end}}" class="status-container-container">
{{if .Reblog}}
<div class="retweet-info">
- <img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
+ <a href="/user/{{.Account.ID}}" >
+ <img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
+ </a>
<span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
<span class="icon dripicons-retweet retweeted"></span>
retweeted
@@ -12,14 +14,18 @@
<div class="status-container">
<div>
{{if not .HideAccountInfo}}
- <img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
+ <a href="/user/{{.Account.ID}}" >
+ <img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
+ </a>
{{end}}
</div>
<div class="status">
{{if not .HideAccountInfo}}
<div class="status-name">
<span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
- <span class="status-uname"> {{.Account.Acct}} </span>
+ <a href="/user/{{.Account.ID}}" >
+ <span class="status-uname"> {{.Account.Acct}} </span>
+ </a>
</div>
{{end}}
<div class="status-reply-container">
diff --git a/templates/user.tmpl b/templates/user.tmpl
new file mode 100644
index 0000000..3347f92
--- /dev/null
+++ b/templates/user.tmpl
@@ -0,0 +1,54 @@
+{{template "header.tmpl"}}
+{{template "navigation.tmpl" .NavbarData}}
+<div class="page-title"> User </div>
+
+<div class="user-info-container">
+<div>
+ <div class="user-profile-img-container">
+ <img class="user-profile-img" src="{{.User.AvatarStatic}}" alt="profile-avatar" />
+ </div>
+ <div class="user-profile-details-container">
+ <div>
+ <span class="status-dname"> {{WithEmojis .User.DisplayName .User.Emojis}} </span>
+ <span class="status-uname"> {{.User.Acct}} </span>
+ </div>
+ <div>
+ <span> {{if .User.Pleroma.Relationship.FollowedBy}} follows you - {{end}} </span>
+ {{if .User.Pleroma.Relationship.Following}}
+ <form class="d-inline" action="/unfollow/{{.User.ID}}" method="post">
+ <input type="submit" value="unfollow" class="btn-link">
+ </form>
+ {{end}}
+ {{if .User.Pleroma.Relationship.Requested}}
+ <form class="d-inline" action="/unfollow/{{.User.ID}}" method="post">
+ <input type="submit" value="cancel request" class="btn-link">
+ </form>
+ {{end}}
+ {{if not .User.Pleroma.Relationship.Following}}
+ <form class="d-inline" action="/follow/{{.User.ID}}" method="post">
+ <input type="submit" value="{{if .User.Pleroma.Relationship.Requested}}resend request{{else}}follow{{end}}" class="btn-link">
+ </form>
+ {{end}}
+ </div>
+ <div>
+ {{.User.StatusesCount}} statuses - {{.User.FollowingCount}} following - {{.User.FollowersCount}} followers
+ </div>
+ </div>
+ <div class="user-profile-decription">
+ {{.User.Note}}
+ </div>
+</div>
+</div>
+
+{{range .Statuses}}
+{{template "status.tmpl" .}}
+{{end}}
+
+<div class="pagination">
+ {{if .HasNext}}
+ <a href="{{.NextLink}}">next</a>
+ {{end}}
+</div>
+
+{{template "footer.tmpl"}}
+