diff --git a/.gitignore b/.gitignore index 0437f04..d9e413a 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,8 @@ yarn-error.log* # cypress cypress/videos cypress/screenshots + +# next-pwa +**/public/workbox-*.js* +**/public/sw.js* +**/public/worker-*.js* diff --git a/components/Layout.tsx b/components/Layout.tsx index 4ee76b4..11d05ac 100644 --- a/components/Layout.tsx +++ b/components/Layout.tsx @@ -1,23 +1,46 @@ import { FC } from "react"; -import { Flex, VStack, Button, Link } from "@chakra-ui/react"; +import { Flex, VStack, Button, Link, useColorModeValue } from "@chakra-ui/react"; import Head from "next/head"; import Header from "./Header"; import Footer from "./Footer"; type Props = { - customTitle?: string + customTitle?: string, + home?: true [key: string]: any }; const title = "Lingva Translate"; +const description = "Alternative front-end for Google Translate, serving as a Free and Open Source translator with over a hundred languages available"; +const siteDomain = process.env["NEXT_PUBLIC_SITE_DOMAIN"]; +const url = siteDomain && (siteDomain.includes("localhost") ? "http://" : "https://") + siteDomain; -const Layout: FC = ({ customTitle, children }) => ( +const Layout: FC = ({ customTitle, children, home, ...props }) => ( <> {customTitle ?? title} - + + + {home && } + + + + + + + + + + + + + + + + +