0
0
mirror of https://github.com/yude-jp/yude.jp synced 2024-06-09 23:36:01 +09:00
yude.jp/pages/components/Layout.js

50 lines
1.4 KiB
JavaScript

import Head from "next/head"
import Link from "next/link"
import "tailwindcss/tailwind.css";
import React, { useEffect, useState } from 'react'
import { ThemeProvider } from "./themeContext"
const Layout = (props) => {
const { title, children } = props
const siteTitle = "yude.jp"
return (
<div className="page">
<ThemeProvider>
<Head>
<title>{title ? `${title} - ${siteTitle}` : siteTitle}</title>
<link rel="icon" href="/static/images/favicon.ico" />
</Head>
<body className="bg-white text-black dark:bg-black dark:text-white">
<main>
{/*
{title ? <h1 className="page-title">{title}</h1> : ``}
*/}
<div className="page-main">
{children}
</div>
<style jsx global>{`
body {
text-align: center;
}
`}</style>
<footer>
<div className="container mx-auto px-6">
<div className="mt-16 border-t-2 border-gray-300 flex flex-col items-center">
<div className="sm:w-full text-left py-6">
<p className="text-sm text-gray-700 font-bold mb-2">
This page is licensed under the MIT License.
</p>
</div>
</div>
</div>
</footer>
</main>
</body>
</ThemeProvider>
</div>
)
}
export default Layout