favicon custom

html fav tag remove

basic meta favi

missing favicon

recon
This commit is contained in:
zeppi 2021-07-23 11:34:11 -04:00
parent a145ce5df3
commit 408dd029eb
7 changed files with 21 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -5,7 +5,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> <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/300.woff" as="font" type="font/woff" crossorigin />
<link rel="preload" href="/public/font/v1/300i.woff" as="font" type="font/woff" crossorigin /> <link rel="preload" href="/public/font/v1/300i.woff" as="font" type="font/woff" crossorigin />

View file

@ -38,13 +38,9 @@ export const getSearchQueryString = (query: string, options: any = {}) => {
const encodedQuery = encodeURIComponent(query); const encodedQuery = encodeURIComponent(query);
const queryParams = [ const queryParams = [
options.exact && !isSurroundedByQuotes(encodedQuery) ? `s="${encodedQuery}"` : `s=${encodedQuery}`, options.exact && !isSurroundedByQuotes(encodedQuery) ? `s="${encodedQuery}"` : `s=${encodedQuery}`,
`free_only=true`,
`size=${options.size || DEFAULT_SEARCH_SIZE}`, `size=${options.size || DEFAULT_SEARCH_SIZE}`,
`from=${options.from || DEFAULT_SEARCH_RESULT_FROM}`, `from=${options.from || DEFAULT_SEARCH_RESULT_FROM}`,
// `mediaType=${SEARCH_OPTIONS.MEDIA_VIDEO}`,
// `claimType=${SEARCH_OPTIONS.INCLUDE_FILES}`,
]; ];
const { isBackgroundSearch } = options; const { isBackgroundSearch } = options;
const includeUserOptions = typeof isBackgroundSearch === 'undefined' ? false : !isBackgroundSearch; const includeUserOptions = typeof isBackgroundSearch === 'undefined' ? false : !isBackgroundSearch;

View file

@ -8,6 +8,7 @@ const {
OG_IMAGE_URL, OG_IMAGE_URL,
SITE_DESCRIPTION, SITE_DESCRIPTION,
SITE_NAME, SITE_NAME,
FAVICON,
} = require('../../config.js'); } = require('../../config.js');
const { generateEmbedUrl, generateStreamUrl, generateDirectUrl } = require('../../ui/util/web'); const { generateEmbedUrl, generateStreamUrl, generateDirectUrl } = require('../../ui/util/web');
const PAGES = require('../../ui/constants/pages'); const PAGES = require('../../ui/constants/pages');
@ -82,20 +83,31 @@ function buildOgMetadata(overrideOptions = {}) {
function conditionallyAddPWA() { function conditionallyAddPWA() {
let head = ''; let head = '';
if (DOMAIN === 'odysee.com') { 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 += '<link rel="apple-touch-icon" sizes="180x180" href="./public/pwa/icon-180.png">';
head += '<script src="./serviceWorker.js"></script>'; head += '<script src="./serviceWorker.js"></script>';
} }
return head; return head;
} }
function addFavicon() {
let head = '';
head += `<link rel="icon" type="image/png" href="${FAVICON || './public/favicon.png'}" />`;
return head;
}
function buildHead() { 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; return head;
} }
function buildBasicOgMetadata() { function buildBasicOgMetadata() {
const head = '<!-- VARIABLE_HEAD_BEGIN -->' + buildOgMetadata() + '<!-- VARIABLE_HEAD_END -->'; const head = '<!-- VARIABLE_HEAD_BEGIN -->' + addFavicon() + buildOgMetadata() + '<!-- VARIABLE_HEAD_END -->';
return head; return head;
} }
@ -128,6 +140,7 @@ function buildClaimOgMetadata(uri, claim, overrideOptions = {}) {
let head = ''; let head = '';
head += `${addFavicon()}`;
head += '<meta charset="utf8"/>'; head += '<meta charset="utf8"/>';
head += `<title>${title}</title>`; head += `<title>${title}</title>`;
head += `<meta name="description" content="${cleanDescription}"/>`; head += `<meta name="description" content="${cleanDescription}"/>`;

View file

@ -1,5 +1,5 @@
const { generateDownloadUrl } = require('../../ui/util/web'); 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 { Lbry } = require('lbry-redux');
const Feed = require('feed').Feed; const Feed = require('feed').Feed;
@ -82,7 +82,7 @@ async function getFeed(channelClaim, feedLink) {
const title = value ? value.title : channelClaim.name; const title = value ? value.title : channelClaim.name;
const options = { const options = {
favicon: URL + '/public/favicon.png', favicon: FAVICON || URL + '/public/favicon.png',
generator: SITE_NAME + ' RSS Feed', generator: SITE_NAME + ' RSS Feed',
title: title + ' on ' + SITE_NAME, title: title + ' on ' + SITE_NAME,
description: fmtDescription(value && value.description ? value.description : ''), description: fmtDescription(value && value.description ? value.description : ''),

View file

@ -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() { function getOpenSearchXml() {
return ( return (
`<ShortName>${SITE_TITLE}</ShortName>` + `<ShortName>${SITE_TITLE}</ShortName>` +
`<Description>Search ${SITE_TITLE}</Description>` + `<Description>Search ${SITE_TITLE}</Description>` +
'<InputEncoding>UTF-8</InputEncoding>' + '<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}"/>` + `<Url type="text/html" method="get" template="${URL}/$/search?q={searchTerms}"/>` +
`<moz:SearchForm>${URL}</moz:SearchForm>` `<moz:SearchForm>${URL}</moz:SearchForm>`
); );