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
}
}