diff --git a/app/(commonLayout)/contact/page.tsx b/app/(commonLayout)/contact/page.tsx index ca19b31..cabc2bb 100644 --- a/app/(commonLayout)/contact/page.tsx +++ b/app/(commonLayout)/contact/page.tsx @@ -16,6 +16,7 @@ const title = 'Contact' export const metadata: Metadata = { title, + description: 'contact form', openGraph: { title } diff --git a/app/(commonLayout)/log/page.tsx b/app/(commonLayout)/log/page.tsx index 9aff0f9..3091c06 100644 --- a/app/(commonLayout)/log/page.tsx +++ b/app/(commonLayout)/log/page.tsx @@ -11,6 +11,7 @@ const title = 'Log' export const metadata: Metadata = { title, + description: 'koh110\'s log', openGraph: { title } diff --git a/app/(commonLayout)/page.tsx b/app/(commonLayout)/page.tsx index a606ce3..2d0f458 100644 --- a/app/(commonLayout)/page.tsx +++ b/app/(commonLayout)/page.tsx @@ -10,6 +10,7 @@ export default function Index() { const title = 'About' export const metadata: Metadata = { title, + description: 'About koh110', openGraph: { title } diff --git a/app/(commonLayout)/work/page.tsx b/app/(commonLayout)/work/page.tsx index a9115ae..8805653 100644 --- a/app/(commonLayout)/work/page.tsx +++ b/app/(commonLayout)/work/page.tsx @@ -11,6 +11,7 @@ const title = 'Work' export const metadata: Metadata = { title, + description: 'koh110\'s work', openGraph: { title } diff --git a/app/globals.css b/app/globals.css index dec2812..fd84500 100644 --- a/app/globals.css +++ b/app/globals.css @@ -63,10 +63,10 @@ h2 { --color-on-base: rgba(42, 42, 42, 1); --color-background-body: rgb(223, 235, 247); --color-on-header: rgba(255, 255, 255, 1); - --color-header: rgba(42, 42, 42, 1); + --color-header: hsla(210, 14%, 9%, 0.9); --color-body: #545454; --color-border: rgb(211, 212, 228); - --color-link: #1da1f2; + --color-link: rgb(11 107 203); --color-body-card: rgb(255, 255, 255); --color-on-card: rgba(0, 0, 0, 0.7); --color-shadow: rgba(0, 0, 0, .5); @@ -86,9 +86,10 @@ h2 { [data-theme='dark'] { --color-background-body: rgba(42, 42, 42, 1); --color-body: #ffffff; - --color-body-card: #1e1e1e; + --color-body-card: hsla(210, 14%, 9%, 0.8); --color-on-card: rgba(255, 255, 255, 0.7); --color-shadow: rgba(255, 255, 255, .2); --color-button: #a6c4dd; --color-on-button: rgb(24, 27, 29); + --color-link: rgb(149 226 255); } diff --git a/components/CookieConsent/index.tsx b/components/CookieConsent/index.tsx index c25e0b0..cca7d84 100644 --- a/components/CookieConsent/index.tsx +++ b/components/CookieConsent/index.tsx @@ -39,7 +39,7 @@ export default function CookieConsent() { return (
-
diff --git a/components/Header/ClientComponent.tsx b/components/Header/ClientComponent.tsx index 284e82b..3f7df52 100644 --- a/components/Header/ClientComponent.tsx +++ b/components/Header/ClientComponent.tsx @@ -29,7 +29,7 @@ export default function Header() {
-

{title}

+

{title}

) diff --git a/components/Header/styles.module.css b/components/Header/styles.module.css index f5c93c9..c357157 100644 --- a/components/Header/styles.module.css +++ b/components/Header/styles.module.css @@ -30,7 +30,7 @@ } .fixedHeader { - background-color: var(--color-background-body); + background: var(--color-header); opacity: 0; height: 2em; display: flex; @@ -42,3 +42,9 @@ transition: opacity 0.3s ease; z-index: 100; } + +.fixedHeader h1 { + color: var(--color-on-header); + font-size: 1.5em; + font-weight: 100; +} diff --git a/components/pages/About/History/HistoryElement.module.css b/components/pages/About/History/HistoryElement.module.css index 401ae3e..c60dced 100644 --- a/components/pages/About/History/HistoryElement.module.css +++ b/components/pages/About/History/HistoryElement.module.css @@ -63,6 +63,9 @@ } .body :global(ul) { margin-bottom: 0; + display: flex; + flex-direction: column; + gap: 0.6rem; } .date { margin-bottom: 0.5em; diff --git a/components/pages/About/ProfileIcon/index.tsx b/components/pages/About/ProfileIcon/index.tsx index 912fe7e..79792c5 100644 --- a/components/pages/About/ProfileIcon/index.tsx +++ b/components/pages/About/ProfileIcon/index.tsx @@ -19,6 +19,7 @@ export default function ProfileIcon() {
{props.img && (
- - + + {props.title}
)} diff --git a/components/pages/Work/AmazonElement.module.css b/components/pages/Work/AmazonElement.module.css index 54ee17e..6bc5263 100644 --- a/components/pages/Work/AmazonElement.module.css +++ b/components/pages/Work/AmazonElement.module.css @@ -1,5 +1,5 @@ .wrapper { - padding: 1rem; + padding: 1em; display: flex; max-width: 500px; background: var(--color-body-card); @@ -7,7 +7,7 @@ border-radius: 8px; } .title { - padding: 0 1rem; + padding: 0 1em; font-weight: 400; font-size: 0.875rem; } @@ -15,6 +15,9 @@ max-width: 120px; place-self: center; } +.link a { + display: flex; +} .link img { max-width: 120px; aspect-ratio: 1058 / 1500; @@ -22,15 +25,14 @@ .body { display: flex; flex-direction: column; - max-width: calc(500px - 120px - 1rem); + max-width: calc(500px - 120px - 1.5em); } .content { - margin-top: 0.5em; flex: 1; } .content p { margin: 0; - padding: 0 1rem; + padding: 0 0 0 1em; color: var(--color-on-card); font-size: 0.875rem; } diff --git a/components/pages/Work/AmazonElement.tsx b/components/pages/Work/AmazonElement.tsx index 57f66a4..739fcac 100644 --- a/components/pages/Work/AmazonElement.tsx +++ b/components/pages/Work/AmazonElement.tsx @@ -1,30 +1,31 @@ +import type { PropsWithChildren } from 'react' import styles from './AmazonElement.module.css' export type Props = { - type: 'amazon' title: string date: string desc: string img: string url: string - dangerouslySetInnerHTML?: string } -export default function AmazonElement(props: Props) { +export default function AmazonElement(props: PropsWithChildren) { return (
- - + + {props.title}
-
{props.title}
+

{props.title}

{props.desc.split('\n').map((e, i) => (

{e}

))} - { props.dangerouslySetInnerHTML &&

} +

+ {props.children} +

Amazon

diff --git a/components/pages/Work/WorkElement.tsx b/components/pages/Work/WorkElement.tsx index c0e1c59..5920e15 100644 --- a/components/pages/Work/WorkElement.tsx +++ b/components/pages/Work/WorkElement.tsx @@ -17,8 +17,8 @@ export default function WorkElement(props: Props) {
{props.img && (
- - + + {props.title}
)} diff --git a/components/pages/Work/index.tsx b/components/pages/Work/index.tsx index 9e997c8..d0e3bc0 100644 --- a/components/pages/Work/index.tsx +++ b/components/pages/Work/index.tsx @@ -7,33 +7,6 @@ import styles from './index.module.css' const npmImage = '/npm-logo-simplifed-with-white-space.png' -const books: AmazonLogProps[] = [ - { - type: 'amazon', - title: '実践Node.js入門', - date: '2023/01/26', - desc: [ - 'Node.jsの入門書です。', - '基礎知識、環境構築、重要文法、非同期、CLIツール開発、Expressを用いたサーバーサイドの開発やフロントエンド(React)との連携などNode.jsの全体像が学べます。' - ].join(''), - img: '/nodejs-book.jpg', - url: `https://amzn.to/4b2hrIQ`, - dangerouslySetInnerHTML: [ - `
https://gihyo.jp/book/2023/978-4-297-12956-9
`, - `
韓国語版
`, - ].join('') - }, - { - type: 'amazon', - title: '動かして学ぶ! Slackアプリ開発入門', - date: '2020/12/14', - desc: 'SlackSDKを利用したアプリの作成方法についての解説本。\n業務フローの例に合わせてSlackAPIとサンプルコードを一緒に追っていく形式。', - img: '/slack-book.jpg', - url: `https://amzn.to/48zE5qE`, - dangerouslySetInnerHTML: `https://www.shoeisha.co.jp/book/detail/9784798164748` - } -] - const softs: WorkProps[] = [ { url: 'https://github.com/koh110/tiny-type-api', @@ -79,9 +52,32 @@ export default function Work() {

Book

- {books.map((e, i) => { - return - })} + + + + + + https://www.shoeisha.co.jp/book/detail/9784798164748 +

Software

diff --git a/next.config.js b/next.config.js index fcdf0f5..08edea5 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,9 @@ +const withBundleAnalyzer = require('@next/bundle-analyzer')({ + enabled: process.env.ANALYZE === 'true', +}) /** @type {import('next').NextConfig} */ const nextConfig = { output: 'export' }; -module.exports = nextConfig \ No newline at end of file +module.exports = withBundleAnalyzer(nextConfig) diff --git a/package-lock.json b/package-lock.json index f5d1a11..d773450 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,9 +19,20 @@ "typescript": "^5.0.4" }, "devDependencies": { + "@next/bundle-analyzer": "^14.2.16", "serve": "^14.1.2" } }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/@emnapi/runtime": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz", @@ -393,6 +404,16 @@ "url": "https://opencollective.com/libvips" } }, + "node_modules/@next/bundle-analyzer": { + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/bundle-analyzer/-/bundle-analyzer-14.2.16.tgz", + "integrity": "sha512-pMitc/pJ7II9skw5JYCmjvtaBQ9qmhF1W3M9L5JbbL98H31x0WvmUsF7gA4Hv4horludg6eHWIbAHmWErYzIwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "webpack-bundle-analyzer": "4.10.1" + } + }, "node_modules/@next/env": { "version": "15.0.1", "resolved": "https://registry.npmjs.org/@next/env/-/env-15.0.1.tgz", @@ -527,6 +548,13 @@ "node": ">= 10" } }, + "node_modules/@polka/url": { + "version": "1.0.0-next.28", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", + "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==", + "dev": true, + "license": "MIT" + }, "node_modules/@swc/counter": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", @@ -581,6 +609,32 @@ "node": ">= 0.6" } }, + "node_modules/acorn": { + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz", + "integrity": "sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/ajv": { "version": "8.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", @@ -983,6 +1037,16 @@ "license": "MIT", "optional": true }, + "node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, "node_modules/compressible": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", @@ -1070,6 +1134,13 @@ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "license": "MIT" }, + "node_modules/debounce": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", + "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", + "dev": true, + "license": "MIT" + }, "node_modules/deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -1090,6 +1161,13 @@ "node": ">=8" } }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true, + "license": "MIT" + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -1104,6 +1182,19 @@ "dev": true, "license": "MIT" }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -1148,6 +1239,29 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gzip-size": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", + "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "duplexer": "^0.1.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -1191,6 +1305,16 @@ "node": ">=8" } }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-port-reachable": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-port-reachable/-/is-port-reachable-4.0.0.tgz", @@ -1317,6 +1441,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/mrmime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", + "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/nanoid": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", @@ -1438,6 +1572,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/opener": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", + "dev": true, + "license": "(WTFPL OR MIT)", + "bin": { + "opener": "bin/opener-bin.js" + } + }, "node_modules/path-is-inside": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", @@ -1805,6 +1949,21 @@ "license": "MIT", "optional": true }, + "node_modules/sirv": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", + "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -1899,6 +2058,16 @@ } } }, + "node_modules/totalist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", + "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/tslib": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", @@ -1968,6 +2137,34 @@ "node": ">= 0.8" } }, + "node_modules/webpack-bundle-analyzer": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.1.tgz", + "integrity": "sha512-s3P7pgexgT/HTUSYgxJyn28A+99mmLq4HsJepMPzu0R8ImJc52QNqaFYW1Z2z2uIb1/J3eYgaAWVpaC+v/1aAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@discoveryjs/json-ext": "0.5.7", + "acorn": "^8.0.4", + "acorn-walk": "^8.0.0", + "commander": "^7.2.0", + "debounce": "^1.2.1", + "escape-string-regexp": "^4.0.0", + "gzip-size": "^6.0.0", + "html-escaper": "^2.0.2", + "is-plain-object": "^5.0.0", + "opener": "^1.5.2", + "picocolors": "^1.0.0", + "sirv": "^2.0.3", + "ws": "^7.3.1" + }, + "bin": { + "webpack-bundle-analyzer": "lib/bin/analyzer.js" + }, + "engines": { + "node": ">= 10.13.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -2030,6 +2227,28 @@ "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } + }, + "node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } } } } diff --git a/package.json b/package.json index 5ce5189..9a17116 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "dev": "next dev --turbopack --turbo", "build:tsc": "tsc --noEmit", "build": "NODE_ENV=production next build", + "analyze": "ANALYZE=true NODE_ENV=production next build", "start": "next start", "format": "prettier --write {pages,components,contexts,public,styles,types,lib}/**/*.{ts,tsx}", "serve": "serve out -l 3000" @@ -22,6 +23,7 @@ "typescript": "^5.0.4" }, "devDependencies": { + "@next/bundle-analyzer": "^14.2.16", "serve": "^14.1.2" }, "overrides": {