summaryrefslogtreecommitdiff
path: root/views/message_inbox.pug
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-10-13 19:59:06 +0200
committerTor Andersson <tor@ccxvii.net>2023-10-13 22:41:09 +0200
commit4c5d2e4afe02479dcfb770fa1d6cfccb499e4fff (patch)
tree9206a2c5472c5c1480ad5c035b776a74d74a602f /views/message_inbox.pug
parent5cdc7862b20c8642a235e8ea46686939e5f6032a (diff)
downloadserver-4c5d2e4afe02479dcfb770fa1d6cfccb499e4fff.tar.gz
Clean up stylesheet and improve layout on small and large screens.
Use variables for color theming.
Diffstat (limited to 'views/message_inbox.pug')
-rw-r--r--views/message_inbox.pug18
1 files changed, 11 insertions, 7 deletions
diff --git a/views/message_inbox.pug b/views/message_inbox.pug
index 0e39ea2..c6001f5 100644
--- a/views/message_inbox.pug
+++ b/views/message_inbox.pug
@@ -7,6 +7,10 @@ html
style.
.unread { font-weight: bold }
td a { display: block }
+ @media (max-width: 400px) {
+ td:nth-child(3) { display: none }
+ th:nth-child(3) { display: none }
+ }
body
include header
article
@@ -15,7 +19,7 @@ html
p
a(href="/message/send") Send message
- table
+ table.wide.striped
thead
tr
th From
@@ -23,12 +27,12 @@ html
th Date
tbody
each row in messages
- tr
- td
- a.black(href="/user/"+row.from_name)= row.from_name
- td(class=row.is_read?"read":"unread")
- a.black(href="/message/read/"+row.message_id)= row.subject
- td= row.time
+ - let subject = row.subject
+ - if (subject.length > 50) subject = subject.substring(0,40) + "..."
+ tr(class=row.is_read?"read":"unread")
+ td: a.black(href="/user/"+row.from_name)= row.from_name
+ td: a.black(href="/message/read/"+row.message_id)= subject
+ td.w= row.time
else
tr
td(colspan=3) No messages.