refactor: drop everything and start again
- too many packages - packages were too general - the repo was hard to work with - sites were too connected to packages - difficult to do stuff after a while
This commit is contained in:
parent
358e6e59e3
commit
ada7eb3cdd
54 changed files with 1066 additions and 1011 deletions
4
sites/terraform-skoleni.cz/.eslintrc.js
Normal file
4
sites/terraform-skoleni.cz/.eslintrc.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
extends: ["custom"],
|
||||
};
|
||||
30
sites/terraform-skoleni.cz/README.md
Normal file
30
sites/terraform-skoleni.cz/README.md
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
## Getting Started
|
||||
|
||||
First, run the development server:
|
||||
|
||||
```bash
|
||||
yarn dev
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
|
||||
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
|
||||
|
||||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
|
||||
|
||||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
|
||||
|
||||
## Learn More
|
||||
|
||||
To learn more about Next.js, 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.
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - 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_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js.
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
|
||||
25
sites/terraform-skoleni.cz/app/layout.tsx
Normal file
25
sites/terraform-skoleni.cz/app/layout.tsx
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import '/styles/global.css';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: {
|
||||
default: 'Terraform školení - Vojtěch Mareš',
|
||||
template: '%s | Next.js App Router',
|
||||
},
|
||||
description:
|
||||
'Terraform školení pro začátečníky i pokročilé | Školí Vojtěch Mareš - DevOps konzultant, lektor a mentor',
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<html lang="en" className="[color-scheme:dark]">
|
||||
<body className="bg-gray-1100 overflow-y-scroll bg-[url('/grid.svg')] pb-36">
|
||||
<h1>Terraform Školení</h1>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
13
sites/terraform-skoleni.cz/app/not-found.tsx
Normal file
13
sites/terraform-skoleni.cz/app/not-found.tsx
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { Boundary } from '../components/Boundary';
|
||||
|
||||
export default function NotFound() {
|
||||
return (
|
||||
<Boundary labels={['not-found.tsx']} color="pink">
|
||||
<div className="space-y-4 text-vercel-pink">
|
||||
<h2 className="text-lg font-bold">Not Found</h2>
|
||||
|
||||
<p className="text-sm">Could not find requested resource</p>
|
||||
</div>
|
||||
</Boundary>
|
||||
);
|
||||
}
|
||||
5
sites/terraform-skoleni.cz/app/page.tsx
Normal file
5
sites/terraform-skoleni.cz/app/page.tsx
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
export default function Page() {
|
||||
return (
|
||||
<>Hello</>
|
||||
);
|
||||
}
|
||||
82
sites/terraform-skoleni.cz/components/Boundary.tsx
Normal file
82
sites/terraform-skoleni.cz/components/Boundary.tsx
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
import clsx from 'clsx';
|
||||
import React from 'react';
|
||||
|
||||
const Label = ({
|
||||
children,
|
||||
animateRerendering,
|
||||
color,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
animateRerendering?: boolean;
|
||||
color?: 'default' | 'pink' | 'blue' | 'violet' | 'cyan' | 'orange';
|
||||
}) => {
|
||||
return (
|
||||
<div
|
||||
className={clsx('rounded-full px-1.5 shadow-[0_0_1px_3px_black]', {
|
||||
'bg-gray-800 text-gray-300': color === 'default',
|
||||
'bg-vercel-pink text-white': color === 'pink',
|
||||
'bg-vercel-blue text-white': color === 'blue',
|
||||
'bg-vercel-cyan text-white': color === 'cyan',
|
||||
'bg-vercel-violet text-violet-100': color === 'violet',
|
||||
'bg-vercel-orange text-white': color === 'orange',
|
||||
'animate-[highlight_1s_ease-in-out_1]': animateRerendering,
|
||||
})}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
export const Boundary = ({
|
||||
children,
|
||||
labels = ['children'],
|
||||
size = 'default',
|
||||
color = 'default',
|
||||
animateRerendering = true,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
labels?: string[];
|
||||
size?: 'small' | 'default';
|
||||
color?: 'default' | 'pink' | 'blue' | 'violet' | 'cyan' | 'orange';
|
||||
animateRerendering?: boolean;
|
||||
}) => {
|
||||
return (
|
||||
<div
|
||||
className={clsx('relative rounded-lg border border-dashed', {
|
||||
'p-3 lg:p-5': size === 'small',
|
||||
'p-4 lg:p-9': size === 'default',
|
||||
'border-gray-700': color === 'default',
|
||||
'border-vercel-pink': color === 'pink',
|
||||
'border-vercel-blue': color === 'blue',
|
||||
'border-vercel-cyan': color === 'cyan',
|
||||
'border-vercel-violet': color === 'violet',
|
||||
'border-vercel-orange': color === 'orange',
|
||||
'animate-[rerender_1s_ease-in-out_1] text-vercel-pink':
|
||||
animateRerendering,
|
||||
})}
|
||||
>
|
||||
<div
|
||||
className={clsx(
|
||||
'absolute -top-2.5 flex gap-x-1 text-[9px] uppercase leading-4 tracking-widest',
|
||||
{
|
||||
'left-3 lg:left-5': size === 'small',
|
||||
'left-4 lg:left-9': size === 'default',
|
||||
},
|
||||
)}
|
||||
>
|
||||
{labels.map((label) => {
|
||||
return (
|
||||
<Label
|
||||
key={label}
|
||||
color={color}
|
||||
animateRerendering={animateRerendering}
|
||||
>
|
||||
{label}
|
||||
</Label>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
5
sites/terraform-skoleni.cz/next-env.d.ts
vendored
Normal file
5
sites/terraform-skoleni.cz/next-env.d.ts
vendored
Normal 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.
|
||||
6
sites/terraform-skoleni.cz/next.config.js
Normal file
6
sites/terraform-skoleni.cz/next.config.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
const nextConfig = {
|
||||
transpilePackages: ['ui'],
|
||||
reactStrictMode: true,
|
||||
};
|
||||
|
||||
module.exports = nextConfig;
|
||||
28
sites/terraform-skoleni.cz/package.json
Normal file
28
sites/terraform-skoleni.cz/package.json
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"name": "terraform-skoleni.cz",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"clsx": "^1.2.1",
|
||||
"next": "13.4.4",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.22.1",
|
||||
"@types/node": "^18.16.16",
|
||||
"@types/react": "18.2.7",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"eslint": "8.41.0",
|
||||
"eslint-config-next": "^13.0.0",
|
||||
"postcss": "^8.4.24",
|
||||
"tailwindcss": "^3.3.2",
|
||||
"typescript": "5.1.3"
|
||||
}
|
||||
}
|
||||
8
sites/terraform-skoleni.cz/postcss.config.js
Normal file
8
sites/terraform-skoleni.cz/postcss.config.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// If you want to use other PostCSS plugins, see the following:
|
||||
// https://tailwindcss.com/docs/using-with-preprocessors
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
}
|
||||
3
sites/terraform-skoleni.cz/styles/global.css
Normal file
3
sites/terraform-skoleni.cz/styles/global.css
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
10
sites/terraform-skoleni.cz/tailwind.config.js
Normal file
10
sites/terraform-skoleni.cz/tailwind.config.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
module.exports = {
|
||||
content: [
|
||||
'./components/**/*.{ts,tsx}',
|
||||
'./app/**/*.{ts,tsx}',
|
||||
],
|
||||
theme: {
|
||||
extend: {}
|
||||
},
|
||||
plugins: []
|
||||
}
|
||||
44
sites/terraform-skoleni.cz/tsconfig.json
Normal file
44
sites/terraform-skoleni.cz/tsconfig.json
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"composite": false,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"inlineSources": false,
|
||||
"isolatedModules": true,
|
||||
"moduleResolution": "node",
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false,
|
||||
"preserveWatchOutput": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"target": "es5",
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"esnext"
|
||||
],
|
||||
"allowJs": true,
|
||||
"noEmit": true,
|
||||
"module": "esnext",
|
||||
"resolveJsonModule": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"plugins": [
|
||||
{
|
||||
"name": "next"
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"next-env.d.ts",
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
".next/types/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
Reference in a new issue