Fix overlap betwen favicon and splash icon

This commit is contained in:
ThatOneCalculator 2022-08-15 15:55:30 -07:00
parent 3badf5546a
commit f101791d02
2 changed files with 5 additions and 4 deletions

View file

@ -530,16 +530,17 @@ router.get('(.*)', async ctx => {
if (meta.customMOTD.length > 0) { if (meta.customMOTD.length > 0) {
motd = meta.customMOTD; motd = meta.customMOTD;
} }
let iconUrl = meta.iconUrl; let splashIconUrl = meta.iconUrl;
if (meta.customSplashIcons.length > 0) { if (meta.customSplashIcons.length > 0) {
iconUrl = meta.customSplashIcons[Math.floor(Math.random() * meta.customSplashIcons.length)]; splashIconUrl = meta.customSplashIcons[Math.floor(Math.random() * meta.customSplashIcons.length)];
} }
await ctx.render('base', { await ctx.render('base', {
img: meta.bannerUrl, img: meta.bannerUrl,
title: meta.name || 'Calckey', title: meta.name || 'Calckey',
instanceName: meta.name || 'Calckey', instanceName: meta.name || 'Calckey',
desc: meta.description, desc: meta.description,
icon: iconUrl, icon: meta.iconUrl,
splashIcon: splashIconUrl,
themeColor: meta.themeColor, themeColor: meta.themeColor,
privateMode: meta.privateMode, privateMode: meta.privateMode,
randomMOTD: motd[Math.floor(Math.random() * motd.length)], randomMOTD: motd[Math.floor(Math.random() * motd.length)],

View file

@ -77,7 +77,7 @@ html
br br
| Please turn on your JavaScript | Please turn on your JavaScript
div#splash div#splash
img#splashIcon(src= icon || '/static-assets/splash.png') img#splashIcon(src= splashIcon || '/static-assets/splash.png')
span#splashText span#splashText
block randomMOTD block randomMOTD
= randomMOTD = randomMOTD