aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/navigation.tmpl1
-rw-r--r--templates/notification.tmpl59
-rw-r--r--templates/status.tmpl4
-rw-r--r--templates/thread.tmpl2
-rw-r--r--templates/timeline.tmpl2
5 files changed, 66 insertions, 2 deletions
diff --git a/templates/navigation.tmpl b/templates/navigation.tmpl
index ea4a213..d86971c 100644
--- a/templates/navigation.tmpl
+++ b/templates/navigation.tmpl
@@ -1,4 +1,5 @@
<div class="navigation">
<a href="/timeline">home</a>
+ <a href="/notifications">notifications{{if gt .NotificationCount 0}} ({{.NotificationCount}}){{end}}</a>
<a href="/signout">sign out</a>
</div>
diff --git a/templates/notification.tmpl b/templates/notification.tmpl
new file mode 100644
index 0000000..099f17e
--- /dev/null
+++ b/templates/notification.tmpl
@@ -0,0 +1,59 @@
+{{template "header.tmpl"}}
+{{template "navigation.tmpl" .NavbarData}}
+<div class="page-title"> Notifications </div>
+
+{{range .Notifications}}
+<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" />
+ <div>
+ <div>
+ <span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
+ <span class="icon dripicons-user-group"></span>
+ followed you
+ </div>
+ <div class="notification-follow-uname">
+ @{{.Account.Acct}}
+ </div>
+ </div>
+ </div>
+
+ {{else if eq .Type "mention"}}
+ {{template "status" .Status}}
+
+ {{else if eq .Type "reblog"}}
+ <div class="notification-retweet-container">
+ <img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
+ <div>
+ <div>
+ <span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
+ <span class="icon dripicons-retweet retweeted"></span>
+ retweeted your post
+ </div>
+ {{template "status" .Status}}
+ </div>
+ </div>
+
+ {{else if eq .Type "favourite"}}
+ <div class="notification-like-container">
+ <img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
+ <div>
+ <div>
+ <span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
+ <span class="icon dripicons-star liked"></span>
+ liked your post
+ </div>
+ {{template "status" .Status}}
+ </div>
+ </div>
+ {{end}}
+</div>
+{{end}}
+
+<div class="pagination">
+ {{if .HasNext}}
+ <a href="{{.NextLink}}">next</a>
+ {{end}}
+</div>
+{{template "footer.tmpl"}}
diff --git a/templates/status.tmpl b/templates/status.tmpl
index 24f9a54..7020be0 100644
--- a/templates/status.tmpl
+++ b/templates/status.tmpl
@@ -11,13 +11,17 @@
{{block "status" .}}
<div class="status-container">
<div>
+ {{if ne .Account.ID ""}}
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
+ {{end}}
</div>
<div class="status">
+ {{if ne .Account.ID ""}}
<div class="status-name">
<span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
<span class="status-uname"> {{.Account.Acct}} </span>
</div>
+ {{end}}
<div class="status-content"> {{WithEmojis .Content .Emojis}} </div>
<div class="status-media-container">
{{range .MediaAttachments}}
diff --git a/templates/thread.tmpl b/templates/thread.tmpl
index a3f7916..29d702b 100644
--- a/templates/thread.tmpl
+++ b/templates/thread.tmpl
@@ -1,6 +1,6 @@
{{template "header.tmpl"}}
+{{template "navigation.tmpl" .NavbarData}}
<div class="page-title"> Thread </div>
-{{template "navigation.tmpl"}}
{{range .Context.Ancestors}}
{{template "status.tmpl" .}}
diff --git a/templates/timeline.tmpl b/templates/timeline.tmpl
index 527c91b..53e3ad7 100644
--- a/templates/timeline.tmpl
+++ b/templates/timeline.tmpl
@@ -1,6 +1,6 @@
{{template "header.tmpl"}}
+{{template "navigation.tmpl" .NavbarData}}
<div class="page-title"> Timeline </div>
-{{template "navigation.tmpl"}}
<form class="timeline-post-form" action="/post" method="POST" enctype="multipart/form-data">
<label for="post-content"> New Post </label>