Chore/favicon fix (#22226)
* chore: move favicon logic to package * update application names * Delete Favicons.tsx * add more props * add more props * update * cleamn * clean up * Update _app.tsx * Update _app.tsx * add missing favicons and size optimization --------- Co-authored-by: Francesco Sansalvadore <f.sansalvadore@gmail.com>
No files matched your search
@@ -1,52 +0,0 @@
|
||||
import Head from 'next/head'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
const Favicons = () => {
|
||||
const { basePath } = useRouter()
|
||||
return (
|
||||
<Head>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="57x57" href={`${basePath}/favicon/apple-touch-icon-57x57.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href={`${basePath}/favicon/apple-touch-icon-114x114.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href={`${basePath}/favicon/apple-touch-icon-72x72.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href={`${basePath}/favicon/apple-touch-icon-144x144.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="60x60" href={`${basePath}/favicon/apple-touch-icon-60x60.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="120x120" href={`${basePath}/favicon/apple-touch-icon-120x120.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="76x76" href={`${basePath}/favicon/apple-touch-icon-76x76.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href={`${basePath}/favicon/apple-touch-icon-152x152.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}/favicon/favicon-196x196.png`} sizes="196x196"/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}/favicon/favicon-96x96.png`} sizes="96x96"/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}/favicon/favicon-32x32.png`} sizes="32x32"/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}/favicon/favicon-16x16.png`} sizes="16x16"/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}/favicon/favicon-128.png`} sizes="128x128"/>
|
||||
<meta name="application-name" content=" " />
|
||||
<meta name="msapplication-TileColor" content="#1E1E1E" />
|
||||
<meta name="msapplication-TileImage" content="mstile-144x144.png" />
|
||||
<meta name="msapplication-square70x70logo" content="mstile-70x70.png" />
|
||||
<meta name="msapplication-square150x150logo" content="mstile-150x150.png" />
|
||||
<meta name="msapplication-wide310x150logo" content="mstile-310x150.png" />
|
||||
<meta name="msapplication-square310x310logo" content="mstile-310x310.png" />
|
||||
<meta name="theme-color" content="#1E1E1E" />
|
||||
<link rel="shortcut icon" href={`${basePath}/favicon/favicon.ico`} />
|
||||
<link rel="icon" type="image/png" href={`${basePath}/favicon/favicon.ico`} />
|
||||
{/* misc */}
|
||||
<link rel="manifest" href={`${basePath}/favicon/manifest.json`} />
|
||||
<meta name="msapplication-config" content={`${basePath}/favicon/browserconfig.xml`} />
|
||||
<link rel="alternate" type="application/rss+xml" href={`${basePath}/feed.xml`} />
|
||||
</Head>
|
||||
)
|
||||
}
|
||||
|
||||
export default Favicons
|
||||
@@ -15,7 +15,7 @@ import { PortalToast, TabsProvider } from 'ui'
|
||||
import { CommandMenuProvider } from 'ui-patterns/Cmdk'
|
||||
import { useConsent } from 'ui-patterns/ConsentToast'
|
||||
|
||||
import Favicons from '~/components/Favicons'
|
||||
import MetaFaviconsPagesRouter from 'common/MetaFavicons/pages-router'
|
||||
import SiteLayout from '~/layouts/SiteLayout'
|
||||
import { BUILD_PREVIEW_HTML, IS_PLATFORM, IS_PREVIEW } from '~/lib/constants'
|
||||
import { unauthedAllowedPost } from '~/lib/fetch/fetchWrappers'
|
||||
@@ -217,7 +217,7 @@ function MyApp({ Component, pageProps }: AppPropsWithLayout) {
|
||||
return (
|
||||
<ShortcutPreviewBuild>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<Favicons />
|
||||
<MetaFaviconsPagesRouter applicationName="Supabase Docs" />
|
||||
<Head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
</Head>
|
||||
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 624 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 800 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 840 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 913 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 868 B After Width: | Height: | Size: 341 B |
|
After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 568 B |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1022 B |
@@ -1,57 +0,0 @@
|
||||
import Head from 'next/head'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
const Favicons = () => {
|
||||
const { basePath } = useRouter()
|
||||
return (
|
||||
<Head>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="57x57" href={`${basePath}/favicon/apple-touch-icon-57x57.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href={`${basePath}/favicon/apple-touch-icon-114x114.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href={`${basePath}/favicon/apple-touch-icon-72x72.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href={`${basePath}/favicon/apple-touch-icon-144x144.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="60x60" href={`${basePath}/favicon/apple-touch-icon-60x60.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="120x120" href={`${basePath}/favicon/apple-touch-icon-120x120.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="76x76" href={`${basePath}/favicon/apple-touch-icon-76x76.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href={`${basePath}/favicon/apple-touch-icon-152x152.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}/favicon/favicon-196x196.png`} sizes="196x196"/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}/favicon/favicon-96x96.png`} sizes="96x96"/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}/favicon/favicon-32x32.png`} sizes="32x32"/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}/favicon/favicon-16x16.png`} sizes="16x16"/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}/favicon/favicon-128.png`} sizes="128x128"/>
|
||||
<meta name="application-name" content=" " />
|
||||
<meta name="msapplication-TileColor" content="#1E1E1E" />
|
||||
<meta name="msapplication-TileImage" content="mstile-144x144.png" />
|
||||
<meta name="msapplication-square70x70logo" content="mstile-70x70.png" />
|
||||
<meta name="msapplication-square150x150logo" content="mstile-150x150.png" />
|
||||
<meta name="msapplication-wide310x150logo" content="mstile-310x150.png" />
|
||||
<meta name="msapplication-square310x310logo" content="mstile-310x310.png" />
|
||||
<meta name="theme-color" content="#1E1E1E" />
|
||||
<link rel="shortcut icon" href={`${basePath}/favicon/favicon.ico`} />
|
||||
<link rel="icon" type="image/png" href={`${basePath}/favicon/favicon.ico`} />
|
||||
{/* misc */}
|
||||
<link
|
||||
rel="manifest"
|
||||
href={`${basePath}/favicon/manifest.json`}
|
||||
crossOrigin="use-credentials"
|
||||
/>
|
||||
<link rel="alternate" type="application/rss+xml" href={`${basePath}/feed.xml`} />
|
||||
<link rel="apple-touch-icon" href={`${basePath}/favicon/favicon.ico`} />
|
||||
<meta name="msapplication-config" content={`${basePath}/favicon/browserconfig.xml`} />
|
||||
</Head>
|
||||
)
|
||||
}
|
||||
|
||||
export default Favicons
|
||||
@@ -34,7 +34,7 @@ import toast from 'react-hot-toast'
|
||||
import { PortalToast, Toaster } from 'ui'
|
||||
import { ConsentToast } from 'ui-patterns/ConsentToast'
|
||||
|
||||
import Favicons from 'components/head/Favicons'
|
||||
import MetaFaviconsPagesRouter from 'common/MetaFavicons/pages-router'
|
||||
import {
|
||||
AppBannerWrapper,
|
||||
CommandMenuWrapper,
|
||||
@@ -149,8 +149,7 @@ function CustomApp({ Component, pageProps }: AppPropsWithLayout) {
|
||||
<title>Supabase</title>
|
||||
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
|
||||
</Head>
|
||||
<Favicons />
|
||||
|
||||
<MetaFaviconsPagesRouter applicationName="Supabase Studio" />
|
||||
<PageTelemetry>
|
||||
<TooltipProvider>
|
||||
<RouteValidationWrapper>
|
||||
|
||||
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 584 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 765 B |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 971 B |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 794 B |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 854 B |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 971 B |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1007 B |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 314 B |
|
After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 558 B |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 955 B |
@@ -1,53 +0,0 @@
|
||||
import Head from 'next/head'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
const Favicons = () => {
|
||||
const { basePath } = useRouter()
|
||||
return (
|
||||
<Head>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="57x57" href={`${basePath}/favicon/apple-touch-icon-57x57.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href={`${basePath}/favicon/apple-touch-icon-114x114.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href={`${basePath}/favicon/apple-touch-icon-72x72.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href={`${basePath}/favicon/apple-touch-icon-144x144.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="60x60" href={`${basePath}/favicon/apple-touch-icon-60x60.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="120x120" href={`${basePath}/favicon/apple-touch-icon-120x120.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="76x76" href={`${basePath}/favicon/apple-touch-icon-76x76.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href={`${basePath}/favicon/apple-touch-icon-152x152.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}/favicon/favicon-196x196.png`} sizes="196x196"/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}/favicon/favicon-96x96.png`} sizes="96x96"/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}/favicon/favicon-32x32.png`} sizes="32x32"/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}/favicon/favicon-16x16.png`} sizes="16x16"/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}/favicon/favicon-128.png`} sizes="128x128"/>
|
||||
<meta name="application-name" content=" " />
|
||||
<meta name="msapplication-TileColor" content="#1E1E1E" />
|
||||
<meta name="msapplication-TileImage" content="mstile-144x144.png" />
|
||||
<meta name="msapplication-square70x70logo" content="mstile-70x70.png" />
|
||||
<meta name="msapplication-square150x150logo" content="mstile-150x150.png" />
|
||||
<meta name="msapplication-wide310x150logo" content="mstile-310x150.png" />
|
||||
<meta name="msapplication-square310x310logo" content="mstile-310x310.png" />
|
||||
<meta name="theme-color" content="#1E1E1E" />
|
||||
<link rel="shortcut icon" href={`${basePath}/favicon/favicon.ico`} />
|
||||
<link rel="icon" type="image/png" href={`${basePath}/favicon/favicon.ico`} />
|
||||
{/* misc */}
|
||||
<link rel="manifest" href={`${basePath}/favicon/manifest.json`} />
|
||||
<link rel="alternate" type="application/rss+xml" href={`${basePath}/feed.xml`} />
|
||||
<link rel="apple-touch-icon" href={`${basePath}/favicon/favicon.ico`} />
|
||||
<meta name="msapplication-config" content={`${basePath}/favicon/browserconfig.xml`} />
|
||||
</Head>
|
||||
)
|
||||
}
|
||||
|
||||
export default Favicons
|
||||
@@ -1,93 +0,0 @@
|
||||
import Head from 'next/head'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
function FaviconImports() {
|
||||
const { basePath } = useRouter()
|
||||
|
||||
return (
|
||||
<Head>
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="57x57"
|
||||
href={`${basePath}/images/launchweek/lwx/favicon/apple-icon-57x57.png`}
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="60x60"
|
||||
href={`${basePath}/images/launchweek/lwx/favicon/apple-icon-60x60.png`}
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="72x72"
|
||||
href={`${basePath}/images/launchweek/lwx/favicon/apple-icon-72x72.png`}
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="76x76"
|
||||
href={`${basePath}/images/launchweek/lwx/favicon/apple-icon-76x76.png`}
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="114x114"
|
||||
href={`${basePath}/images/launchweek/lwx/favicon/apple-icon-114x114.png`}
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="120x120"
|
||||
href={`${basePath}/images/launchweek/lwx/favicon/apple-icon-120x120.png`}
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="144x144"
|
||||
href={`${basePath}/images/launchweek/lwx/favicon/apple-icon-144x144.png`}
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="152x152"
|
||||
href={`${basePath}/images/launchweek/lwx/favicon/apple-icon-152x152.png`}
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="180x180"
|
||||
href={`${basePath}/images/launchweek/lwx/favicon/apple-icon-180x180.png`}
|
||||
/>
|
||||
<link
|
||||
rel="icon"
|
||||
type="image/png"
|
||||
sizes="192x192"
|
||||
href={`${basePath}/images/launchweek/lwx/favicon/android-icon-192x192.png`}
|
||||
/>
|
||||
<link
|
||||
rel="icon"
|
||||
type="image/png"
|
||||
sizes="32x32"
|
||||
href={`${basePath}/images/launchweek/lwx/favicon/favicon-32x32.png`}
|
||||
/>
|
||||
<link
|
||||
rel="icon"
|
||||
type="image/png"
|
||||
sizes="96x96"
|
||||
href={`${basePath}/images/launchweek/lwx/favicon/favicon-96x96.png`}
|
||||
/>
|
||||
<link
|
||||
rel="icon"
|
||||
type="image/png"
|
||||
sizes="16x16"
|
||||
href={`${basePath}/images/launchweek/lwx/favicon/favicon-16x16.png`}
|
||||
/>
|
||||
<link rel="manifest" href={`${basePath}/images/launchweek/lwx/favicon/manifest.json" /`} />
|
||||
<meta name="msapplication-TileColor" content="#ffffff" />
|
||||
<meta
|
||||
name="msapplication-TileImage"
|
||||
content="/images/launchweek/lwx/favicon/ms-icon-144x144.png"
|
||||
/>
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
</Head>
|
||||
)
|
||||
}
|
||||
|
||||
export default FaviconImports
|
||||
@@ -13,7 +13,10 @@ import { PortalToast, themes } from 'ui'
|
||||
import { CommandMenuProvider } from 'ui-patterns/Cmdk'
|
||||
import { useConsent } from 'ui-patterns/ConsentToast'
|
||||
|
||||
import Meta from '~/components/Favicons'
|
||||
import MetaFaviconsPagesRouter, {
|
||||
DEFAULT_FAVICON_ROUTE,
|
||||
DEFAULT_FAVICON_THEME_COLOR,
|
||||
} from 'common/MetaFavicons/pages-router'
|
||||
import { API_URL, APP_NAME, DEFAULT_META_DESCRIPTION } from '~/lib/constants'
|
||||
import { post } from '~/lib/fetchWrapper'
|
||||
import supabase from '~/lib/supabase'
|
||||
@@ -66,12 +69,29 @@ export default function App({ Component, pageProps }: AppProps) {
|
||||
|
||||
const forceDarkMode = pathname === '/' || router.pathname.startsWith('/launch-week')
|
||||
|
||||
let applicationName = 'Supabase'
|
||||
let faviconRoute = DEFAULT_FAVICON_ROUTE
|
||||
let themeColor = DEFAULT_FAVICON_THEME_COLOR
|
||||
|
||||
if (router.asPath && router.asPath.includes('/launch-week')) {
|
||||
applicationName = 'Supabase LWX'
|
||||
faviconRoute = 'images/launchweek/lwx/favicon/'
|
||||
themeColor = 'FFFFFF'
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
</Head>
|
||||
<Meta />
|
||||
<MetaFaviconsPagesRouter
|
||||
applicationName={applicationName}
|
||||
route={faviconRoute}
|
||||
themeColor={themeColor}
|
||||
includeManifest
|
||||
includeMsApplicationConfig
|
||||
includeRssXmlFeed
|
||||
/>
|
||||
<DefaultSeo
|
||||
title={site_title}
|
||||
description={DEFAULT_META_DESCRIPTION}
|
||||
|
||||
@@ -7,7 +7,6 @@ import { Session } from '@supabase/supabase-js'
|
||||
import { SITE_ORIGIN, SITE_URL } from '~/lib/constants'
|
||||
import supabase from '~/lib/supabaseMisc'
|
||||
|
||||
import FaviconImports from '~/components/LaunchWeek/X/FaviconImports'
|
||||
import DefaultLayout from '~/components/Layouts/Default'
|
||||
import { TicketState, ConfDataContext, UserData } from '~/components/LaunchWeek/hooks/use-conf-data'
|
||||
import SectionContainer from '~/components/Layouts/SectionContainer'
|
||||
@@ -99,7 +98,6 @@ export default function LaunchWeekIndex({ meetups }: Props) {
|
||||
],
|
||||
}}
|
||||
/>
|
||||
<FaviconImports />
|
||||
<ConfDataContext.Provider
|
||||
value={{
|
||||
supabase,
|
||||
|
||||
@@ -10,7 +10,6 @@ import { Button } from 'ui'
|
||||
import { SITE_URL } from '~/lib/constants'
|
||||
import supabase from '~/lib/supabaseMisc'
|
||||
|
||||
import FaviconImports from '~/components/LaunchWeek/X/FaviconImports'
|
||||
import DefaultLayout from '~/components/Layouts/Default'
|
||||
import SectionContainer from '~/components/Layouts/SectionContainer'
|
||||
import { TicketState, ConfDataContext, UserData } from '~/components/LaunchWeek/hooks/use-conf-data'
|
||||
@@ -72,7 +71,7 @@ export default function UsernamePage({ user, ogImageUrl }: Props) {
|
||||
],
|
||||
}}
|
||||
/>
|
||||
<FaviconImports />
|
||||
|
||||
<ConfDataContext.Provider
|
||||
value={{
|
||||
supabase,
|
||||
|
||||
@@ -9,7 +9,6 @@ import { debounce } from 'lodash'
|
||||
import { SITE_ORIGIN, SITE_URL } from '~/lib/constants'
|
||||
import { useTheme } from 'next-themes'
|
||||
|
||||
import FaviconImports from '~/components/LaunchWeek/X/FaviconImports'
|
||||
import DefaultLayout from '~/components/Layouts/Default'
|
||||
import SectionContainer from '~/components/Layouts/SectionContainer'
|
||||
import { UserData } from '~/components/LaunchWeek/hooks/use-conf-data'
|
||||
@@ -110,7 +109,6 @@ export default function TicketsPage({ users }: Props) {
|
||||
],
|
||||
}}
|
||||
/>
|
||||
<FaviconImports />
|
||||
<DefaultLayout>
|
||||
<div>
|
||||
<SectionContainer className="z-10">
|
||||
|
||||
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 584 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 765 B |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 971 B |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 794 B |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 854 B |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 971 B |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1007 B |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 314 B |
|
After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 558 B |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 955 B |
@@ -0,0 +1,85 @@
|
||||
import Head from 'next/head'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
export const DEFAULT_FAVICON_THEME_COLOR = '1E1E1E'
|
||||
export const DEFAULT_FAVICON_ROUTE = '/favicon'
|
||||
|
||||
const MetaFaviconsPagesRouter = ({
|
||||
applicationName,
|
||||
route = DEFAULT_FAVICON_ROUTE,
|
||||
themeColor = DEFAULT_FAVICON_THEME_COLOR,
|
||||
includeRssXmlFeed = false,
|
||||
includeManifest = false,
|
||||
includeMsApplicationConfig = false,
|
||||
}: {
|
||||
applicationName: string
|
||||
// alternative route to use for the favicons
|
||||
route?: string
|
||||
// theme color for the browser
|
||||
themeColor?: string
|
||||
// include RSS feed
|
||||
includeRssXmlFeed?: boolean
|
||||
// include manifest.json
|
||||
includeManifest?: boolean
|
||||
// include browserconfig.xml
|
||||
includeMsApplicationConfig?: boolean
|
||||
}) => {
|
||||
const { basePath } = useRouter()
|
||||
|
||||
return (
|
||||
<Head>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="57x57" href={`${basePath}${route}/apple-icon-57x57.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href={`${basePath}${route}/apple-icon-114x114.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href={`${basePath}${route}/apple-icon-72x72.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href={`${basePath}${route}/apple-icon-144x144.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="60x60" href={`${basePath}${route}/apple-icon-60x60.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="120x120" href={`${basePath}${route}/apple-icon-120x120.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="76x76" href={`${basePath}${route}/apple-icon-76x76.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href={`${basePath}${route}/apple-icon-152x152.png`}/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}${route}/favicon-128.png`} sizes="128x128"/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}${route}/favicon-196x196.png`} sizes="196x196"/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}${route}/favicon-96x96.png`} sizes="96x96"/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}${route}/favicon-32x32.png`} sizes="32x32"/>
|
||||
{/* prettier-ignore */}
|
||||
<link rel="icon" type="image/png" href={`${basePath}${route}/favicon-16x16.png`} sizes="16x16"/>
|
||||
<meta name="application-name" content={applicationName ?? ' '} />
|
||||
{/* prettier-ignore */}
|
||||
<meta name="msapplication-TileColor" content={`#${themeColor}`} />
|
||||
{/* prettier-ignore */}
|
||||
<meta name="msapplication-TileImage" content={`${basePath}${route}/mstile-144x144.png`} />
|
||||
{/* prettier-ignore */}
|
||||
<meta name="msapplication-square70x70logo" content={`${basePath}${route}/mstile-70x70.png`} />
|
||||
{/* prettier-ignore */}
|
||||
<meta name="msapplication-square150x150logo" content={`${basePath}${route}/mstile-150x150.png`} />
|
||||
{/* prettier-ignore */}
|
||||
<meta name="msapplication-wide310x150logo" content={`${basePath}${route}/mstile-310x150.png`} />
|
||||
{/* prettier-ignore */}
|
||||
<meta name="msapplication-square310x310logo" content={`${basePath}${route}/mstile-310x310.png`} />
|
||||
<meta name="theme-color" content={`#${themeColor}`} />
|
||||
<link rel="shortcut icon" href={`${basePath}${route}/favicon.ico`} />
|
||||
<link rel="icon" type="image/png" href={`${basePath}${route}/favicon.ico`} />
|
||||
<link rel="apple-touch-icon" href={`${basePath}${route}/favicon.ico`} />
|
||||
{includeRssXmlFeed && (
|
||||
<link rel="alternate" type="application/rss+xml" href={`${basePath}/feed.xml`} />
|
||||
)}
|
||||
{includeManifest && <link rel="manifest" href={`${basePath}${route}/manifest.json`} />}
|
||||
{includeMsApplicationConfig && (
|
||||
<meta name="msapplication-config" content={`${basePath}${route}/browserconfig.xml`} />
|
||||
)}
|
||||
</Head>
|
||||
)
|
||||
}
|
||||
|
||||
export default MetaFaviconsPagesRouter
|
||||
@@ -5,3 +5,4 @@ export * from './hooks'
|
||||
export * from './gotrue'
|
||||
export * from './auth'
|
||||
export * from './telemetry'
|
||||
export * from './MetaFavicons/pages-router'
|
||||