Spaces:
Running
Running
عیب هاش package.json پیدا نمیشد
Browse filesindex.html و main.jsx نداشتی
script dev وجود نداشت
Tailwind init خطا میداد
- index.html +12 -13
- package.json +30 -0
- postcss.config.js +6 -0
- src/App.jsx +33 -0
- src/index.css +48 -0
- src/main.jsx +10 -0
- tailwind.config.js +18 -0
- vite.config.js +14 -0
index.html
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html lang="
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
@@ -7,18 +8,17 @@
|
|
| 7 |
<link rel="stylesheet" href="style.css">
|
| 8 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
-
<script src="https://unpkg.com/feather-icons"></script>
|
| 11 |
<script>
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
}
|
| 19 |
-
}
|
| 20 |
}
|
|
|
|
| 21 |
}
|
|
|
|
| 22 |
</script>
|
| 23 |
</head>
|
| 24 |
<body class="bg-gray-50 font-sans">
|
|
@@ -203,13 +203,12 @@
|
|
| 203 |
</main>
|
| 204 |
|
| 205 |
<custom-footer></custom-footer>
|
| 206 |
-
|
| 207 |
<script src="components/navbar.js"></script>
|
| 208 |
<script src="components/footer.js"></script>
|
| 209 |
<script src="script.js"></script>
|
| 210 |
<script>
|
| 211 |
-
|
| 212 |
</script>
|
| 213 |
-
<script src="
|
| 214 |
</body>
|
| 215 |
</html>
|
|
|
|
| 1 |
+
|
| 2 |
<!DOCTYPE html>
|
| 3 |
+
<html lang="fa" dir="rtl">
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
| 8 |
<link rel="stylesheet" href="style.css">
|
| 9 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 10 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
|
|
|
| 11 |
<script>
|
| 12 |
+
tailwind.config = {
|
| 13 |
+
theme: {
|
| 14 |
+
extend: {
|
| 15 |
+
colors: {
|
| 16 |
+
primary: '#3B82F6',
|
| 17 |
+
secondary: '#10B981',
|
|
|
|
|
|
|
| 18 |
}
|
| 19 |
+
}
|
| 20 |
}
|
| 21 |
+
}
|
| 22 |
</script>
|
| 23 |
</head>
|
| 24 |
<body class="bg-gray-50 font-sans">
|
|
|
|
| 203 |
</main>
|
| 204 |
|
| 205 |
<custom-footer></custom-footer>
|
|
|
|
| 206 |
<script src="components/navbar.js"></script>
|
| 207 |
<script src="components/footer.js"></script>
|
| 208 |
<script src="script.js"></script>
|
| 209 |
<script>
|
| 210 |
+
feather.replace();
|
| 211 |
</script>
|
| 212 |
+
<script type="module" src="/src/main.jsx"></script>
|
| 213 |
</body>
|
| 214 |
</html>
|
package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
```json
|
| 2 |
+
{
|
| 3 |
+
"name": "python-mastery-academy",
|
| 4 |
+
"version": "1.0.0",
|
| 5 |
+
"description": "Python learning platform",
|
| 6 |
+
"scripts": {
|
| 7 |
+
"dev": "vite",
|
| 8 |
+
"build": "vite build",
|
| 9 |
+
"preview": "vite preview",
|
| 10 |
+
"server": "node server/server.js"
|
| 11 |
+
},
|
| 12 |
+
"dependencies": {
|
| 13 |
+
"react": "^18.2.0",
|
| 14 |
+
"react-dom": "^18.2.0",
|
| 15 |
+
"react-router-dom": "^6.14.2",
|
| 16 |
+
"react-toastify": "^9.1.3",
|
| 17 |
+
"axios": "^1.4.0",
|
| 18 |
+
"feather-icons": "^4.29.0"
|
| 19 |
+
},
|
| 20 |
+
"devDependencies": {
|
| 21 |
+
"@types/react": "^18.2.15",
|
| 22 |
+
"@types/react-dom": "^18.2.7",
|
| 23 |
+
"@vitejs/plugin-react": "^4.0.3",
|
| 24 |
+
"autoprefixer": "^10.4.15",
|
| 25 |
+
"postcss": "^8.4.28",
|
| 26 |
+
"tailwindcss": "^3.3.3",
|
| 27 |
+
"vite": "^4.4.5"
|
| 28 |
+
}
|
| 29 |
+
}
|
| 30 |
+
```
|
postcss.config.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
module.exports = {
|
| 2 |
+
plugins: {
|
| 3 |
+
tailwindcss: {},
|
| 4 |
+
autoprefixer: {},
|
| 5 |
+
},
|
| 6 |
+
}
|
src/App.jsx
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { BrowserRouter, Routes, Route } from 'react-router-dom'
|
| 2 |
+
import Home from './pages/Home.jsx'
|
| 3 |
+
import Courses from './pages/Courses.jsx'
|
| 4 |
+
import CourseDetail from './pages/CourseDetail.jsx'
|
| 5 |
+
import Login from './pages/Login.jsx'
|
| 6 |
+
import Register from './pages/Register.jsx'
|
| 7 |
+
import Dashboard from './pages/Dashboard.jsx'
|
| 8 |
+
import Navbar from './components/Navbar.jsx'
|
| 9 |
+
import Footer from './components/Footer.jsx'
|
| 10 |
+
import PrivateRoute from './components/PrivateRoute.jsx'
|
| 11 |
+
|
| 12 |
+
function App() {
|
| 13 |
+
return (
|
| 14 |
+
<BrowserRouter>
|
| 15 |
+
<div className="flex flex-col min-h-screen">
|
| 16 |
+
<Navbar />
|
| 17 |
+
<main className="flex-grow">
|
| 18 |
+
<Routes>
|
| 19 |
+
<Route path="/" element={<Home />} />
|
| 20 |
+
<Route path="/courses" element={<Courses />} />
|
| 21 |
+
<Route path="/courses/:id" element={<CourseDetail />} />
|
| 22 |
+
<Route path="/login" element={<Login />} />
|
| 23 |
+
<Route path="/register" element={<Register />} />
|
| 24 |
+
<Route path="/dashboard" element={<PrivateRoute><Dashboard /></PrivateRoute>} />
|
| 25 |
+
</Routes>
|
| 26 |
+
</main>
|
| 27 |
+
<Footer />
|
| 28 |
+
</div>
|
| 29 |
+
</BrowserRouter>
|
| 30 |
+
)
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
export default App
|
src/index.css
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');
|
| 2 |
+
|
| 3 |
+
@tailwind base;
|
| 4 |
+
@tailwind components;
|
| 5 |
+
@tailwind utilities;
|
| 6 |
+
|
| 7 |
+
/* Custom Scrollbar */
|
| 8 |
+
::-webkit-scrollbar {
|
| 9 |
+
width: 8px;
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
::-webkit-scrollbar-track {
|
| 13 |
+
background: #f1f1f1;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
::-webkit-scrollbar-thumb {
|
| 17 |
+
background: #3B82F6;
|
| 18 |
+
border-radius: 4px;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
::-webkit-scrollbar-thumb:hover {
|
| 22 |
+
background: #2563EB;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
/* Animation Classes */
|
| 26 |
+
.fade-in {
|
| 27 |
+
animation: fadeIn 0.5s ease-in-out;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
@keyframes fadeIn {
|
| 31 |
+
from { opacity: 0; }
|
| 32 |
+
to { opacity: 1; }
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
.slide-up {
|
| 36 |
+
animation: slideUp 0.5s ease-out;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
@keyframes slideUp {
|
| 40 |
+
from {
|
| 41 |
+
opacity: 0;
|
| 42 |
+
transform: translateY(20px);
|
| 43 |
+
}
|
| 44 |
+
to {
|
| 45 |
+
opacity: 1;
|
| 46 |
+
transform: translateY(0);
|
| 47 |
+
}
|
| 48 |
+
}
|
src/main.jsx
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React from 'react'
|
| 2 |
+
import ReactDOM from 'react-dom/client'
|
| 3 |
+
import App from './App.jsx'
|
| 4 |
+
import './index.css'
|
| 5 |
+
|
| 6 |
+
ReactDOM.createRoot(document.getElementById('root')).render(
|
| 7 |
+
<React.StrictMode>
|
| 8 |
+
<App />
|
| 9 |
+
</React.StrictMode>,
|
| 10 |
+
)
|
tailwind.config.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
module.exports = {
|
| 2 |
+
content: [
|
| 3 |
+
"./index.html",
|
| 4 |
+
"./src/**/*.{js,ts,jsx,tsx}",
|
| 5 |
+
],
|
| 6 |
+
theme: {
|
| 7 |
+
extend: {
|
| 8 |
+
colors: {
|
| 9 |
+
primary: '#3B82F6',
|
| 10 |
+
secondary: '#10B981',
|
| 11 |
+
},
|
| 12 |
+
fontFamily: {
|
| 13 |
+
sans: ['Vazirmatn', 'sans-serif'],
|
| 14 |
+
},
|
| 15 |
+
},
|
| 16 |
+
},
|
| 17 |
+
plugins: [],
|
| 18 |
+
}
|
vite.config.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { defineConfig } from 'vite'
|
| 2 |
+
import react from '@vitejs/plugin-react'
|
| 3 |
+
|
| 4 |
+
export default defineConfig({
|
| 5 |
+
plugins: [react()],
|
| 6 |
+
server: {
|
| 7 |
+
proxy: {
|
| 8 |
+
'/api': {
|
| 9 |
+
target: 'http://localhost:5000',
|
| 10 |
+
changeOrigin: true,
|
| 11 |
+
}
|
| 12 |
+
}
|
| 13 |
+
}
|
| 14 |
+
})
|