diff --git a/app/controllers/venue.js b/app/controllers/venue.js index 8440ae3..4648832 100644 --- a/app/controllers/venue.js +++ b/app/controllers/venue.js @@ -4,11 +4,7 @@ 'use strict'; -const path = require('path'); - const express = require('express'); -const captcha = require('svg-captcha'); - const { SiteController } = require('../../lib/site-lib'); class VenueController extends SiteController { diff --git a/app/views/admin/settings/editor.pug b/app/views/admin/settings/editor.pug index db93541..ec8aab5 100644 --- a/app/views/admin/settings/editor.pug +++ b/app/views/admin/settings/editor.pug @@ -28,6 +28,16 @@ block content legend Featured Embed textarea(id="featured-embed", name="featuredEmbed", rows="4").uk-textarea.uk-resize-vertical= site.featuredEmbed + fieldset + legend Shing.tv Widget Key + div(uk-grid).uk-grid-small + div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl") + label(for="shing-channel-slug").uk-form-label Shing.tv Channel Slug + input(id="shing-channel-slug", name="shingChannelSlug", type="text", placeholder="Enter Shing.tv channel slug", value= site.shingChannelSlug).uk-input + div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl") + label(for="shing-widget-key").uk-form-label Shing.tv Widget Key + input(id="shing-widget-key", name="shingWidgetKey", type="text", placeholder="Enter Shing.tv widget key", value= site.shingWidgetKey).uk-input + fieldset legend Gab links div(uk-grid).uk-grid-small diff --git a/app/views/components/navbar.pug b/app/views/components/navbar.pug index 5ae7a40..a2f2db6 100644 --- a/app/views/components/navbar.pug +++ b/app/views/components/navbar.pug @@ -16,6 +16,14 @@ 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') + + if site.shingWidgetKey && site.shingChannelSlug + li(class={ 'uk-active': currentView === 'venue' }) + a(href="/venue", title= "Live") + span + img(src="https://shing.tv/img/icon/shing.tv/icon-32x32.png") + span(class="uk-visible@m").uk-margin-small-left Live + each menuItem in mainMenu li(class={ 'uk-active': (pageSlug === menuItem.slug) }) a(href= menuItem.url, title= menuItem.label) diff --git a/app/views/components/off-canvas.pug b/app/views/components/off-canvas.pug index 0067cc6..40cb6a4 100644 --- a/app/views/components/off-canvas.pug +++ b/app/views/components/off-canvas.pug @@ -20,6 +20,11 @@ mixin renderMenuItem (iconClass, label) a(href='/').uk-display-block +renderMenuItem('fa-home', 'Home') + if site.shingWidgetKey + li(class={ "uk-active": (currentView === 'venue') }) + a(href='/venue').uk-display-block + +renderMenuItem('fa-home', 'Watch Live') + each menuItem in mainMenu li(class={ 'uk-active': (pageSlug === menuItem.slug) }) a(href= menuItem.url, title= menuItem.label) diff --git a/app/views/venue/embed.pug b/app/views/venue/embed.pug index 96db7c9..893344c 100644 --- a/app/views/venue/embed.pug +++ b/app/views/venue/embed.pug @@ -1,8 +1,5 @@ extends ../layouts/main block content - div(uk-grid).uk-grid-collapse - .uk-width-medium - +renderPageSidebar() - .uk-width-expand - iframe(src="http:///localhost:3333/channel/rob/embed/venue?k=rYLHSXs1fm1i#", style="width: 100%; height: 720px;") \ No newline at end of file + - var shingBaseUrl = (process.env.NODE_ENV === 'production') ? 'https://shing.tv' : 'http://localhost:3333'; + iframe(src= `${shingBaseUrl}/channel/${site.shingChannelSlug}/embed/venue?k=${site.shingWidgetKey}`, style="width: 100%; height: 720px;", allowfullscreen) \ No newline at end of file