fix eslint and change theme colour
This commit is contained in:
parent
78f2307982
commit
32772c679b
3 changed files with 11 additions and 7 deletions
|
@ -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.",
|
||||
|
|
|
@ -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 };
|
||||
|
|
|
@ -31,5 +31,4 @@ router.get('*', async ctx => {
|
|||
ctx.body = html;
|
||||
});
|
||||
|
||||
|
||||
module.exports = router;
|
||||
|
|
Loading…
Add table
Reference in a new issue