diff options
Diffstat (limited to 'views/header.ejs')
-rw-r--r-- | views/header.ejs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/views/header.ejs b/views/header.ejs index 9c8ee0d..aed34d0 100644 --- a/views/header.ejs +++ b/views/header.ejs @@ -16,6 +16,12 @@ <span><a href="/forum">Forum</a></span> <% if (user) { + let unread = user.unread(); + if (unread > 0) { + %><span><a href="/inbox">Inbox (<%= unread %>)</a></span><% + } else { + %><span><a href="/inbox">Inbox</a></span><% + } %><span><a href="/profile">Profile (<%= user.name %>)</a></span><% } else { %><span><a href="/signup">Signup</a></span><% |