commit a17faa0822825c19431ad7eef79dd747be792ccb Author: Lanskikh Date: Thu Aug 29 18:47:58 2024 +0500 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..6d722ea --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "arrowParens": "avoid", + "semi": true, + "singleQuote": true, + "tabWidth": 2, + "trailingComma": "all" +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..74872fd --- /dev/null +++ b/README.md @@ -0,0 +1,50 @@ +# React + TypeScript + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: + +- Configure the top-level `parserOptions` property like this: + +```js +export default tseslint.config({ + languageOptions: { + // other options... + parserOptions: { + project: ['./tsconfig.node.json', './tsconfig.app.json'], + tsconfigRootDir: import.meta.dirname, + }, + }, +}) +``` + +- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked` +- Optionally add `...tseslint.configs.stylisticTypeChecked` +- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config: + +```js +// eslint.config.js +import react from 'eslint-plugin-react' + +export default tseslint.config({ + // Set the react version + settings: { react: { version: '18.3' } }, + plugins: { + // Add the react plugin + react, + }, + rules: { + // other rules... + // Enable its recommended rules + ...react.configs.recommended.rules, + ...react.configs['jsx-runtime'].rules, + }, +}) +``` diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..092408a --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,28 @@ +import js from '@eslint/js' +import globals from 'globals' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' +import tseslint from 'typescript-eslint' + +export default tseslint.config( + { ignores: ['dist'] }, + { + extends: [js.configs.recommended, ...tseslint.configs.recommended], + files: ['**/*.{ts,tsx}'], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + }, + plugins: { + 'react-hooks': reactHooks, + 'react-refresh': reactRefresh, + }, + rules: { + ...reactHooks.configs.recommended.rules, + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, + }, +) diff --git a/index.html b/index.html new file mode 100644 index 0000000..74f12a5 --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + React + TS + + +
+ + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..8e234e9 --- /dev/null +++ b/package.json @@ -0,0 +1,36 @@ +{ + "name": "graff.event", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "lint": "eslint .", + "preview": "vite preview" + }, + "dependencies": { + "framer-motion": "^11.3.31", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-router-dom": "^6.26.1", + "usehooks-ts": "^3.1.0" + }, + "devDependencies": { + "@eslint/js": "^9.9.0", + "@types/react": "^18.3.3", + "@types/react-dom": "^18.3.0", + "@vitejs/plugin-react": "^4.3.1", + "autoprefixer": "^10.4.20", + "eslint": "^9.9.0", + "eslint-plugin-react-hooks": "^5.1.0-rc.0", + "eslint-plugin-react-refresh": "^0.4.9", + "globals": "^15.9.0", + "postcss": "^8.4.41", + "prettier": "^3.3.3", + "tailwindcss": "^3.4.10", + "typescript": "^5.5.3", + "typescript-eslint": "^8.0.1", + "vite": "^5.4.1" + } +} diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..2e7af2b --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/public/fonts/TTHovesProAll/TTHovesPro-DmBd.eot b/public/fonts/TTHovesProAll/TTHovesPro-DmBd.eot new file mode 100644 index 0000000..5cc5eea Binary files /dev/null and b/public/fonts/TTHovesProAll/TTHovesPro-DmBd.eot differ diff --git a/public/fonts/TTHovesProAll/TTHovesPro-DmBd.ttf b/public/fonts/TTHovesProAll/TTHovesPro-DmBd.ttf new file mode 100644 index 0000000..45ab33d Binary files /dev/null and b/public/fonts/TTHovesProAll/TTHovesPro-DmBd.ttf differ diff --git a/public/fonts/TTHovesProAll/TTHovesPro-DmBd.woff b/public/fonts/TTHovesProAll/TTHovesPro-DmBd.woff new file mode 100644 index 0000000..bf0549a Binary files /dev/null and b/public/fonts/TTHovesProAll/TTHovesPro-DmBd.woff differ diff --git a/public/fonts/TTHovesProAll/TTHovesPro-DmBd.woff2 b/public/fonts/TTHovesProAll/TTHovesPro-DmBd.woff2 new file mode 100644 index 0000000..ac58b1f Binary files /dev/null and b/public/fonts/TTHovesProAll/TTHovesPro-DmBd.woff2 differ diff --git a/public/fonts/TTHovesProAll/TTHovesPro-Md.eot b/public/fonts/TTHovesProAll/TTHovesPro-Md.eot new file mode 100644 index 0000000..37c2ee7 Binary files /dev/null and b/public/fonts/TTHovesProAll/TTHovesPro-Md.eot differ diff --git a/public/fonts/TTHovesProAll/TTHovesPro-Md.ttf b/public/fonts/TTHovesProAll/TTHovesPro-Md.ttf new file mode 100644 index 0000000..96896b5 Binary files /dev/null and b/public/fonts/TTHovesProAll/TTHovesPro-Md.ttf differ diff --git a/public/fonts/TTHovesProAll/TTHovesPro-Md.woff b/public/fonts/TTHovesProAll/TTHovesPro-Md.woff new file mode 100644 index 0000000..dba766b Binary files /dev/null and b/public/fonts/TTHovesProAll/TTHovesPro-Md.woff differ diff --git a/public/fonts/TTHovesProAll/TTHovesPro-Md.woff2 b/public/fonts/TTHovesProAll/TTHovesPro-Md.woff2 new file mode 100644 index 0000000..df64d2f Binary files /dev/null and b/public/fonts/TTHovesProAll/TTHovesPro-Md.woff2 differ diff --git a/public/fonts/TTHovesProAll/TTHovesPro-Rg.eot b/public/fonts/TTHovesProAll/TTHovesPro-Rg.eot new file mode 100644 index 0000000..128b76b Binary files /dev/null and b/public/fonts/TTHovesProAll/TTHovesPro-Rg.eot differ diff --git a/public/fonts/TTHovesProAll/TTHovesPro-Rg.ttf b/public/fonts/TTHovesProAll/TTHovesPro-Rg.ttf new file mode 100644 index 0000000..e41a50e Binary files /dev/null and b/public/fonts/TTHovesProAll/TTHovesPro-Rg.ttf differ diff --git a/public/fonts/TTHovesProAll/TTHovesPro-Rg.woff b/public/fonts/TTHovesProAll/TTHovesPro-Rg.woff new file mode 100644 index 0000000..fb1b27b Binary files /dev/null and b/public/fonts/TTHovesProAll/TTHovesPro-Rg.woff differ diff --git a/public/fonts/TTHovesProAll/TTHovesPro-Rg.woff2 b/public/fonts/TTHovesProAll/TTHovesPro-Rg.woff2 new file mode 100644 index 0000000..2550fa8 Binary files /dev/null and b/public/fonts/TTHovesProAll/TTHovesPro-Rg.woff2 differ diff --git a/public/fonts/TTHovesProAll/demo.html b/public/fonts/TTHovesProAll/demo.html new file mode 100644 index 0000000..a5b323f --- /dev/null +++ b/public/fonts/TTHovesProAll/demo.html @@ -0,0 +1,250 @@ + + + + + + + + + Transfonter demo + + + + +
+
+

☝︎TT Hoves Pro DemiBold

+
.your-style {
+    font-family: 'TTHovesPro-DmBd';
+    font-weight: 600;
+    font-style: normal;
+}
+
+<link rel="preload" href="TTHovesPro-DmBd.woff2" as="font" type="font/woff2" crossorigin>
+
+

+ abcdefghijklmnopqrstuvwxyz
+ABCDEFGHIJKLMNOPQRSTUVWXYZ
+ 0123456789.:,;()*!?'@#<>$%&^+-=~ +

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+
+
+ +
+

☝︎TT Hoves Pro Medium

+
.your-style {
+    font-family: 'TTHovesPro-Md';
+    font-weight: 500;
+    font-style: normal;
+}
+
+<link rel="preload" href="TTHovesPro-Md.woff2" as="font" type="font/woff2" crossorigin>
+
+

+ abcdefghijklmnopqrstuvwxyz
+ABCDEFGHIJKLMNOPQRSTUVWXYZ
+ 0123456789.:,;()*!?'@#<>$%&^+-=~ +

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+
+
+ +
+

☝︎TT Hoves Pro Regular

+
.your-style {
+    font-family: 'TTHovesPro-Rg';
+    font-weight: normal;
+    font-style: normal;
+}
+
+<link rel="preload" href="TTHovesPro-Rg.woff2" as="font" type="font/woff2" crossorigin>
+
+

+ abcdefghijklmnopqrstuvwxyz
+ABCDEFGHIJKLMNOPQRSTUVWXYZ
+ 0123456789.:,;()*!?'@#<>$%&^+-=~ +

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+

The quick brown fox jumps over the lazy dog.

+
+
+ +
+ + diff --git a/public/fonts/TTHovesProAll/stylesheet.css b/public/fonts/TTHovesProAll/stylesheet.css new file mode 100644 index 0000000..4440c8c --- /dev/null +++ b/public/fonts/TTHovesProAll/stylesheet.css @@ -0,0 +1,38 @@ +@font-face { + font-family: 'TTHovesPro'; + src: url('TTHovesPro-DmBd.eot'); + src: + url('TTHovesPro-DmBd.eot?#iefix') format('embedded-opentype'), + url('TTHovesPro-DmBd.woff2') format('woff2'), + url('TTHovesPro-DmBd.woff') format('woff'), + url('TTHovesPro-DmBd.ttf') format('truetype'); + font-weight: 600; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'TTHovesPro'; + src: url('TTHovesPro-Md.eot'); + src: + url('TTHovesPro-Md.eot?#iefix') format('embedded-opentype'), + url('TTHovesPro-Md.woff2') format('woff2'), + url('TTHovesPro-Md.woff') format('woff'), + url('TTHovesPro-Md.ttf') format('truetype'); + font-weight: 500; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'TTHovesPro'; + src: url('TTHovesPro-Rg.eot'); + src: + url('TTHovesPro-Rg.eot?#iefix') format('embedded-opentype'), + url('TTHovesPro-Rg.woff2') format('woff2'), + url('TTHovesPro-Rg.woff') format('woff'), + url('TTHovesPro-Rg.ttf') format('truetype'); + font-weight: normal; + font-style: normal; + font-display: swap; +} diff --git a/src/Layout/Footer.tsx b/src/Layout/Footer.tsx new file mode 100644 index 0000000..5364b3b --- /dev/null +++ b/src/Layout/Footer.tsx @@ -0,0 +1,3 @@ +export function Footer() { + return ; +} diff --git a/src/Layout/Header.tsx b/src/Layout/Header.tsx new file mode 100644 index 0000000..4ed9de8 --- /dev/null +++ b/src/Layout/Header.tsx @@ -0,0 +1,38 @@ +import { Link } from 'react-router-dom'; +import { Logo } from '../components/icons/Logo'; +import { Button } from '../components/ui/Button'; +import { ClassNameWrapper } from '../hocs/ClassNameWrapper'; + +export function Header() { + return ( +
+ + } className="h-10" /> + + + +
+ ); +} + +function HashLink({ path, text }: { path: string; text: string }) { + return ( + + {text} + + ); +} diff --git a/src/Layout/index.tsx b/src/Layout/index.tsx new file mode 100644 index 0000000..3d5b066 --- /dev/null +++ b/src/Layout/index.tsx @@ -0,0 +1,15 @@ +import { Outlet } from 'react-router-dom'; +import { Footer } from './Footer'; +import { Header } from './Header'; + +export function Layout() { + return ( + <> +
+
+ +
+