40 lines
1.2 KiB
Plaintext
Raw Normal View History

component Notifications(notifications []*arn.Notification, viewUser *arn.User, user *arn.User)
2018-02-27 14:27:16 +00:00
h1 Notifications
2018-02-28 22:26:06 +00:00
.corner-buttons
if user.ID == viewUser.ID
button.action(data-action="markNotificationsAsSeen", data-trigger="click")
Icon("check")
span Mark all as seen
2018-02-28 22:26:06 +00:00
.notifications-container
.notifications
each notification in notifications
Notification(notification)
2018-02-27 14:27:16 +00:00
2018-03-01 22:18:29 +00:00
component AllNotifications(notifications []*arn.Notification)
h1 All notifications
.notifications-container
.notifications
each notification in notifications
Notification(notification)
.notification-user
a(href=notification.User().Link())= notification.User().Nick
2018-03-01 22:18:29 +00:00
2018-02-27 14:27:16 +00:00
component Notification(notification *arn.Notification)
a.notification(href=notification.Link, data-seen=notification.Seen, data-id=notification.ID)
2018-02-27 14:27:16 +00:00
.notification-icon
img.lazy(data-src=notification.Icon, alt=notification.Title)
.notification-info
2018-02-28 22:26:06 +00:00
h3.notification-title= notification.Title
2018-03-01 22:18:29 +00:00
2018-02-28 22:26:06 +00:00
.notification-footer
p.notification-text= notification.Message
2018-02-28 23:06:03 +00:00
.notification-date.utc-date(data-date=notification.Created)
if notification.Seen != ""
.notification-seen
RawIcon("check")