From aaef18f15fbcbf1d33064352a6d28781d5865bb8 Mon Sep 17 00:00:00 2001 From: mohamadreza Date: Thu, 19 Dec 2024 16:32:32 +0330 Subject: [PATCH] feat(styles): add and remove some components and change some styles --- index.html | 2 +- package-lock.json | 70 ++++++++++++++++++++++++++++- package.json | 3 +- src/components/editor/Editor.jsx | 10 +++++ src/components/header/Header.jsx | 9 ++++ src/components/shared/Container.jsx | 11 +++++ src/components/sidebar/Side.jsx | 10 +++++ src/layouts/EditorLayout.jsx | 14 ++++++ src/main.jsx | 8 +++- src/styles/style.css | 6 ++- 10 files changed, 138 insertions(+), 5 deletions(-) create mode 100644 src/components/editor/Editor.jsx create mode 100644 src/components/header/Header.jsx create mode 100644 src/components/shared/Container.jsx create mode 100644 src/components/sidebar/Side.jsx create mode 100644 src/layouts/EditorLayout.jsx diff --git a/index.html b/index.html index fa1cfa2..9651643 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ سلام - ادیتور - +
diff --git a/package-lock.json b/package-lock.json index 0c85d44..26cd1a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,8 @@ "version": "0.0.0", "dependencies": { "react": "^18.3.1", - "react-dom": "^18.3.1" + "react-dom": "^18.3.1", + "react-router-dom": "^7.0.2" }, "devDependencies": { "@eslint/js": "^9.17.0", @@ -1381,6 +1382,12 @@ "@babel/types": "^7.20.7" } }, + "node_modules/@types/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", + "license": "MIT" + }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -2004,6 +2011,15 @@ "dev": true, "license": "MIT" }, + "node_modules/cookie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", + "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -4495,6 +4511,46 @@ "node": ">=0.10.0" } }, + "node_modules/react-router": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.0.2.tgz", + "integrity": "sha512-m5AcPfTRUcjwmhBzOJGEl6Y7+Crqyju0+TgTQxoS4SO+BkWbhOrcfZNq6wSWdl2BBbJbsAoBUb8ZacOFT+/JlA==", + "license": "MIT", + "dependencies": { + "@types/cookie": "^0.6.0", + "cookie": "^1.0.1", + "set-cookie-parser": "^2.6.0", + "turbo-stream": "2.4.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } + } + }, + "node_modules/react-router-dom": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.0.2.tgz", + "integrity": "sha512-VJOQ+CDWFDGaWdrG12Nl+d7yHtLaurNgAQZVgaIy7/Xd+DojgmYLosFfZdGz1wpxmjJIAkAMVTKWcvkx1oggAw==", + "license": "MIT", + "dependencies": { + "react-router": "7.0.2" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -4719,6 +4775,12 @@ "semver": "bin/semver.js" } }, + "node_modules/set-cookie-parser": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", + "license": "MIT" + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -5237,6 +5299,12 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/turbo-stream": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/turbo-stream/-/turbo-stream-2.4.0.tgz", + "integrity": "sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==", + "license": "ISC" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/package.json b/package.json index 4e57aa4..a11c931 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ }, "dependencies": { "react": "^18.3.1", - "react-dom": "^18.3.1" + "react-dom": "^18.3.1", + "react-router-dom": "^7.0.2" }, "devDependencies": { "@eslint/js": "^9.17.0", diff --git a/src/components/editor/Editor.jsx b/src/components/editor/Editor.jsx new file mode 100644 index 0000000..f828326 --- /dev/null +++ b/src/components/editor/Editor.jsx @@ -0,0 +1,10 @@ +const Editor = () => { + + return (<> +
+ +
+ ) +} + +export default Editor; \ No newline at end of file diff --git a/src/components/header/Header.jsx b/src/components/header/Header.jsx new file mode 100644 index 0000000..06cc108 --- /dev/null +++ b/src/components/header/Header.jsx @@ -0,0 +1,9 @@ +const Header = () => { + + return (<> +
+
+ ) +} + +export default Header \ No newline at end of file diff --git a/src/components/shared/Container.jsx b/src/components/shared/Container.jsx new file mode 100644 index 0000000..5259eb3 --- /dev/null +++ b/src/components/shared/Container.jsx @@ -0,0 +1,11 @@ +// eslint-disable-next-line react/prop-types +const Container = ({ children }) => { + + return (<> +
+ { children } +
+ ) +} + +export default Container; \ No newline at end of file diff --git a/src/components/sidebar/Side.jsx b/src/components/sidebar/Side.jsx new file mode 100644 index 0000000..8bdc7a9 --- /dev/null +++ b/src/components/sidebar/Side.jsx @@ -0,0 +1,10 @@ +const Side = () => { + + return (<> + + ) +} + +export default Side \ No newline at end of file diff --git a/src/layouts/EditorLayout.jsx b/src/layouts/EditorLayout.jsx new file mode 100644 index 0000000..5fa3a19 --- /dev/null +++ b/src/layouts/EditorLayout.jsx @@ -0,0 +1,14 @@ +import Header from "../components/header/Header.jsx"; +import Side from "../components/sidebar/Side.jsx"; +import Editor from "../components/editor/Editor.jsx"; + +const EditorLayout = () => { + + return (<> +
+ + + ) +} + +export default EditorLayout; \ No newline at end of file diff --git a/src/main.jsx b/src/main.jsx index c59d18e..c8e9f0e 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -1,5 +1,11 @@ import { createRoot } from 'react-dom/client' +import {BrowserRouter, Route, Routes} from "react-router-dom"; +import EditorLayout from "./layouts/EditorLayout.jsx"; createRoot(document.getElementById('root')).render(<> - + + + } /> + + ) diff --git a/src/styles/style.css b/src/styles/style.css index 796882a..61ec291 100644 --- a/src/styles/style.css +++ b/src/styles/style.css @@ -1,3 +1,7 @@ @tailwind base; @tailwind components; -@tailwind utilities; \ No newline at end of file +@tailwind utilities; + +@layer base { + +} \ No newline at end of file