2024-11-14 03:51:08 +00:00
|
|
|
extends site.pug
|
|
|
|
|
|
|
|
//- Display mood here but keep yourself dry (i.e. dont request user mood if the profile being viewed is the profile of the currently logged-in user)
|
|
|
|
block content
|
2024-12-26 21:24:04 +00:00
|
|
|
div(style="display:flex;align-items:center;gap:8px;")
|
|
|
|
h1= user.name
|
|
|
|
if !isSelf
|
|
|
|
form(action=`/users/${user.name}/follow`, method="post")
|
|
|
|
button(type="submit")= isFollowing ? "unfollow" : "follow"
|
|
|
|
br
|
|
|
|
div(style="margin-bottom:1em;")
|
|
|
|
| Joined
|
|
|
|
span(title=user.registered.toLocaleString())= user.relativeRegistered
|
|
|
|
div= user.bio || "[no bio]"
|
2024-11-14 03:51:08 +00:00
|
|
|
if user.website
|
|
|
|
a(href=user.website)= user.website
|
2024-12-26 21:24:04 +00:00
|
|
|
h2(style="margin-top:1em;") Current mood
|
2024-11-14 03:51:08 +00:00
|
|
|
if userMood
|
2024-12-26 21:24:04 +00:00
|
|
|
div
|
2024-11-14 03:51:08 +00:00
|
|
|
| Feeling
|
|
|
|
|
|
|
|
|
strong
|
|
|
|
if isSelf
|
|
|
|
| #{currentMood}
|
|
|
|
else
|
|
|
|
| #{userMood.mood}
|
|
|
|
div(style="margin-left:2ch;word-wrap:break-word;")= userMood.desc || "[no mood description]"
|
|
|
|
else
|
2024-12-26 21:24:04 +00:00
|
|
|
div User has not yet set a mood!
|
|
|
|
br
|
|
|
|
h2 Recent journal entries
|
|
|
|
if userJournalEntries.length > 0
|
|
|
|
ul
|
|
|
|
for entry of userJournalEntries
|
|
|
|
li
|
|
|
|
a(href=`/journal/${entry.id}`)= entry.title
|
|
|
|
span.subtle(title=entry.date.toLocaleString()) (#{entry.relativeDate})
|
|
|
|
else
|
|
|
|
div [no entries]
|
2024-11-17 19:16:27 +00:00
|
|
|
br
|
2024-12-26 21:24:04 +00:00
|
|
|
h2 Recent mood updates
|
2024-11-17 19:16:27 +00:00
|
|
|
include _feed.pug
|
|
|
|
+feed(userMoodFeed, true)
|