Skip to content

Commit

Permalink
feat(web-app): example of favicons
Browse files Browse the repository at this point in the history
  • Loading branch information
belgattitude committed Oct 16, 2021
1 parent e456461 commit b36771c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/khaki-crabs-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'web-app': minor
---

Example of favicons
4 changes: 4 additions & 0 deletions apps/web-app/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { EmotionCache } from '@emotion/react';
import { appWithTranslation } from 'next-i18next';
import type { AppProps as NextAppProps } from 'next/app';
import Head from 'next/head';
import { AppProviders } from '../app-providers';

/**
Expand Down Expand Up @@ -32,6 +33,9 @@ const MyApp = (appProps: AppProps) => {
const { Component, pageProps, emotionCache, err } = appProps;
return (
<AppProviders emotionCache={emotionCache}>
<Head>
<meta name="viewport" content="viewport-fit=cover" />
</Head>
{/* Workaround for https://github.com/vercel/next.js/issues/8592 */}
<Component {...pageProps} err={err} />
</AppProviders>
Expand Down
34 changes: 33 additions & 1 deletion apps/web-app/src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,39 @@ class MyDocument extends Document<Props> {
render() {
return (
<Html>
<Head />
<Head>
<meta charSet="utf-8" />
<link
rel="apple-touch-icon"
sizes="180x180"
href="/images/favicon/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/images/favicon/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/images/favicon/favicon-16x16.png"
/>
<link rel="manifest" href="/images/favicon/site.webmanifest" />
<link
rel="mask-icon"
href="/images/favicon/safari-pinned-tab.svg"
color="#5bbad5"
/>
<link rel="shortcut icon" href="/images/favicon/favicon.ico" />
<meta name="msapplication-TileColor" content="#da532c" />
<meta
name="msapplication-config"
content="/images/favicon/browserconfig.xml"
/>
<meta name="theme-color" content="#ffffff" />
</Head>
<body>
<Main />
<NextScript />
Expand Down

0 comments on commit b36771c

Please sign in to comment.