mirror of
https://git.sr.ht/~roxwize/mipilin
synced 2025-01-30 18:53:36 +00:00
23 lines
648 B
Text
23 lines
648 B
Text
mixin feed(feed, hideUser)
|
|
if feed.length > 0
|
|
#feed
|
|
for update of feed
|
|
.feed-update
|
|
div
|
|
a(href=`/users/${update.user}`)
|
|
if !hideUser
|
|
| #{update.user}
|
|
strong= update.mood
|
|
div= update.desc || "[no mood description provided]"
|
|
div(title=update.date.toLocaleString())= update.relativeDate
|
|
else
|
|
span [no updates]
|
|
|
|
mixin invite_code_expiration(code)
|
|
- const timestamp = code.expires.getTime()
|
|
if timestamp === 0
|
|
td.subtle never
|
|
else if Date.now() >= timestamp
|
|
td.error EXPIRED
|
|
else
|
|
td= code.expiresString
|