0
0
mirror of https://github.com/yude-jp/yude.jp synced 2024-12-22 20:20:09 +09:00

Setup Next.js

This commit is contained in:
yude 2021-02-06 02:31:04 +09:00
parent 8d30c7ad06
commit d090d99b0d
18 changed files with 13119 additions and 40 deletions

3
.gitignore vendored
View File

@ -5,4 +5,5 @@ node_modules
aero-deploy.tar.gz
aero-debug.log
debug.log
dist
dist
.next

32
components/layout.js Normal file
View File

@ -0,0 +1,32 @@
import Head from "next/head"
import Link from "next/link"
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="/static/images/favicon.ico" />
</Head>
<main>
{/*
{title ? <h1 className="page-title">{title}</h1> : ``}
*/}
<div className="page-main">
{children}
</div>
</main>
<style jsx global>{`
body {
text-align: center;
}
.avatar{
border-radius: 50%;
}
`}</style>
</div>
)
}
export default Layout

3
css/index.module.css Normal file
View File

@ -0,0 +1,3 @@
.avatar{
border-radius: 50%;
}

View File

@ -1 +0,0 @@
yude.moe

View File

@ -1,38 +0,0 @@
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="assets/images/favicon.ico">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="https://yude.jp">
<title>yude.jp</title>
<style>
body{text-align: center}
</style>
</head>
<body>
<picture>
<source type="image/webp" srcset="assets/images/avatar.webp" style="width:200px; border-radius: 50%"
class="load">
<img alt="Profile Pic" src="assets/images/avatar.png" style="width:200px; border-radius: 50%" class="load">
</picture>
<h1>yude.jp</h1>
<p>This page is under the construction.</p>
<p>For now, please visit <a class="darkmode-ignore" href="https://yude.moe">yude.moe</a>. Thank you.</p>
<script src="https://cdn.jsdelivr.net/npm/darkmode-js@1.5.7/lib/darkmode-js.min.js"></script>
<script>
function addDarkmodeWidget() {
const options = {
label: '🌓'
}
const darkmode = new Darkmode(options);
darkmode.showWidget();
}
window.addEventListener('load', addDarkmodeWidget);
</script>
</body>
</html>

13026
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

28
package.json Normal file
View File

@ -0,0 +1,28 @@
{
"name": "yude.jp",
"version": "1.0.0",
"description": "Front page of yude.jp",
"main": "index.js",
"scripts": {
"dev": "next -p 30501",
"build": "next build",
"start": "next start"
},
"repository": {
"type": "git",
"url": "git+https://github.com/yudemoe/yude.jp.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/yudemoe/yude.jp/issues"
},
"homepage": "https://github.com/yudemoe/yude.jp#readme",
"dependencies": {
"@zeit/next-css": "^1.0.1",
"next": "^10.0.6",
"react": "^17.0.1",
"react-dom": "^17.0.1"
}
}

5
pages/about.js Normal file
View File

@ -0,0 +1,5 @@
export default () => (
<div>
<p>This is the about page</p>
</div>
)

23
pages/index.js Normal file
View File

@ -0,0 +1,23 @@
import Layout from "../components/Layout"
import Link from 'next/link'
import Image from 'next/image'
const Index = () => (
<Layout title="ホーム">
<div>
<Image className="avatar"
src = "/static/images/avatar.png"
alt = "yude's avatar"
width = {200}
height = {200}
/>
<p>🔨 This page is under the construction. 🔨</p>
<p>For now, please visit <Link href="https://yude.moe"><a>yude.moe</a></Link>.
</p>
</div>
</Layout>
)
export default Index

View File

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 137 KiB

View File

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 241 KiB

After

Width:  |  Height:  |  Size: 241 KiB

View File

Before

Width:  |  Height:  |  Size: 340 KiB

After

Width:  |  Height:  |  Size: 340 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB