allow better setting logo from configuration
parent
87b2811f17
commit
105afb7a6e
|
|
@ -3,8 +3,16 @@ module.exports = function(s,config,lang,app,io){
|
|||
if(config.poweredByShinobi === undefined){config.poweredByShinobi='Powered by Shinobi.Systems'}
|
||||
if(config.webPageTitle === undefined){config.webPageTitle='Shinobi'}
|
||||
if(config.showLoginCardHeader === undefined){config.showLoginCardHeader=true}
|
||||
if(config.webFavicon === undefined){config.webFavicon='libs/img/icon/favicon.ico'}
|
||||
if(config.logoLocation76x76 === undefined){config.logoLocation76x76='libs/img/icon/apple-touch-icon-76x76.png'}
|
||||
if(config.webFavicon === undefined){config.webFavicon = 'libs/img/icon/favicon.ico'}
|
||||
if(!config.logoLocationAppleTouchIcon)config.logoLocationAppleTouchIcon = 'libs/img/icon/apple-touch-icon.png';
|
||||
if(!config.logoLocation57x57)config.logoLocation57x57 = 'libs/img/icon/apple-touch-icon-57x57.png';
|
||||
if(!config.logoLocation72x72)config.logoLocation72x72 = 'libs/img/icon/apple-touch-icon-72x72.png';
|
||||
if(!config.logoLocation76x76)config.logoLocation76x76 = 'libs/img/icon/apple-touch-icon-76x76.png';
|
||||
if(!config.logoLocation114x114)config.logoLocation114x114 = 'libs/img/icon/apple-touch-icon-114x114.png';
|
||||
if(!config.logoLocation120x120)config.logoLocation120x120 = 'libs/img/icon/apple-touch-icon-120x120.png';
|
||||
if(!config.logoLocation144x144)config.logoLocation144x144 = 'libs/img/icon/apple-touch-icon-144x144.png';
|
||||
if(!config.logoLocation152x152)config.logoLocation152x152 = 'libs/img/icon/apple-touch-icon-152x152.png';
|
||||
if(!config.logoLocation196x196)config.logoLocation196x196 = 'libs/img/icon/favicon-196x196.png';
|
||||
if(config.logoLocation76x76Link === undefined){config.logoLocation76x76Link='https://shinobi.video'}
|
||||
if(config.logoLocation76x76Style === undefined){config.logoLocation76x76Style='border-radius:50%'}
|
||||
if(config.loginScreenBackground === undefined){config.loginScreenBackground='https://shinobi.video/libs/assets/backgrounds/7.jpg'}
|
||||
|
|
@ -34,7 +42,6 @@ module.exports = function(s,config,lang,app,io){
|
|||
}
|
||||
]
|
||||
}
|
||||
|
||||
s.getConfigWithBranding = function(domain){
|
||||
var configCopy = Object.assign({},config)
|
||||
if(config.brandingConfig && config.brandingConfig[domain]){
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ function drawMonitorIconToMenu(item){
|
|||
var html = `<li class="nav-item monitor-icon monitor_block glM${item.mid}" data-ke="${item.ke}" data-mid="${item.mid}" data-status-code="${item.code}">
|
||||
<div title="Monitor ID : ${item.mid}" class="d-flex d-flex-row align-items-center p-2 mt-0 mb-3 mx-0 btn btn-default rounded shadow-sm cursor-pointer">
|
||||
<div class="lh-1 text-start">
|
||||
<img class="me-3 snapshot launch-live-grid-monitor" src="${true ? `libs/img/icon/favicon-196x196.png` : getApiPrefix('icon') + '/' + item.mid}">
|
||||
<img class="me-3 snapshot launch-live-grid-monitor" src="${true ? logoLocation196x196 : getApiPrefix('icon') + '/' + item.mid}">
|
||||
</div>
|
||||
<div class="lh-1 text-start hidden-squeeze">
|
||||
<h1 class="h6 mb-0 lh-1"><span class="monitor_name">${item.name}</span></h1>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
<%
|
||||
if(!window.libURL)window.libURL = originalURL
|
||||
if(!window.libURL)window.libURL = originalURL;
|
||||
%>
|
||||
<link rel="icon" href="<%-window.libURL%><%-config.webFavicon%>" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="<%-window.libURL%><%-config.webFavicon%>" type="image/x-icon" />
|
||||
<link rel="icon" href="<%- window.libURL%><%-config.webFavicon%>" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="<%- window.libURL%><%-config.webFavicon%>" type="image/x-icon" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-title" content="<%-config.webPageTitle%>">
|
||||
<link rel="apple-touch-icon" href="<%-window.libURL%>libs/img/icon/apple-touch-icon.png" />
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="<%-window.libURL%>libs/img/icon/apple-touch-icon-57x57.png" />
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="<%-window.libURL%>libs/img/icon/apple-touch-icon-72x72.png" />
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="<%-window.libURL%>libs/img/icon/apple-touch-icon-76x76.png" />
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="<%-window.libURL%>libs/img/icon/apple-touch-icon-114x114.png" />
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="<%-window.libURL%>libs/img/icon/apple-touch-icon-120x120.png" />
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="<%-window.libURL%>libs/img/icon/apple-touch-icon-144x144.png" />
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="<%-window.libURL%>libs/img/icon/apple-touch-icon-152x152.png" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="<%-window.libURL%>libs/img/icon/apple-touch-icon-180x180.png" />
|
||||
<meta name="apple-mobile-web-app-title" content="<%- config.webPageTitle%>">
|
||||
<link rel="apple-touch-icon" href="<%- window.libURL + config.logoLocationAppleTouchIcon %>" />
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="<%- window.libURL + config.logoLocation57x57 %>" />
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="<%- window.libURL + config.logoLocation72x72 %>" />
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="<%- window.libURL + config.logoLocation76x76 %>" />
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="<%- window.libURL + config.logoLocation114x114 %>" />
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="<%- window.libURL + config.logoLocation120x120 %>" />
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="<%- window.libURL + config.logoLocation144x144 %>" />
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="<%- window.libURL + config.logoLocation152x152 %>" />
|
||||
<link rel="apple-touch-icon" sizes="196x196" href="<%- window.libURL + config.logoLocation196x196 %>" />
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
<% window.additionalJsScripts = []; %>
|
||||
<%
|
||||
if(!window.libURL)window.libURL = originalURL;
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
|
@ -9,25 +12,8 @@
|
|||
<meta name="author" content="Moe Alam, moeiscool on Gitlab and GitHub">
|
||||
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<link rel="icon" href="libs/img/icon/favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="libs/img/icon/favicon.ico" type="image/x-icon" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-title" content="Shinobi">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="libs/img/icon/apple-touch-icon-57x57.png" />
|
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="libs/img/icon/apple-touch-icon-114x114.png" />
|
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="libs/img/icon/apple-touch-icon-72x72.png" />
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="libs/img/icon/apple-touch-icon-144x144.png" />
|
||||
<link rel="apple-touch-icon-precomposed" sizes="60x60" href="libs/img/icon/apple-touch-icon-60x60.png" />
|
||||
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="libs/img/icon/apple-touch-icon-120x120.png" />
|
||||
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="libs/img/icon/apple-touch-icon-76x76.png" />
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="libs/img/icon/apple-touch-icon-152x152.png" />
|
||||
<link rel="icon" type="image/png" href="libs/img/icon/favicon-196x196.png" sizes="196x196" />
|
||||
<link rel="icon" type="image/png" href="libs/img/icon/favicon-96x96.png" sizes="96x96" />
|
||||
<link rel="icon" type="image/png" href="libs/img/icon/favicon-32x32.png" sizes="32x32" />
|
||||
<link rel="icon" type="image/png" href="libs/img/icon/favicon-16x16.png" sizes="16x16" />
|
||||
<link rel="icon" type="image/png" href="libs/img/icon/favicon-128.png" sizes="128x128" />
|
||||
<% include header-favicon.ejs %>
|
||||
<meta name="application-name" content="Shinobi"/>
|
||||
<meta name="msapplication-TileColor" content="#333333" />
|
||||
<meta name="msapplication-TileImage" content="libs/img/icon/mstile-144x144.png" />
|
||||
|
|
@ -97,6 +83,7 @@
|
|||
<script>lang = <%- JSON.stringify(lang) %></script>
|
||||
<script>definitions = <%- JSON.stringify(define) %></script>
|
||||
<script>addStorage = <%- JSON.stringify(addStorage) %>;</script>
|
||||
<script>logoLocation196x196 = `<%- window.libURL + config.logoLocation196x196 %>`;</script>
|
||||
<script>libURL = location.search === '?p2p=1' ? location.pathname + '/' : '<%-window.libURL%>';</script>
|
||||
<script>HWAccelChoices = [
|
||||
<% if(config.availableHWAccels) {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
<link rel="stylesheet" href="<%-window.libURL%>assets/css/gradients.css">
|
||||
<link rel="stylesheet" href="<%-window.libURL%>assets/css/bs5.darktheme.css">
|
||||
<link rel="stylesheet" href="<%-window.libURL%>libs/css/roboto.css" type="text/css" />
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
||||
<% include blocks/header-favicon.ejs %>
|
||||
<script src="<%-window.libURL%>libs/js/jquery.min.js"></script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue