feat : add custom pages title
This commit is contained in:
10
src/components/pageTitle.tsx
Normal file
10
src/components/pageTitle.tsx
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import Head from "next/head";
|
||||||
|
|
||||||
|
export const PageTitle = ({ title }: { title: string }) => {
|
||||||
|
return (
|
||||||
|
<Head>
|
||||||
|
<title>{title}</title>
|
||||||
|
<meta property="og:title" content={title} />
|
||||||
|
</Head>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -3,18 +3,12 @@ import "@fontsource/roboto/400.css";
|
|||||||
import "@fontsource/roboto/500.css";
|
import "@fontsource/roboto/500.css";
|
||||||
import "@fontsource/roboto/700.css";
|
import "@fontsource/roboto/700.css";
|
||||||
import { AppProps } from "next/app";
|
import { AppProps } from "next/app";
|
||||||
import Head from "next/head";
|
|
||||||
import Layout from "@/sections/layout";
|
import Layout from "@/sections/layout";
|
||||||
|
|
||||||
export default function MyApp({ Component, pageProps }: AppProps) {
|
export default function MyApp({ Component, pageProps }: AppProps) {
|
||||||
return (
|
return (
|
||||||
<>
|
|
||||||
<Head>
|
|
||||||
<title>Free Chess</title>
|
|
||||||
</Head>
|
|
||||||
<Layout>
|
<Layout>
|
||||||
<Component {...pageProps} />
|
<Component {...pageProps} />
|
||||||
</Layout>
|
</Layout>
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,12 +24,11 @@ export default function Document() {
|
|||||||
/>
|
/>
|
||||||
<meta
|
<meta
|
||||||
name="description"
|
name="description"
|
||||||
content="Open-source chess app to play, view and analyze your chess games for free from anywhere with Stockfish !"
|
content="Analyze your chess games for free on any device with Stockfish !"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Balises OG (Facebook & Twitter) */}
|
{/* Balises OG (Facebook & Twitter) */}
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
<meta property="og:title" content="FreeChess" />
|
|
||||||
<meta property="og:site_name" content="Freechess.web.app" />
|
<meta property="og:site_name" content="Freechess.web.app" />
|
||||||
<meta property="og:url" content="https://freechess.web.app/" />
|
<meta property="og:url" content="https://freechess.web.app/" />
|
||||||
<meta
|
<meta
|
||||||
@@ -38,7 +37,7 @@ export default function Document() {
|
|||||||
/>
|
/>
|
||||||
<meta
|
<meta
|
||||||
property="og:description"
|
property="og:description"
|
||||||
content="Open-source chess app to play, view and analyze your chess games for free from anywhere with Stockfish !"
|
content="Analyze your chess games for free on any device with Stockfish !"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Balise Twitter */}
|
{/* Balise Twitter */}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import { red } from "@mui/material/colors";
|
|||||||
import LoadGameButton from "@/sections/loadGame/loadGameButton";
|
import LoadGameButton from "@/sections/loadGame/loadGameButton";
|
||||||
import { useGameDatabase } from "@/hooks/useGameDatabase";
|
import { useGameDatabase } from "@/hooks/useGameDatabase";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
import { PageTitle } from "@/components/pageTitle";
|
||||||
|
|
||||||
const gridLocaleText: GridLocaleText = {
|
const gridLocaleText: GridLocaleText = {
|
||||||
...GRID_DEFAULT_LOCALE_TEXT,
|
...GRID_DEFAULT_LOCALE_TEXT,
|
||||||
@@ -147,6 +148,8 @@ export default function GameDatabase() {
|
|||||||
gap={4}
|
gap={4}
|
||||||
marginTop={6}
|
marginTop={6}
|
||||||
>
|
>
|
||||||
|
<PageTitle title="Freechess Game Database" />
|
||||||
|
|
||||||
<Grid container justifyContent="center" alignItems="center" size={12}>
|
<Grid container justifyContent="center" alignItems="center" size={12}>
|
||||||
<LoadGameButton />
|
<LoadGameButton />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import { useEffect, useState } from "react";
|
|||||||
import { Icon } from "@iconify/react";
|
import { Icon } from "@iconify/react";
|
||||||
import EngineSettingsButton from "@/sections/engineSettings/engineSettingsButton";
|
import EngineSettingsButton from "@/sections/engineSettings/engineSettingsButton";
|
||||||
import GraphTab from "@/sections/analysis/panelBody/graphTab";
|
import GraphTab from "@/sections/analysis/panelBody/graphTab";
|
||||||
|
import { PageTitle } from "@/components/pageTitle";
|
||||||
|
|
||||||
export default function GameReview() {
|
export default function GameReview() {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
@@ -60,6 +61,8 @@ export default function GameReview() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid container gap={4} justifyContent="space-evenly" alignItems="start">
|
<Grid container gap={4} justifyContent="space-evenly" alignItems="start">
|
||||||
|
<PageTitle title="Freechess Game Review" />
|
||||||
|
|
||||||
<Board />
|
<Board />
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { PageTitle } from "@/components/pageTitle";
|
||||||
import Board from "@/sections/play/board";
|
import Board from "@/sections/play/board";
|
||||||
import GameInProgress from "@/sections/play/gameInProgress";
|
import GameInProgress from "@/sections/play/gameInProgress";
|
||||||
import GameRecap from "@/sections/play/gameRecap";
|
import GameRecap from "@/sections/play/gameRecap";
|
||||||
@@ -11,6 +12,8 @@ export default function Play() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid container gap={4} justifyContent="space-evenly" alignItems="start">
|
<Grid container gap={4} justifyContent="space-evenly" alignItems="start">
|
||||||
|
<PageTitle title="Freechess Play vs Stockfish" />
|
||||||
|
|
||||||
<Board />
|
<Board />
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
|
|||||||
Reference in New Issue
Block a user