1
0
Fork 0

feat: add og app (boilerplate)

This commit is contained in:
Vojtěch Mareš 2023-10-07 11:21:17 +02:00
parent 7ebe33a52a
commit db47579536
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D
14 changed files with 202 additions and 14 deletions

8
apps/og/.eslintrc.js Normal file
View file

@ -0,0 +1,8 @@
module.exports = {
root: true,
extends: ["next", "prettier", "next/core-web-vitals"],
rules: {
"@next/next/no-html-link-for-pages": "off",
"react/jsx-key": "off",
},
};

7
apps/og/README.md Normal file
View file

@ -0,0 +1,7 @@
# og
[og.mareshq.com](https://og.mareshq.com)
## Open Graph
## Twitter card

18
apps/og/app/layout.tsx Normal file
View file

@ -0,0 +1,18 @@
import { Analytics } from '@vercel/analytics/react'
import './tailwind.css'
const RootLayout = ({ children }: { children: React.ReactNode }) => {
return (
<html className="h-full scroll-smooth bg-white antialiased [font-feature-settings:'ss01']" lang="cs">
<head>
</head>
<body className="flex h-full flex-col">
{children}
<Analytics />
</body>
</html>
)
}
export default RootLayout

21
apps/og/app/page.tsx Normal file
View file

@ -0,0 +1,21 @@
import Link from "next/link"
const Page = () => {
return (
<main className="my-auto mx-8 2xl:mx-auto">
<h1 className="font-display text-5xl font-medium tracking-tight text-black sm:text-7xl leading-10">
Hello 👋
<br />
You found my OG / Twitter card image generator.
</h1>
<p className="mt-6 text-3xl tracking-tight text-slate-700">
Interested in source code?{" "}
<Link className="underline text-slate-800 hover:text-slate-900" href="https://github.com/vojtechmares/websites/tree/main/apps/og">
[github.com/vojtechmares/websites/og]
</Link>
</p>
</main>
)
}
export default Page

3
apps/og/app/tailwind.css Normal file
View file

@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

5
apps/og/next-env.d.ts vendored Normal file
View file

@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

8
apps/og/next.config.js Normal file
View file

@ -0,0 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
pageExtensions: ["js", "jsx", "ts", "tsx",],
};
module.exports = nextConfig

36
apps/og/package.json Normal file
View file

@ -0,0 +1,36 @@
{
"name": "og",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@vercel/analytics": "^1.1.0",
"clsx": "^2.0.0",
"next": "13.5.4",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@types/node": "^20.8.3",
"@types/react": "^18.2.25",
"autoprefixer": "^10.4.16",
"eslint": "8.51.0",
"eslint-config-next": "13.5.4",
"eslint-config-prettier": "^9.0.0",
"postcss": "^8.4.31",
"prettier": "^3.0.3",
"prettier-plugin-tailwindcss": "^0.5.5",
"tailwindcss": "^3.3.3",
"tsconfig": "workspace:*",
"typescript": "^5.2.2"
},
"engines": {
"node": "18.x"
},
"packageManager": "pnpm@8.8.0"
}

View file

@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
}

View file

@ -0,0 +1,4 @@
/** @type {import("prettier").Config} */
module.exports = {
plugins: [require.resolve("prettier-plugin-tailwindcss")],
};

BIN
apps/og/public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -0,0 +1,10 @@
module.exports = {
content: [
'./app/**/*.{ts,tsx}',
'./pages/**/*.{ts,tsx}',
'./components/**/*.{ts,tsx}',
],
theme: {
extend: {}
}
}

19
apps/og/tsconfig.json Normal file
View file

@ -0,0 +1,19 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "tsconfig/nextjs.json",
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": [
"./*"
]
},
"strictNullChecks": true
}
}

71
pnpm-lock.yaml generated
View file

@ -27,6 +27,61 @@ importers:
specifier: ^1.10.12
version: 1.10.15
apps/og:
dependencies:
'@vercel/analytics':
specifier: ^1.1.0
version: 1.1.0
clsx:
specifier: ^2.0.0
version: 2.0.0
next:
specifier: 13.5.4
version: 13.5.4(@babel/core@7.23.0)(react-dom@18.2.0)(react@18.2.0)
react:
specifier: 18.2.0
version: 18.2.0
react-dom:
specifier: 18.2.0
version: 18.2.0(react@18.2.0)
devDependencies:
'@types/node':
specifier: ^20.8.3
version: 20.8.3
'@types/react':
specifier: ^18.2.25
version: 18.2.25
autoprefixer:
specifier: ^10.4.16
version: 10.4.16(postcss@8.4.31)
eslint:
specifier: 8.51.0
version: 8.51.0
eslint-config-next:
specifier: 13.5.4
version: 13.5.4(eslint@8.51.0)(typescript@5.2.2)
eslint-config-prettier:
specifier: ^9.0.0
version: 9.0.0(eslint@8.51.0)
postcss:
specifier: ^8.4.31
version: 8.4.31
prettier:
specifier: ^3.0.3
version: 3.0.3
prettier-plugin-tailwindcss:
specifier: ^0.5.5
version: 0.5.5(prettier@3.0.3)
tailwindcss:
specifier: ^3.3.3
version: 3.3.3
tsconfig:
specifier: workspace:*
version: link:../../packages/tsconfig
typescript:
specifier: ^5.2.2
version: 5.2.2
apps/vojtechmares.com:
dependencies:
'@mdx-js/loader':
@ -561,8 +616,8 @@ packages:
ajv: 6.12.6
debug: 4.3.4
espree: 9.6.1
globals: 13.19.0
ignore: 5.2.0
globals: 13.23.0
ignore: 5.2.4
import-fresh: 3.3.0
js-yaml: 4.1.0
minimatch: 3.1.2
@ -2579,13 +2634,6 @@ packages:
resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==}
engines: {node: '>=4'}
/globals@13.19.0:
resolution: {integrity: sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==}
engines: {node: '>=8'}
dependencies:
type-fest: 0.20.2
dev: true
/globals@13.23.0:
resolution: {integrity: sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==}
engines: {node: '>=8'}
@ -2729,11 +2777,6 @@ packages:
safer-buffer: 2.1.2
dev: true
/ignore@5.2.0:
resolution: {integrity: sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==}
engines: {node: '>= 4'}
dev: true
/ignore@5.2.4:
resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==}
engines: {node: '>= 4'}