You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.4 KiB

extends ../layouts/main
block content
include ../components/pagination-bar
-
var onlineChannels = channels.filter((channel) => channel.lastStatus && (channel.lastStatus.status === 'live'))
var offlineChannels = channels.filter((channel) => !channel.lastStatus || (channel.lastStatus.status !== 'live'))
section.uk-section.uk-section-default.uk-section-small
.uk-container.uk-container-expand
.uk-margin-large
div(uk-grid)
.uk-width-2-3
+renderSectionTitle('Live Channels')
.uk-margin-small
if Array.isArray(onlineChannels) && (onlineChannels.length > 0)
div(uk-grid).uk-grid-small
each channel of onlineChannels
.uk-width-1-3
+renderVenueChannelCard(channel)
else
div There are no live channels. Please check back later!
.uk-width-1-3
+renderSectionTitle('Offline Channels')
.uk-margin-small
if Array.isArray(offlineChannels) && (offlineChannels.length > 0)
ul.uk-list.uk-list-divider
each channel of offlineChannels
li
+renderVenueChannelListItem(channel)
else
div There are no offline channels.
//- pre= JSON.stringify(onlineChannels, null, 2)
//- pre= JSON.stringify(offlineChannels, null, 2)