feat : add favicon and meta tags

This commit is contained in:
GuillaumeSD
2024-03-20 22:01:53 +01:00
parent 33c6764a8f
commit 68d0b42c27
11 changed files with 71 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

BIN
public/apple-touch-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
public/favicon-16x16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

BIN
public/favicon-32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

19
public/site.webmanifest Normal file
View File

@@ -0,0 +1,19 @@
{
"name": "FreeChess",
"short_name": "FreeChess",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#5d9948",
"background_color": "#ffffff",
"display": "standalone"
}

View File

@@ -4,7 +4,45 @@ export default function Document() {
return (
<Html lang="en">
<Head>
<link rel="icon" href="/favicon.png" />
<link
rel="apple-touch-icon"
sizes="180x180"
href="/apple-touch-icon.png"
/>
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/favicon-16x16.png"
/>
<meta
name="description"
content="Open source chess app to play, view and analyze your chess games for free from anywhere with Stockfish !"
/>
{/* Balises OG (Facebook & Twitter) */}
<meta property="og:type" content="website" />
<meta property="og:title" content="FreeChess" />
<meta property="og:site_name" content="Freechess.web.app" />
<meta property="og:url" content="https://freechess.web.app/" />
<meta
property="og:image"
content="https://freechess.web.app/android-chrome-512x512.png"
/>
<meta
property="og:description"
content="Open source chess app to play, view and analyze your chess games for free from anywhere with Stockfish !"
/>
{/* Balise Twitter */}
<meta name="twitter:card" content="summary_large_image" />
</Head>
<body>
<Main />

View File

@@ -8,6 +8,7 @@ import NavMenu from "./NavMenu";
import { Icon } from "@iconify/react";
import { useRouter } from "next/router";
import NavLink from "@/components/NavLink";
import Image from "next/image";
interface Props {
darkMode: boolean;
@@ -40,8 +41,18 @@ export default function NavBar({ darkMode, switchDarkMode }: Props) {
>
<Icon icon="mdi:menu" />
</IconButton>
<Image
src="/favicon-32x32.png"
alt="FreeChess logo"
width={32}
height={32}
/>
<NavLink href="/">
<Typography variant="h6" component="div" sx={{ flexGrow: 1 }}>
<Typography
variant="h6"
component="div"
sx={{ flexGrow: 1, ml: 1 }}
>
Free Chess
</Typography>
</NavLink>

View File

@@ -30,7 +30,7 @@ export default function NavMenu({ open, onClose }: Props) {
return (
<Drawer anchor="left" open={open} onClose={onClose}>
<Toolbar />
<Box sx={{ width: 250 }}>
<Box sx={{ width: 250, overflow: "hidden" }}>
<List>
{MenuOptions.map(({ text, icon, href }) => (
<ListItem key={text} disablePadding sx={{ margin: 0.7 }}>