0
0
mirror of https://github.com/yude-jp/yude.jp synced 2024-11-01 07:58:01 +09:00
yude.jp/pages/components/Layout.js

35 lines
748 B
JavaScript
Raw Permalink Normal View History

2021-12-11 18:07:22 +09:00
// Next.js
2021-02-06 20:11:20 +09:00
import Head from "next/head"
2021-12-11 18:07:22 +09:00
// Tailwind CSS
2021-02-06 20:11:20 +09:00
import "tailwindcss/tailwind.css";
2021-12-11 18:07:22 +09:00
// React
2021-02-06 20:11:20 +09:00
import React, { useEffect, useState } from 'react'
2021-12-11 18:07:22 +09:00
// Components
2021-08-09 10:59:39 +09:00
import Footer from "./Footer/Footer"
2021-05-23 14:02:27 +09:00
import Navbar from "./Navbar"
2021-02-06 20:11:20 +09:00
const Layout = (props) => {
const { title, children } = props
const siteTitle = "yude.jp"
return (
<div className="page">
<Head>
<title>{title ? `${title} - ${siteTitle}` : siteTitle}</title>
<link rel="icon" href="/images/favicon.ico" />
2021-02-06 20:11:20 +09:00
</Head>
<main>
2021-05-23 14:02:27 +09:00
<Navbar />
2021-05-28 07:27:11 +09:00
<div className="max-w-2xl mx-auto">
2021-05-30 10:36:03 +09:00
<div className="mx-2">
2021-02-06 20:11:20 +09:00
{children}
2021-05-30 10:36:03 +09:00
</div>
2021-02-06 20:11:20 +09:00
</div>
2021-05-23 14:02:27 +09:00
<Footer />
2021-02-06 21:28:29 +09:00
</main>
2021-02-06 20:11:20 +09:00
</div>
)
}
export default Layout