jamilvite 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/LICENSE +21 -0
- package/README.md +66 -0
- package/TODO.md +6 -0
- package/package.json +33 -0
- package/src/cli.js +133 -0
- package/templates/template-js-cdn/index.html +13 -0
- package/templates/template-js-cdn/package.json +23 -0
- package/templates/template-js-cdn/postcss.config.js +6 -0
- package/templates/template-js-cdn/src/App.jsx +15 -0
- package/templates/template-js-cdn/src/components/Nav.jsx +28 -0
- package/templates/template-js-cdn/src/main.jsx +13 -0
- package/templates/template-js-cdn/src/pages/About.jsx +23 -0
- package/templates/template-js-cdn/src/pages/Home.jsx +42 -0
- package/templates/template-js-cdn/src/pages/NotFound.jsx +15 -0
- package/templates/template-js-cdn/src/routes/Router.jsx +16 -0
- package/templates/template-js-cdn/src/styles/index.css +11 -0
- package/templates/template-js-cdn/tailwind.config.js +10 -0
- package/templates/template-js-cdn/vite.config.js +6 -0
- package/templates/template-js-local/index.html +12 -0
- package/templates/template-js-local/package.json +23 -0
- package/templates/template-js-local/postcss.config.js +6 -0
- package/templates/template-js-local/src/App.jsx +15 -0
- package/templates/template-js-local/src/components/Nav.jsx +28 -0
- package/templates/template-js-local/src/main.jsx +14 -0
- package/templates/template-js-local/src/pages/About.jsx +23 -0
- package/templates/template-js-local/src/pages/Home.jsx +42 -0
- package/templates/template-js-local/src/pages/NotFound.jsx +15 -0
- package/templates/template-js-local/src/routes/Router.jsx +16 -0
- package/templates/template-js-local/src/styles/index.css +11 -0
- package/templates/template-js-local/src/styles/w3.css +42 -0
- package/templates/template-js-local/tailwind.config.js +10 -0
- package/templates/template-js-local/vite.config.js +6 -0
- package/templates/template-ts-cdn/index.html +13 -0
- package/templates/template-ts-cdn/package.json +26 -0
- package/templates/template-ts-cdn/postcss.config.js +6 -0
- package/templates/template-ts-cdn/src/App.tsx +15 -0
- package/templates/template-ts-cdn/src/components/Nav.tsx +28 -0
- package/templates/template-ts-cdn/src/main.tsx +13 -0
- package/templates/template-ts-cdn/src/pages/About.tsx +23 -0
- package/templates/template-ts-cdn/src/pages/Home.tsx +42 -0
- package/templates/template-ts-cdn/src/pages/NotFound.tsx +15 -0
- package/templates/template-ts-cdn/src/routes/Router.tsx +16 -0
- package/templates/template-ts-cdn/src/styles/index.css +11 -0
- package/templates/template-ts-cdn/tailwind.config.js +10 -0
- package/templates/template-ts-cdn/tsconfig.json +17 -0
- package/templates/template-ts-cdn/vite.config.js +6 -0
- package/templates/template-ts-local/index.html +12 -0
- package/templates/template-ts-local/package.json +26 -0
- package/templates/template-ts-local/postcss.config.js +6 -0
- package/templates/template-ts-local/src/App.tsx +15 -0
- package/templates/template-ts-local/src/components/Nav.tsx +28 -0
- package/templates/template-ts-local/src/main.tsx +14 -0
- package/templates/template-ts-local/src/pages/About.tsx +23 -0
- package/templates/template-ts-local/src/pages/Home.tsx +42 -0
- package/templates/template-ts-local/src/pages/NotFound.tsx +15 -0
- package/templates/template-ts-local/src/routes/Router.tsx +16 -0
- package/templates/template-ts-local/src/styles/index.css +11 -0
- package/templates/template-ts-local/src/styles/w3.css +42 -0
- package/templates/template-ts-local/tailwind.config.js +10 -0
- package/templates/template-ts-local/tsconfig.json +17 -0
- package/templates/template-ts-local/vite.config.js +6 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const Home = () => {
|
|
2
|
+
return (
|
|
3
|
+
<section className="space-y-6">
|
|
4
|
+
<div className="rounded-3xl bg-white p-8 shadow-sm">
|
|
5
|
+
<p className="text-sm uppercase tracking-wide text-slate-500">Welcome</p>
|
|
6
|
+
<h1 className="mt-2 text-3xl font-semibold text-slate-900">
|
|
7
|
+
Jamilvite React Starter
|
|
8
|
+
</h1>
|
|
9
|
+
<p className="mt-4 text-slate-600">
|
|
10
|
+
This project ships with React Router, Tailwind CSS, and W3.CSS
|
|
11
|
+
preconfigured so you can start building immediately.
|
|
12
|
+
</p>
|
|
13
|
+
<div className="mt-6 flex flex-wrap gap-3">
|
|
14
|
+
<button className="w3-button w3-white w3-border w3-border-blue w3-round-large">
|
|
15
|
+
W3 Button
|
|
16
|
+
</button>
|
|
17
|
+
<span className="rounded-full bg-slate-900 px-4 py-2 text-sm text-white">
|
|
18
|
+
Tailwind Badge
|
|
19
|
+
</span>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div className="grid gap-6 md:grid-cols-2">
|
|
23
|
+
<article className="rounded-2xl border border-slate-200 bg-white p-6">
|
|
24
|
+
<h2 className="text-lg font-semibold text-slate-900">Router Ready</h2>
|
|
25
|
+
<p className="mt-2 text-slate-600">
|
|
26
|
+
Add new routes inside <code>src/routes/Router</code> and keep your
|
|
27
|
+
pages organized.
|
|
28
|
+
</p>
|
|
29
|
+
</article>
|
|
30
|
+
<article className="rounded-2xl border border-slate-200 bg-white p-6">
|
|
31
|
+
<h2 className="text-lg font-semibold text-slate-900">Design System</h2>
|
|
32
|
+
<p className="mt-2 text-slate-600">
|
|
33
|
+
Combine Tailwind utility classes with W3 components to speed up
|
|
34
|
+
layout and styling.
|
|
35
|
+
</p>
|
|
36
|
+
</article>
|
|
37
|
+
</div>
|
|
38
|
+
</section>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default Home;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const NotFound = () => {
|
|
2
|
+
return (
|
|
3
|
+
<section className="text-center">
|
|
4
|
+
<p className="text-sm uppercase tracking-wide text-slate-500">404</p>
|
|
5
|
+
<h1 className="mt-2 text-3xl font-semibold text-slate-900">
|
|
6
|
+
Page not found
|
|
7
|
+
</h1>
|
|
8
|
+
<p className="mt-3 text-slate-600">
|
|
9
|
+
The page you are looking for does not exist yet.
|
|
10
|
+
</p>
|
|
11
|
+
</section>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default NotFound;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Routes, Route } from 'react-router-dom';
|
|
2
|
+
import Home from '../pages/Home.jsx';
|
|
3
|
+
import About from '../pages/About.jsx';
|
|
4
|
+
import NotFound from '../pages/NotFound.jsx';
|
|
5
|
+
|
|
6
|
+
const Router = () => {
|
|
7
|
+
return (
|
|
8
|
+
<Routes>
|
|
9
|
+
<Route path="/" element={<Home />} />
|
|
10
|
+
<Route path="/about" element={<About />} />
|
|
11
|
+
<Route path="*" element={<NotFound />} />
|
|
12
|
+
</Routes>
|
|
13
|
+
);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default Router;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.w3-bar {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.w3-bar-item {
|
|
7
|
+
padding: 8px 16px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.w3-blue {
|
|
11
|
+
background-color: #0d6efd;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.w3-white {
|
|
15
|
+
background-color: #ffffff;
|
|
16
|
+
color: #0f172a;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.w3-border {
|
|
20
|
+
border: 1px solid #cbd5f5;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.w3-border-blue {
|
|
24
|
+
border-color: #0d6efd;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.w3-round-large {
|
|
28
|
+
border-radius: 999px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.w3-button {
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
padding: 8px 16px;
|
|
37
|
+
transition: background-color 0.2s ease, color 0.2s ease;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.w3-button:hover {
|
|
41
|
+
background-color: #e2e8f0;
|
|
42
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Jamilvite App</title>
|
|
7
|
+
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css" />
|
|
8
|
+
</head>
|
|
9
|
+
<body class="bg-slate-50 text-slate-900">
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jamilvite-app",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"preview": "vite preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"react": "^18.3.1",
|
|
13
|
+
"react-dom": "^18.3.1",
|
|
14
|
+
"react-router-dom": "^6.26.2"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@types/react": "^18.3.11",
|
|
18
|
+
"@types/react-dom": "^18.3.1",
|
|
19
|
+
"@vitejs/plugin-react": "^4.3.3",
|
|
20
|
+
"autoprefixer": "^10.4.20",
|
|
21
|
+
"postcss": "^8.4.47",
|
|
22
|
+
"tailwindcss": "^3.4.13",
|
|
23
|
+
"typescript": "^5.6.2",
|
|
24
|
+
"vite": "^5.4.8"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Router from './routes/Router';
|
|
2
|
+
import Nav from './components/Nav';
|
|
3
|
+
|
|
4
|
+
const App = () => {
|
|
5
|
+
return (
|
|
6
|
+
<div className="min-h-screen">
|
|
7
|
+
<Nav />
|
|
8
|
+
<main className="mx-auto w-full max-w-5xl px-6 py-10">
|
|
9
|
+
<Router />
|
|
10
|
+
</main>
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default App;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { NavLink } from 'react-router-dom';
|
|
2
|
+
|
|
3
|
+
const navLinkClass = ({ isActive }: { isActive: boolean }) =>
|
|
4
|
+
`px-4 py-2 rounded-full text-sm font-medium transition ${
|
|
5
|
+
isActive
|
|
6
|
+
? 'bg-white text-slate-900 shadow'
|
|
7
|
+
: 'text-slate-100 hover:bg-slate-700'
|
|
8
|
+
}`;
|
|
9
|
+
|
|
10
|
+
const Nav = () => {
|
|
11
|
+
return (
|
|
12
|
+
<header className="w3-bar w3-blue px-6 py-3 shadow">
|
|
13
|
+
<div className="mx-auto flex w-full max-w-5xl items-center justify-between">
|
|
14
|
+
<span className="text-lg font-semibold text-white">Jamilvite</span>
|
|
15
|
+
<nav className="flex items-center gap-2">
|
|
16
|
+
<NavLink to="/" className={navLinkClass}>
|
|
17
|
+
Home
|
|
18
|
+
</NavLink>
|
|
19
|
+
<NavLink to="/about" className={navLinkClass}>
|
|
20
|
+
About
|
|
21
|
+
</NavLink>
|
|
22
|
+
</nav>
|
|
23
|
+
</div>
|
|
24
|
+
</header>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default Nav;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom/client';
|
|
3
|
+
import { BrowserRouter } from 'react-router-dom';
|
|
4
|
+
import App from './App';
|
|
5
|
+
import './styles/index.css';
|
|
6
|
+
|
|
7
|
+
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
8
|
+
<React.StrictMode>
|
|
9
|
+
<BrowserRouter>
|
|
10
|
+
<App />
|
|
11
|
+
</BrowserRouter>
|
|
12
|
+
</React.StrictMode>
|
|
13
|
+
);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const About = () => {
|
|
2
|
+
return (
|
|
3
|
+
<section className="space-y-4">
|
|
4
|
+
<h1 className="text-2xl font-semibold text-slate-900">About this stack</h1>
|
|
5
|
+
<p className="text-slate-600">
|
|
6
|
+
Jamilvite pairs Vite with React Router, Tailwind CSS, and W3.CSS so you
|
|
7
|
+
can prototype fast and scale into production-friendly structure.
|
|
8
|
+
</p>
|
|
9
|
+
<div className="rounded-2xl bg-slate-900 p-6 text-slate-100">
|
|
10
|
+
<p className="text-sm uppercase tracking-wide text-slate-300">
|
|
11
|
+
Quick tips
|
|
12
|
+
</p>
|
|
13
|
+
<ul className="mt-4 list-disc space-y-2 pl-6 text-sm">
|
|
14
|
+
<li>Start building pages inside <code>src/pages</code>.</li>
|
|
15
|
+
<li>Update navigation in <code>src/components/Nav</code>.</li>
|
|
16
|
+
<li>Tailwind utilities live in <code>src/styles/index.css</code>.</li>
|
|
17
|
+
</ul>
|
|
18
|
+
</div>
|
|
19
|
+
</section>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default About;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const Home = () => {
|
|
2
|
+
return (
|
|
3
|
+
<section className="space-y-6">
|
|
4
|
+
<div className="rounded-3xl bg-white p-8 shadow-sm">
|
|
5
|
+
<p className="text-sm uppercase tracking-wide text-slate-500">Welcome</p>
|
|
6
|
+
<h1 className="mt-2 text-3xl font-semibold text-slate-900">
|
|
7
|
+
Jamilvite React Starter
|
|
8
|
+
</h1>
|
|
9
|
+
<p className="mt-4 text-slate-600">
|
|
10
|
+
This project ships with React Router, Tailwind CSS, and W3.CSS
|
|
11
|
+
preconfigured so you can start building immediately.
|
|
12
|
+
</p>
|
|
13
|
+
<div className="mt-6 flex flex-wrap gap-3">
|
|
14
|
+
<button className="w3-button w3-white w3-border w3-border-blue w3-round-large">
|
|
15
|
+
W3 Button
|
|
16
|
+
</button>
|
|
17
|
+
<span className="rounded-full bg-slate-900 px-4 py-2 text-sm text-white">
|
|
18
|
+
Tailwind Badge
|
|
19
|
+
</span>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div className="grid gap-6 md:grid-cols-2">
|
|
23
|
+
<article className="rounded-2xl border border-slate-200 bg-white p-6">
|
|
24
|
+
<h2 className="text-lg font-semibold text-slate-900">Router Ready</h2>
|
|
25
|
+
<p className="mt-2 text-slate-600">
|
|
26
|
+
Add new routes inside <code>src/routes/Router</code> and keep your
|
|
27
|
+
pages organized.
|
|
28
|
+
</p>
|
|
29
|
+
</article>
|
|
30
|
+
<article className="rounded-2xl border border-slate-200 bg-white p-6">
|
|
31
|
+
<h2 className="text-lg font-semibold text-slate-900">Design System</h2>
|
|
32
|
+
<p className="mt-2 text-slate-600">
|
|
33
|
+
Combine Tailwind utility classes with W3 components to speed up
|
|
34
|
+
layout and styling.
|
|
35
|
+
</p>
|
|
36
|
+
</article>
|
|
37
|
+
</div>
|
|
38
|
+
</section>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default Home;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const NotFound = () => {
|
|
2
|
+
return (
|
|
3
|
+
<section className="text-center">
|
|
4
|
+
<p className="text-sm uppercase tracking-wide text-slate-500">404</p>
|
|
5
|
+
<h1 className="mt-2 text-3xl font-semibold text-slate-900">
|
|
6
|
+
Page not found
|
|
7
|
+
</h1>
|
|
8
|
+
<p className="mt-3 text-slate-600">
|
|
9
|
+
The page you are looking for does not exist yet.
|
|
10
|
+
</p>
|
|
11
|
+
</section>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default NotFound;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Routes, Route } from 'react-router-dom';
|
|
2
|
+
import Home from '../pages/Home';
|
|
3
|
+
import About from '../pages/About';
|
|
4
|
+
import NotFound from '../pages/NotFound';
|
|
5
|
+
|
|
6
|
+
const Router = () => {
|
|
7
|
+
return (
|
|
8
|
+
<Routes>
|
|
9
|
+
<Route path="/" element={<Home />} />
|
|
10
|
+
<Route path="/about" element={<About />} />
|
|
11
|
+
<Route path="*" element={<NotFound />} />
|
|
12
|
+
</Routes>
|
|
13
|
+
);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default Router;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"moduleResolution": "Bundler",
|
|
9
|
+
"allowImportingTsExtensions": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"jsx": "react-jsx",
|
|
14
|
+
"strict": true
|
|
15
|
+
},
|
|
16
|
+
"include": ["src"]
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Jamilvite App</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body class="bg-slate-50 text-slate-900">
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jamilvite-app",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"preview": "vite preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"react": "^18.3.1",
|
|
13
|
+
"react-dom": "^18.3.1",
|
|
14
|
+
"react-router-dom": "^6.26.2"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@types/react": "^18.3.11",
|
|
18
|
+
"@types/react-dom": "^18.3.1",
|
|
19
|
+
"@vitejs/plugin-react": "^4.3.3",
|
|
20
|
+
"autoprefixer": "^10.4.20",
|
|
21
|
+
"postcss": "^8.4.47",
|
|
22
|
+
"tailwindcss": "^3.4.13",
|
|
23
|
+
"typescript": "^5.6.2",
|
|
24
|
+
"vite": "^5.4.8"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Router from './routes/Router';
|
|
2
|
+
import Nav from './components/Nav';
|
|
3
|
+
|
|
4
|
+
const App = () => {
|
|
5
|
+
return (
|
|
6
|
+
<div className="min-h-screen">
|
|
7
|
+
<Nav />
|
|
8
|
+
<main className="mx-auto w-full max-w-5xl px-6 py-10">
|
|
9
|
+
<Router />
|
|
10
|
+
</main>
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default App;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { NavLink } from 'react-router-dom';
|
|
2
|
+
|
|
3
|
+
const navLinkClass = ({ isActive }: { isActive: boolean }) =>
|
|
4
|
+
`px-4 py-2 rounded-full text-sm font-medium transition ${
|
|
5
|
+
isActive
|
|
6
|
+
? 'bg-white text-slate-900 shadow'
|
|
7
|
+
: 'text-slate-100 hover:bg-slate-700'
|
|
8
|
+
}`;
|
|
9
|
+
|
|
10
|
+
const Nav = () => {
|
|
11
|
+
return (
|
|
12
|
+
<header className="w3-bar w3-blue px-6 py-3 shadow">
|
|
13
|
+
<div className="mx-auto flex w-full max-w-5xl items-center justify-between">
|
|
14
|
+
<span className="text-lg font-semibold text-white">Jamilvite</span>
|
|
15
|
+
<nav className="flex items-center gap-2">
|
|
16
|
+
<NavLink to="/" className={navLinkClass}>
|
|
17
|
+
Home
|
|
18
|
+
</NavLink>
|
|
19
|
+
<NavLink to="/about" className={navLinkClass}>
|
|
20
|
+
About
|
|
21
|
+
</NavLink>
|
|
22
|
+
</nav>
|
|
23
|
+
</div>
|
|
24
|
+
</header>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default Nav;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom/client';
|
|
3
|
+
import { BrowserRouter } from 'react-router-dom';
|
|
4
|
+
import App from './App';
|
|
5
|
+
import './styles/index.css';
|
|
6
|
+
import './styles/w3.css';
|
|
7
|
+
|
|
8
|
+
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
9
|
+
<React.StrictMode>
|
|
10
|
+
<BrowserRouter>
|
|
11
|
+
<App />
|
|
12
|
+
</BrowserRouter>
|
|
13
|
+
</React.StrictMode>
|
|
14
|
+
);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const About = () => {
|
|
2
|
+
return (
|
|
3
|
+
<section className="space-y-4">
|
|
4
|
+
<h1 className="text-2xl font-semibold text-slate-900">About this stack</h1>
|
|
5
|
+
<p className="text-slate-600">
|
|
6
|
+
Jamilvite pairs Vite with React Router, Tailwind CSS, and W3.CSS so you
|
|
7
|
+
can prototype fast and scale into production-friendly structure.
|
|
8
|
+
</p>
|
|
9
|
+
<div className="rounded-2xl bg-slate-900 p-6 text-slate-100">
|
|
10
|
+
<p className="text-sm uppercase tracking-wide text-slate-300">
|
|
11
|
+
Quick tips
|
|
12
|
+
</p>
|
|
13
|
+
<ul className="mt-4 list-disc space-y-2 pl-6 text-sm">
|
|
14
|
+
<li>Start building pages inside <code>src/pages</code>.</li>
|
|
15
|
+
<li>Update navigation in <code>src/components/Nav</code>.</li>
|
|
16
|
+
<li>Tailwind utilities live in <code>src/styles/index.css</code>.</li>
|
|
17
|
+
</ul>
|
|
18
|
+
</div>
|
|
19
|
+
</section>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default About;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const Home = () => {
|
|
2
|
+
return (
|
|
3
|
+
<section className="space-y-6">
|
|
4
|
+
<div className="rounded-3xl bg-white p-8 shadow-sm">
|
|
5
|
+
<p className="text-sm uppercase tracking-wide text-slate-500">Welcome</p>
|
|
6
|
+
<h1 className="mt-2 text-3xl font-semibold text-slate-900">
|
|
7
|
+
Jamilvite React Starter
|
|
8
|
+
</h1>
|
|
9
|
+
<p className="mt-4 text-slate-600">
|
|
10
|
+
This project ships with React Router, Tailwind CSS, and W3.CSS
|
|
11
|
+
preconfigured so you can start building immediately.
|
|
12
|
+
</p>
|
|
13
|
+
<div className="mt-6 flex flex-wrap gap-3">
|
|
14
|
+
<button className="w3-button w3-white w3-border w3-border-blue w3-round-large">
|
|
15
|
+
W3 Button
|
|
16
|
+
</button>
|
|
17
|
+
<span className="rounded-full bg-slate-900 px-4 py-2 text-sm text-white">
|
|
18
|
+
Tailwind Badge
|
|
19
|
+
</span>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div className="grid gap-6 md:grid-cols-2">
|
|
23
|
+
<article className="rounded-2xl border border-slate-200 bg-white p-6">
|
|
24
|
+
<h2 className="text-lg font-semibold text-slate-900">Router Ready</h2>
|
|
25
|
+
<p className="mt-2 text-slate-600">
|
|
26
|
+
Add new routes inside <code>src/routes/Router</code> and keep your
|
|
27
|
+
pages organized.
|
|
28
|
+
</p>
|
|
29
|
+
</article>
|
|
30
|
+
<article className="rounded-2xl border border-slate-200 bg-white p-6">
|
|
31
|
+
<h2 className="text-lg font-semibold text-slate-900">Design System</h2>
|
|
32
|
+
<p className="mt-2 text-slate-600">
|
|
33
|
+
Combine Tailwind utility classes with W3 components to speed up
|
|
34
|
+
layout and styling.
|
|
35
|
+
</p>
|
|
36
|
+
</article>
|
|
37
|
+
</div>
|
|
38
|
+
</section>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default Home;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const NotFound = () => {
|
|
2
|
+
return (
|
|
3
|
+
<section className="text-center">
|
|
4
|
+
<p className="text-sm uppercase tracking-wide text-slate-500">404</p>
|
|
5
|
+
<h1 className="mt-2 text-3xl font-semibold text-slate-900">
|
|
6
|
+
Page not found
|
|
7
|
+
</h1>
|
|
8
|
+
<p className="mt-3 text-slate-600">
|
|
9
|
+
The page you are looking for does not exist yet.
|
|
10
|
+
</p>
|
|
11
|
+
</section>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default NotFound;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Routes, Route } from 'react-router-dom';
|
|
2
|
+
import Home from '../pages/Home';
|
|
3
|
+
import About from '../pages/About';
|
|
4
|
+
import NotFound from '../pages/NotFound';
|
|
5
|
+
|
|
6
|
+
const Router = () => {
|
|
7
|
+
return (
|
|
8
|
+
<Routes>
|
|
9
|
+
<Route path="/" element={<Home />} />
|
|
10
|
+
<Route path="/about" element={<About />} />
|
|
11
|
+
<Route path="*" element={<NotFound />} />
|
|
12
|
+
</Routes>
|
|
13
|
+
);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default Router;
|