diff --git a/.astro/content-assets.mjs b/.astro/content-assets.mjs new file mode 100644 index 0000000..2b8b823 --- /dev/null +++ b/.astro/content-assets.mjs @@ -0,0 +1 @@ +export default new Map(); \ No newline at end of file diff --git a/.astro/content-modules.mjs b/.astro/content-modules.mjs new file mode 100644 index 0000000..2b8b823 --- /dev/null +++ b/.astro/content-modules.mjs @@ -0,0 +1 @@ +export default new Map(); \ No newline at end of file diff --git a/.astro/data-store.json b/.astro/data-store.json new file mode 100644 index 0000000..2de35bb --- /dev/null +++ b/.astro/data-store.json @@ -0,0 +1 @@ +[["Map",1,2],"meta::meta",["Map",3,4,5,6],"astro-version","5.1.10","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"compressHTML\":true,\"base\":\"/\",\"trailingSlash\":\"ignore\",\"output\":\"static\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_astro\",\"serverEntry\":\"entry.mjs\",\"redirects\":true,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":false,\"port\":4321,\"streaming\":true},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[],\"remotePatterns\":[]},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":\"shiki\",\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"responsiveImages\":false},\"legacy\":{\"collections\":false}}"] \ No newline at end of file diff --git a/.astro/settings.json b/.astro/settings.json new file mode 100644 index 0000000..737494c --- /dev/null +++ b/.astro/settings.json @@ -0,0 +1,5 @@ +{ + "_variables": { + "lastUpdateCheck": 1737986834616 + } +} \ No newline at end of file diff --git a/.astro/types.d.ts b/.astro/types.d.ts new file mode 100644 index 0000000..f964fe0 --- /dev/null +++ b/.astro/types.d.ts @@ -0,0 +1 @@ +/// diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..0070802 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,11 @@ +{ + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "semi": true, + "singleQuote": false, + "trailingComma": "es5", + "bracketSpacing": true, + "arrowParens": "avoid", + "proseWrap": "always" +} diff --git a/README.md b/README.md index c403366..ba79d7b 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,30 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). +# Astroで構築されたプロジェクト -## Getting Started - -First, run the development server: +## 開発サーバー起動 ```bash npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev ``` -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. +## ビルドおよび静的エクスポート -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. +```bash +npm run build +``` -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. +生成された`dist`ディレクトリを配信することで静的サイトとして公開できます。 ## Learn More -To learn more about Next.js, take a look at the following resources: +To learn more about Astro, take a look at the following resources: -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. +- [Astro Documentation](https://docs.astro.build) - learn about Astro features and API. +- [Learn Astro](https://docs.astro.build/en/getting-started/) - an interactive Astro tutorial. -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! +You can check out [the Astro GitHub repository](https://github.com/withastro/astro) - your feedback and contributions are welcome! ## Deploy on Vercel -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. +The easiest way to deploy your Astro app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=astro&utm_source=create-astro-app&utm_campaign=create-astro-app-readme) from the creators of Astro. -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +Check out our [Astro deployment documentation](https://docs.astro.build/en/guides/deploy/) for more details. diff --git a/_error.tsx.bak b/_error.tsx.bak deleted file mode 100644 index 865bc3c..0000000 --- a/_error.tsx.bak +++ /dev/null @@ -1,28 +0,0 @@ -import { GetServerSideProps, NextPage } from "next"; -import Page from "../components/page"; - -interface ErrorPageProps { - statusCode: number; -} -const CustomError: NextPage = ({ statusCode }) => { - return ( - : undefined} - /> - ); -}; - -const getServerSideProps: GetServerSideProps = async ({ res, query }) => { - const statusCode = 410; - res.statusCode = statusCode; - - return { - props: { - statusCode, - }, - }; -}; - -export default CustomError; -export { getServerSideProps }; diff --git a/astro.config.mjs b/astro.config.mjs new file mode 100644 index 0000000..a2da1a6 --- /dev/null +++ b/astro.config.mjs @@ -0,0 +1,9 @@ +import { defineConfig } from "astro/config"; +import tailwind from "@astrojs/tailwind"; +import icon from "astro-icon"; + +export default defineConfig({ + integrations: [tailwind(), icon()], + output: "static", +}); + diff --git a/bun.lockb b/bun.lockb index 1f0757b..9c0f1dc 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/next.config.js b/next.config.js deleted file mode 100644 index f8d5d11..0000000 --- a/next.config.js +++ /dev/null @@ -1,4 +0,0 @@ -/** @type {import('next').NextConfig} */ -const nextConfig = { output: "export" }; - -module.exports = nextConfig; diff --git a/package.json b/package.json index ed5ddc5..77c6ac4 100644 --- a/package.json +++ b/package.json @@ -3,25 +3,30 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "lint": "next lint" + "dev": "astro dev", + "build": "astro build", + "start": "astro preview", + "lint": "next lint", + "export": "next export" }, "dependencies": { - "react": "^18", - "react-dom": "^18", - "next": "14.0.4" + "@astrojs/tailwind": "^3.0.0", + "astro": "^5.1.10", + "astro-icon": "^1.1.5", + "prettier-plugin-astro": "^0.14.1" }, "devDependencies": { - "typescript": "^5", + "@iconify-json/game-icons": "^1.2.1", + "@iconify-json/pixelarticons": "^1.2.2", + "@iconify-json/tabler": "^1.2.15", "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", "autoprefixer": "^10.0.1", + "eslint": "^8", "postcss": "^8", "tailwindcss": "^3.3.0", - "eslint": "^8", - "eslint-config-next": "14.0.4" - } + "typescript": "^5" + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/postcss.config.js b/postcss.config.js deleted file mode 100644 index 33ad091..0000000 --- a/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} diff --git a/src/app/favicon.ico b/public/favicon.ico similarity index 100% rename from src/app/favicon.ico rename to public/favicon.ico diff --git a/src/app/layout.tsx b/src/app/layout.tsx deleted file mode 100644 index a5940b3..0000000 --- a/src/app/layout.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import type { Metadata } from "next"; -import { Inter } from "next/font/google"; -import "./globals.css"; - -const inter = Inter({ subsets: ["latin"] }); - -export const metadata: Metadata = { - title: "ぷよすきーの墓標", - description: "一代目ぷよすきーは滅んでしまったようだ", -}; - -export default function RootLayout({ - children, -}: { - children: React.ReactNode; -}) { - return ( - - {children} - - ); -} diff --git a/src/app/page.tsx b/src/app/page.tsx deleted file mode 100644 index 03f6e90..0000000 --- a/src/app/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import Page from "../components/page"; - -export default function MyPage() { - return ; -} diff --git a/src/components/page.tsx b/src/components/page.tsx deleted file mode 100644 index 73e4507..0000000 --- a/src/components/page.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import Image from "next/image"; - -export default function Home() { - return ( - <> -
-
- Logo -
-
-
-
- ぷよすきーは滅んでしまったようです。
ここにあるのは、
- ぷよすきーの墓標です。 - grave -
- - -
- - ); -} diff --git a/src/consts.ts b/src/consts.ts new file mode 100644 index 0000000..da51087 --- /dev/null +++ b/src/consts.ts @@ -0,0 +1,2 @@ +export const DOMAIN = "mi.v-sli.me"; +export const DESCRIPTION = `このインスタンスは閉鎖しました。"${DOMAIN}"を支えていただきありがとうございました。`; diff --git a/src/env.d.ts b/src/env.d.ts new file mode 100644 index 0000000..f964fe0 --- /dev/null +++ b/src/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro new file mode 100644 index 0000000..7190152 --- /dev/null +++ b/src/layouts/Layout.astro @@ -0,0 +1,15 @@ + +--- +const { title = "My Site" } = Astro.props; +import "../styles/globals.css"; +--- + + + + + {title} + + + + + diff --git a/src/pages/index.astro b/src/pages/index.astro new file mode 100644 index 0000000..9144e3b --- /dev/null +++ b/src/pages/index.astro @@ -0,0 +1,66 @@ +--- +import Layout from "../layouts/Layout.astro"; +import { Icon } from "astro-icon/components"; +import { Image } from "astro:assets"; +import { DESCRIPTION } from "../consts"; +--- + + + + ぷよすきーの墓標 + + +
+
+ Logo +
+
+
+
+ ぷよすきーは滅んでしまったようです。
ここにあるのは、
+ ぷよすきーの墓標です。 + + + + + + + + + +
+ + +
+ + +
diff --git a/src/app/globals.css b/src/styles/globals.css similarity index 92% rename from src/app/globals.css rename to src/styles/globals.css index 8f96d6c..6db9194 100644 --- a/src/app/globals.css +++ b/src/styles/globals.css @@ -1,7 +1,3 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - :root { --foreground-rgb: 0, 0, 0; --background-start-rgb: 225, 225, 255; diff --git a/tailwind.config.ts b/tailwind.config.ts index 1af3b8f..9d1fbe2 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -1,20 +1,20 @@ -import type { Config } from 'tailwindcss' +import type { Config } from "tailwindcss"; const config: Config = { - content: [ - './src/pages/**/*.{js,ts,jsx,tsx,mdx}', - './src/components/**/*.{js,ts,jsx,tsx,mdx}', - './src/app/**/*.{js,ts,jsx,tsx,mdx}', - ], - theme: { - extend: { - backgroundImage: { - 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', - 'gradient-conic': - 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', - }, - }, - }, - plugins: [], -} -export default config + content: [ + "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", + "./src/components/**/*.{js,ts,jsx,tsx,mdx}", + "./src/app/**/*.{js,ts,jsx,tsx,mdx}", + ], + theme: { + extend: { + backgroundImage: { + "gradient-radial": "radial-gradient(var(--tw-gradient-stops))", + "gradient-conic": + "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))", + }, + }, + }, + plugins: [], +}; +export default config; diff --git a/tsconfig.json b/tsconfig.json index e59724b..1bf2539 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,27 +1,27 @@ { - "compilerOptions": { - "target": "es5", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "paths": { - "@/*": ["./src/*"] - } - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./src/*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] }