Skip to content

Commit

Permalink
Update favicon and meta
Browse files Browse the repository at this point in the history
  • Loading branch information
oBusk committed Nov 11, 2021
1 parent 3a8b66a commit 70c0483
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 2 deletions.
Binary file added public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/favicon.ico
Binary file not shown.
18 changes: 18 additions & 0 deletions public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "npm-diff.app",
"short_name": "npm-diff",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#3f444e",
"background_color": "#1a202c"
}
10 changes: 10 additions & 0 deletions src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Header from "./Header";

export interface LayoutProps extends StackProps {
title?: string;
description?: string;
}

const BACKGROUND_COLOR = undefined;
Expand All @@ -14,6 +15,7 @@ const PADDING = "1em";
const Layout: FunctionComponent<LayoutProps> = ({
children,
title = "",
description,
...props
}) => {
// https://github.com/chakra-ui/chakra-ui/blob/%40chakra-ui/react%401.6.5/packages/theme/src/styles.ts#L8
Expand All @@ -23,6 +25,14 @@ const Layout: FunctionComponent<LayoutProps> = ({
<>
<Head>
<title>{title ? `${title} • ` : ""}npm-diff.app 📦🔃</title>
<meta
name="description"
content={
description
? description
: "Inspect changes between npm packages in a webapp"
}
/>
</Head>
<Stack
minHeight="100vh"
Expand Down
5 changes: 4 additions & 1 deletion src/pages/[...parts].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ const DiffPage: NextPage<Props> = ({
.reduce((a, b) => a + b);

return (
<Layout title={`Comparing ${a}...${b}`}>
<Layout
title={`Comparing ${a}...${b}`}
description={`A diff between the npm packages "${a}" and "${b}"`}
>
<DiffIntro
a={a}
b={b}
Expand Down
21 changes: 20 additions & 1 deletion src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,26 @@ export default class Document extends NextDocument {
render() {
return (
<Html lang="en">
<Head />
<Head>
<link
rel="apple-touch-icon"
sizes="180x180"
href="/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/favicon-16x16.png"
/>
<link rel="manifest" href="/site.webmanifest" />
</Head>
<body>
<ColorModeScript
initialColorMode={theme.config.initialColorMode}
Expand Down

1 comment on commit 70c0483

@vercel
Copy link

@vercel vercel bot commented on 70c0483 Nov 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.