favicon custom
html fav tag remove basic meta favi missing favicon recon
This commit is contained in:
parent
aed3e98c79
commit
1e9dabe6e2
4 changed files with 21 additions and 9 deletions
|
@ -5,7 +5,6 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||
<link rel="icon" type="image/png" href="/public/favicon.png" />
|
||||
|
||||
<link rel="preload" href="/public/font/v1/300.woff" as="font" type="font/woff" crossorigin />
|
||||
<link rel="preload" href="/public/font/v1/300i.woff" as="font" type="font/woff" crossorigin />
|
||||
|
|
|
@ -8,6 +8,7 @@ const {
|
|||
OG_IMAGE_URL,
|
||||
SITE_DESCRIPTION,
|
||||
SITE_NAME,
|
||||
FAVICON,
|
||||
} = require('../../config.js');
|
||||
const { generateEmbedUrl, generateStreamUrl, generateDirectUrl } = require('../../ui/util/web');
|
||||
const PAGES = require('../../ui/constants/pages');
|
||||
|
@ -82,20 +83,31 @@ function buildOgMetadata(overrideOptions = {}) {
|
|||
function conditionallyAddPWA() {
|
||||
let head = '';
|
||||
if (DOMAIN === 'odysee.com') {
|
||||
head += '<link rel="manifest" href="./public/pwa/manifest.json"/>';
|
||||
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;
|
||||
}
|
||||
|
||||
function addFavicon() {
|
||||
let head = '';
|
||||
head += `<link rel="icon" type="image/png" href="${FAVICON || './public/favicon.png'}" />`;
|
||||
return head;
|
||||
}
|
||||
|
||||
function buildHead() {
|
||||
const head = '<!-- VARIABLE_HEAD_BEGIN -->' + conditionallyAddPWA() + buildOgMetadata() + '<!-- VARIABLE_HEAD_END -->';
|
||||
const head =
|
||||
'<!-- VARIABLE_HEAD_BEGIN -->' +
|
||||
addFavicon() +
|
||||
conditionallyAddPWA() +
|
||||
buildOgMetadata() +
|
||||
'<!-- VARIABLE_HEAD_END -->';
|
||||
return head;
|
||||
}
|
||||
|
||||
function buildBasicOgMetadata() {
|
||||
const head = '<!-- VARIABLE_HEAD_BEGIN -->' + buildOgMetadata() + '<!-- VARIABLE_HEAD_END -->';
|
||||
const head = '<!-- VARIABLE_HEAD_BEGIN -->' + addFavicon() + buildOgMetadata() + '<!-- VARIABLE_HEAD_END -->';
|
||||
return head;
|
||||
}
|
||||
|
||||
|
@ -128,6 +140,7 @@ function buildClaimOgMetadata(uri, claim, overrideOptions = {}) {
|
|||
|
||||
let head = '';
|
||||
|
||||
head += `${addFavicon()}`;
|
||||
head += '<meta charset="utf8"/>';
|
||||
head += `<title>${title}</title>`;
|
||||
head += `<meta name="description" content="${cleanDescription}"/>`;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { generateDownloadUrl } = require('../../ui/util/web');
|
||||
const { URL, SITE_NAME, LBRY_WEB_API } = require('../../config.js');
|
||||
const { URL, SITE_NAME, LBRY_WEB_API, FAVICON } = require('../../config.js');
|
||||
const { Lbry } = require('lbry-redux');
|
||||
const Feed = require('feed').Feed;
|
||||
|
||||
|
@ -82,7 +82,7 @@ async function getFeed(channelClaim, feedLink) {
|
|||
const title = value ? value.title : channelClaim.name;
|
||||
|
||||
const options = {
|
||||
favicon: URL + '/public/favicon.png',
|
||||
favicon: FAVICON || URL + '/public/favicon.png',
|
||||
generator: SITE_NAME + ' RSS Feed',
|
||||
title: title + ' on ' + SITE_NAME,
|
||||
description: fmtDescription(value && value.description ? value.description : ''),
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
const { URL, SITE_TITLE } = require('../../config.js');
|
||||
|
||||
const { URL, SITE_TITLE, FAVICON } = require('../../config.js');
|
||||
const favicon = FAVICON || `${URL}/public/favicon.png`;
|
||||
function getOpenSearchXml() {
|
||||
return (
|
||||
`<ShortName>${SITE_TITLE}</ShortName>` +
|
||||
`<Description>Search ${SITE_TITLE}</Description>` +
|
||||
'<InputEncoding>UTF-8</InputEncoding>' +
|
||||
`<Image width="32" height="32" type="image/png">${URL}/public/favicon.png</Image>` +
|
||||
`<Image width="32" height="32" type="image/png">${favicon}</Image>` +
|
||||
`<Url type="text/html" method="get" template="${URL}/$/search?q={searchTerms}"/>` +
|
||||
`<moz:SearchForm>${URL}</moz:SearchForm>`
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue