diff --git a/OsdagFrontend/.gitignore b/OsdagFrontend/.gitignore new file mode 100644 index 000000000..a547bf36d --- /dev/null +++ b/OsdagFrontend/.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/OsdagFrontend/README.md b/OsdagFrontend/README.md new file mode 100644 index 000000000..fd3b758d9 --- /dev/null +++ b/OsdagFrontend/README.md @@ -0,0 +1,12 @@ +# React + 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 using TypeScript and enable type-aware lint rules. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project. diff --git a/OsdagFrontend/eslint.config.js b/OsdagFrontend/eslint.config.js new file mode 100644 index 000000000..ec2b712d3 --- /dev/null +++ b/OsdagFrontend/eslint.config.js @@ -0,0 +1,33 @@ +import js from '@eslint/js' +import globals from 'globals' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' + +export default [ + { ignores: ['dist'] }, + { + files: ['**/*.{js,jsx}'], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + parserOptions: { + ecmaVersion: 'latest', + ecmaFeatures: { jsx: true }, + sourceType: 'module', + }, + }, + plugins: { + 'react-hooks': reactHooks, + 'react-refresh': reactRefresh, + }, + rules: { + ...js.configs.recommended.rules, + ...reactHooks.configs.recommended.rules, + 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }], + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, + }, +] diff --git a/OsdagFrontend/index.html b/OsdagFrontend/index.html new file mode 100644 index 000000000..0c589eccd --- /dev/null +++ b/OsdagFrontend/index.html @@ -0,0 +1,13 @@ + + +
+ + + +
+//
+//
+//
handleViewChange("/src/assets/zxview.png")}
+// title="Fornt View"
+// />
+//
handleViewChange("/src/assets/zyview.png")}
+// title="Side View"
+// />
+//
handleViewChange("/src/assets/yxview.png")}
+// title="Top View"
+// />
+//
handleViewChange("/src/assets/zxview.png")}
+ title="Front View"
+ />
+
handleViewChange("/src/assets/zyview.png")}
+ title="Side View"
+ />
+
handleViewChange("/src/assets/yxview.png")}
+ title="Top View"
+ />
+
+//
+