Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kyoya0819 committed Sep 5, 2024
1 parent 1450d47 commit 73eef87
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 26 deletions.
26 changes: 26 additions & 0 deletions src/components/Head/Head.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import NextHead from "next/head";
import { useRouter } from "next/router";
import React, { FC } from "react";

export const Head: FC<{
title: string,
description?: string
}> = ({ title, description }) => {
const pathname = useRouter().pathname;

return (
<NextHead>
<title>{ title }</title>
<meta name="description" content={ description ?? "This site publishes tools created by ky-y." } />
<meta property="og:url" content={`https://beta.tools.ky-y.app${pathname}`} />
<meta property="og:type" content={ pathname === "/" ? "website" : "article" } />
<meta property="og:title" content={ title } />
<meta property="og:description" content={ description ?? "This site publishes tools created by ky-y." } />
<meta property="og:site_name" content="kyTools | ky-y." />
<meta property="og:image" content="https://beta.tools.ky-y.app/ogp.png" />
<link rel="icon" href="/favicon.ico" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="manifest" href="/manifest.json" />
</NextHead>
);
};
1 change: 1 addition & 0 deletions src/components/Head/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { Head } from "./Head";
2 changes: 1 addition & 1 deletion src/components/Header/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { Header as default } from "./Header";
export { Header } from "./Header";
16 changes: 16 additions & 0 deletions src/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Head, Html, Main, NextScript } from "next/document";
import React from "react";

const Document = () => {
return (
<Html lang="ja">
<Head>
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
);
};
export default Document;
9 changes: 4 additions & 5 deletions src/pages/character-counter.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import { Footer, Main } from "@ky-y./ui";
import type { NextPage } from "next";
import Head from "next/head";

import { Header } from "components/Header/Header";
import { Head } from "components/Head";
import { Header } from "components/Header";

import { Counter } from "sections/character-counter";

const Password: NextPage = () => {

return (
<>
<Head>
<title>Character Counter | kyTools</title>
</Head>
<Head title="Character Counter | kyTools" />

<Header />
<Main>
<Counter />
Expand Down
9 changes: 4 additions & 5 deletions src/pages/hex-mixer.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import { Footer, Main } from "@ky-y./ui";
import type { NextPage } from "next";
import Head from "next/head";

import { Header } from "components/Header/Header";
import { Head } from "components/Head";
import { Header } from "components/Header";

import { Mixer } from "sections/hex-mixer";

const Password: NextPage = () => {

return (
<>
<Head>
<title>Hex Mixer | kyTools</title>
</Head>
<Head title="Hex Mixer | kyTools" />

<Header />
<Main>
<Mixer />
Expand Down
9 changes: 4 additions & 5 deletions src/pages/hex-steps-generator.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import { Footer, Main } from "@ky-y./ui";
// import "@ky-y./ui/fonts.css";
import type { NextPage } from "next";
import Head from "next/head";

import { Header } from "components/Header/Header";
import { Head } from "components/Head";
import { Header } from "components/Header";

import { Generator } from "sections/hex-steps-generator";

const Password: NextPage = () => {

return (
<>
<Head>
<title>Hex Steps Generator | kyTools</title>
</Head>
<Head title="Hex Steps Generator | kyTools" />

<Header />
<Main>
<Generator />
Expand Down
9 changes: 4 additions & 5 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import { A, Card, Footer, Main, Section } from "@ky-y./ui";
import type { NextPage } from "next";
import Head from "next/head";

import Header from "components/Header";
import { Head } from "components/Head";
import { Header } from "components/Header";

const Index: NextPage = () => {

return (
<>
<Head>
<title>Top | kyTools</title>
</Head>
<Head title="Top | kyTools" />

<Header />
<Main>
<Section inner="md">
Expand Down
9 changes: 4 additions & 5 deletions src/pages/password.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import { Footer, Main } from "@ky-y./ui";
import type { NextPage } from "next";
import Head from "next/head";

import { Header } from "components/Header/Header";
import { Head } from "components/Head";
import { Header } from "components/Header";

import { Generator } from "sections/password";

const Password: NextPage = () => {

return (
<>
<Head>
<title>Password Maker | kyTools</title>
</Head>
<Head title="Password Maker | kyTools" />

<Header />
<Main>
<Generator />
Expand Down

0 comments on commit 73eef87

Please sign in to comment.