2017-08-23 05:09:48 +00:00
|
|
|
extends layout.pug
|
|
|
|
|
|
|
|
block content
|
|
|
|
.col-lg-9.col-md-9
|
|
|
|
h3 Public Channels
|
|
|
|
table.table.table-bordered.table-striped
|
|
|
|
thead
|
|
|
|
th Channel
|
|
|
|
th # Connected
|
|
|
|
th Now Playing
|
|
|
|
tbody
|
|
|
|
each chan in channels
|
|
|
|
tr
|
|
|
|
td: a(href=`/${channelPath}/${chan.name}`) #{chan.pagetitle} (#{chan.name})
|
|
|
|
td= chan.usercount
|
|
|
|
td= chan.mediatitle
|
|
|
|
.col-lg-3.col-md-3
|
|
|
|
h3 Enter Channel
|
|
|
|
input#channelname.form-control(type="text", placeholder="Channel Name")
|
|
|
|
p.text-muted New channels can be registered from the <a href="/account/channels">My Channels</a> page.
|
2017-08-25 04:01:10 +00:00
|
|
|
|
|
|
|
append footer
|
2017-08-23 05:09:48 +00:00
|
|
|
script(type="text/javascript").
|
2022-02-09 21:42:47 +00:00
|
|
|
const entrance = document.querySelector('#channelname');
|
|
|
|
entrance.addEventListener('keydown', function (ev) {
|
2017-08-23 05:09:48 +00:00
|
|
|
if (ev.keyCode === 13) {
|
2022-02-09 21:42:47 +00:00
|
|
|
const channel = `/${CHANNELPATH}/${entrance.value}`;
|
|
|
|
if (ev.shiftKey || ev.ctrlKey) {
|
|
|
|
window.open(channel, '_blank');
|
|
|
|
entrance.value = '';
|
|
|
|
} else {
|
|
|
|
location.href = channel;
|
|
|
|
}
|
2017-08-23 05:09:48 +00:00
|
|
|
}
|
|
|
|
});
|