fix eslint and change theme colour

This commit is contained in:
Anthony 2021-06-03 17:36:55 +02:00 committed by Jeremy Kauffman
parent 78f2307982
commit 32772c679b
3 changed files with 11 additions and 7 deletions

View file

@ -1,7 +1,7 @@
{
"name": "Odysee",
"short_name": "Odysee",
"theme_color": "#183793",
"theme_color": "#fa6164",
"background_color": "#FAFAFA",
"display": "minimal-ui",
"description": "Odysee is a place where you can find great videos, music, ebooks, and more: imagine a vast digital library that is available on all of your devices.",

View file

@ -81,9 +81,9 @@ function buildOgMetadata(overrideOptions = {}) {
function conditionallyAddPWA() {
let head = '';
if (SITE_TITLE === 'Odysee') {
head += '<link rel="manifest" href="./public/pwa/manifest.json"/>'
head += '<link rel="apple-touch-icon" sizes="180x180" href="./public/pwa/icon-180.png">'
head += '<script src="./serviceWorker.js"></script>'
head += '<link rel="manifest" href="./public/pwa/manifest.json"/>';
head += '<link rel="apple-touch-icon" sizes="180x180" href="./public/pwa/icon-180.png">';
head += '<script src="./serviceWorker.js"></script>';
}
return head;
}
@ -93,6 +93,11 @@ function buildHead() {
return head;
}
function buildBasicOgMetadata() {
const head = '<!-- VARIABLE_HEAD_BEGIN -->' + buildOgMetadata() + '<!-- VARIABLE_HEAD_END -->';
return head;
}
//
// Metadata used for urls that need claim information
// Also has option to override defaults
@ -312,8 +317,8 @@ async function getHtml(ctx) {
}
}
const ogMetadata = buildHead();
return insertToHead(html, ogMetadata);
const ogMetadataAndPWA = buildHead();
return insertToHead(html, ogMetadataAndPWA);
}
module.exports = { insertToHead, buildHead, getHtml };

View file

@ -31,5 +31,4 @@ router.get('*', async ctx => {
ctx.body = html;
});
module.exports = router;