add chat and public rooms

master
rob 2 years ago
parent 6b36c3b01d
commit c2f1a88fc4

@ -5,11 +5,13 @@ block content
#site-chat-container.uk-flex.uk-flex-column.uk-height-1-1
.chat-menubar.uk-padding-small
div(uk-grid).uk-grid-small
div(uk-grid).uk-grid-small.uk-flex-middle
.uk-width-auto
img(src=`/img/icon/${site.domainKey}/icon-48x48.png`, alt=`${site.name} icon`)
.uk-width-expand
h1.uk-margin-remove #{site.name} Chat Timeline
.uk-width-auto
a(href='/chat/room').uk-button.uk-button-secondary.uk-button-small.uk-border-rounded Public Rooms
.chat-content-wrapper
#chat-message-list-wrapper.uk-height-1-1

@ -2,28 +2,33 @@ extends ../layouts/room
block content
mixin renderRoomTile (room)
div(data-room-id= room._id, data-room-name= room.name).uk-tile.uk-tile-default.uk-tile-small
.uk-tile-body
div(uk-grid).uk-grid-small
.uk-width-auto
.uk-width-expand
.uk-margin-small
div(title= room.name).uk-text-bold.uk-text-truncate= room.name
.uk-text-small.uk-text-truncate= room.description
div(uk-grid).uk-grid-small.uk-text-small.uk-text-muted.no-select
.uk-width-expand
a(href= getUserProfileUrl(room.owner))= room.owner.username
.uk-width-auto
span
i.fas.fa-users
span.uk-margin-small-left= formatCount(room.members.length)
a(href=`/chat/room/${room._id}`).uk-display-block.uk-link-reset
div(data-room-id= room._id, data-room-name= room.name).uk-tile.uk-tile-default.uk-tile-small
.uk-tile-body
div(uk-grid).uk-grid-small
.uk-width-auto
+renderProfileIcon(room.owner)
.uk-width-expand
.uk-margin-small
div(title= room.name).uk-text-bold.uk-text-truncate= room.name
.uk-text-small.uk-text-truncate= room.description
div(uk-grid).uk-grid-small.uk-text-small.uk-text-muted.no-select
.uk-width-expand
a(href= getUserProfileUrl(room.owner))= room.owner.username
.uk-width-auto
span
i.fas.fa-users
span.uk-margin-small-left= formatCount(room.members.length)
.uk-height-1-1.uk-overflow-auto
h1 Public Rooms
div(uk-grid)
each room in publicRooms
.uk-width-1-3
+renderRoomTile(room)
pre= JSON.stringify(publicRooms, null, 2)
.uk-card.uk-card-default.uk-card-small
.uk-card-header
h1.uk-card-title Public Chat Rooms
.uk-card-body
if Array.isArray(publicRooms) && (publicRooms.length > 0)
div(uk-grid)
each room in publicRooms
div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@l")
+renderRoomTile(room)
else
div #{site.name} has no public rooms.

@ -16,6 +16,9 @@ nav(uk-navbar).uk-navbar-container.uk-position-fixed.uk-position-top
li(class={ 'uk-active': currentView === 'home' })
a(href="/", title= "Home")
+renderButtonIcon('fa-home', 'Home')
li(class={ 'uk-active': currentView === 'chat' })
a(href="/chat", title= "chat")
+renderButtonIcon('fa-comment-alt', 'Chat')
div(class="uk-hidden@m").uk-navbar-center
//- Site name

Loading…
Cancel
Save