extends ../../layouts/main block page-footer block content-container mixin renderRoomList (rooms) each room in ownedChatRooms li.uk-active a(href=`/chat/${room._id}`)= room.name section.site-chat-section div(uk-grid).uk-height-1-1 div(class="uk-width-1-1 uk-width-1-5@l uk-flex-last uk-flex-first@l") .content-block.uk-border-rounded.uk-margin if Array.isArray(ownedChatRooms) && (ownedChatRooms.length > 0) ul#room-list.uk-nav.uk-nav-default li.uk-nav-header Your Rooms +renderRoomList(ownedChatRooms) else div You don't own any chat rooms. .content-block.uk-border-rounded if Array.isArray(joinedChatRooms) && (joinedChatRooms.length > 0) ul#room-list.uk-nav.uk-nav-default li.uk-nav-header Joined Rooms +renderRoomList(ownedChatRooms) else div You haven't joined any chat rooms. div(class="uk-width-1-1 uk-width-expand@l").uk-height-1-1 #chat-room.uk-height-1-1 block content div(class="uk-width-1-1 uk-width-1-5@l") .content-block.uk-border-rounded if chatRoom if Array.isArray(chatRoom.members) && (chatRoom.members.length > 0) ul#room-member-list.uk-nav.uk-nav-default li.uk-nav-header Room Members each member in chatRoom.members li a(href="")= member.displayName || member.username else div The room has no members else div Not in a room block viewjs script. window.dtp.room = !{JSON.stringify(room)};