From a8db85f94fd8ebf4929030d7fc7d5ece7b0ba18f Mon Sep 17 00:00:00 2001 From: G A ARJUN Date: Mon, 4 May 2026 10:16:43 +0530 Subject: [PATCH] completed fronted struct --- client/package-lock.json | 86 +++++++---- client/package.json | 3 +- client/src/App.css | 184 ------------------------ client/src/App.jsx | 113 +-------------- client/src/components/layout/Footer.jsx | 26 ++++ client/src/components/layout/Header.jsx | 50 +++++++ client/src/index.css | 111 -------------- client/src/main.jsx | 1 - client/src/pages/Dashboard.jsx | 0 client/src/pages/Home.jsx | 112 +++++++++++++++ client/src/pages/Login.jsx | 0 client/src/pages/Register.jsx | 0 12 files changed, 252 insertions(+), 434 deletions(-) delete mode 100644 client/src/App.css create mode 100644 client/src/components/layout/Footer.jsx create mode 100644 client/src/components/layout/Header.jsx delete mode 100644 client/src/index.css create mode 100644 client/src/pages/Dashboard.jsx create mode 100644 client/src/pages/Home.jsx create mode 100644 client/src/pages/Login.jsx create mode 100644 client/src/pages/Register.jsx diff --git a/client/package-lock.json b/client/package-lock.json index 65ba805..e508a96 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -9,7 +9,8 @@ "version": "0.0.0", "dependencies": { "react": "^19.2.5", - "react-dom": "^19.2.5" + "react-dom": "^19.2.5", + "react-router-dom": "^7.14.2" }, "devDependencies": { "@eslint/js": "^9.39.4", @@ -264,31 +265,6 @@ "node": ">=6.9.0" } }, - "node_modules/@emnapi/core": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.9.2.tgz", - "integrity": "sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@emnapi/wasi-threads": "1.2.1", - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/runtime": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.2.tgz", - "integrity": "sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@emnapi/wasi-threads": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", @@ -1150,6 +1126,19 @@ "dev": true, "license": "MIT" }, + "node_modules/cookie": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz", + "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -2263,6 +2252,7 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.5.tgz", "integrity": "sha512-J5bAZz+DXMMwW/wV3xzKke59Af6CHY7G4uYLN1OvBcKEsWOs4pQExj86BBKamxl/Ik5bx9whOrvBlSDfWzgSag==", "license": "MIT", + "peer": true, "dependencies": { "scheduler": "^0.27.0" }, @@ -2270,6 +2260,44 @@ "react": "^19.2.5" } }, + "node_modules/react-router": { + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.14.2.tgz", + "integrity": "sha512-yCqNne6I8IB6rVCH7XUvlBK7/QKyqypBFGv+8dj4QBFJiiRX+FG7/nkdAvGElyvVZ/HQP5N19wzteuTARXi5Gw==", + "license": "MIT", + "dependencies": { + "cookie": "^1.0.1", + "set-cookie-parser": "^2.6.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } + } + }, + "node_modules/react-router-dom": { + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.14.2.tgz", + "integrity": "sha512-YZcM5ES8jJSM+KrJ9BdvHHqlnGTg5tH3sC5ChFRj4inosKctdyzBDhOyyHdGk597q2OT6NTrCA1OvB/YDwfekQ==", + "license": "MIT", + "dependencies": { + "react-router": "7.14.2" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + } + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -2337,6 +2365,12 @@ "semver": "bin/semver.js" } }, + "node_modules/set-cookie-parser": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz", + "integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==", + "license": "MIT" + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", diff --git a/client/package.json b/client/package.json index a8a8a55..317eb70 100644 --- a/client/package.json +++ b/client/package.json @@ -11,7 +11,8 @@ }, "dependencies": { "react": "^19.2.5", - "react-dom": "^19.2.5" + "react-dom": "^19.2.5", + "react-router-dom": "^7.14.2" }, "devDependencies": { "@eslint/js": "^9.39.4", diff --git a/client/src/App.css b/client/src/App.css deleted file mode 100644 index f90339d..0000000 --- a/client/src/App.css +++ /dev/null @@ -1,184 +0,0 @@ -.counter { - font-size: 16px; - padding: 5px 10px; - border-radius: 5px; - color: var(--accent); - background: var(--accent-bg); - border: 2px solid transparent; - transition: border-color 0.3s; - margin-bottom: 24px; - - &:hover { - border-color: var(--accent-border); - } - &:focus-visible { - outline: 2px solid var(--accent); - outline-offset: 2px; - } -} - -.hero { - position: relative; - - .base, - .framework, - .vite { - inset-inline: 0; - margin: 0 auto; - } - - .base { - width: 170px; - position: relative; - z-index: 0; - } - - .framework, - .vite { - position: absolute; - } - - .framework { - z-index: 1; - top: 34px; - height: 28px; - transform: perspective(2000px) rotateZ(300deg) rotateX(44deg) rotateY(39deg) - scale(1.4); - } - - .vite { - z-index: 0; - top: 107px; - height: 26px; - width: auto; - transform: perspective(2000px) rotateZ(300deg) rotateX(40deg) rotateY(39deg) - scale(0.8); - } -} - -#center { - display: flex; - flex-direction: column; - gap: 25px; - place-content: center; - place-items: center; - flex-grow: 1; - - @media (max-width: 1024px) { - padding: 32px 20px 24px; - gap: 18px; - } -} - -#next-steps { - display: flex; - border-top: 1px solid var(--border); - text-align: left; - - & > div { - flex: 1 1 0; - padding: 32px; - @media (max-width: 1024px) { - padding: 24px 20px; - } - } - - .icon { - margin-bottom: 16px; - width: 22px; - height: 22px; - } - - @media (max-width: 1024px) { - flex-direction: column; - text-align: center; - } -} - -#docs { - border-right: 1px solid var(--border); - - @media (max-width: 1024px) { - border-right: none; - border-bottom: 1px solid var(--border); - } -} - -#next-steps ul { - list-style: none; - padding: 0; - display: flex; - gap: 8px; - margin: 32px 0 0; - - .logo { - height: 18px; - } - - a { - color: var(--text-h); - font-size: 16px; - border-radius: 6px; - background: var(--social-bg); - display: flex; - padding: 6px 12px; - align-items: center; - gap: 8px; - text-decoration: none; - transition: box-shadow 0.3s; - - &:hover { - box-shadow: var(--shadow); - } - .button-icon { - height: 18px; - width: 18px; - } - } - - @media (max-width: 1024px) { - margin-top: 20px; - flex-wrap: wrap; - justify-content: center; - - li { - flex: 1 1 calc(50% - 8px); - } - - a { - width: 100%; - justify-content: center; - box-sizing: border-box; - } - } -} - -#spacer { - height: 88px; - border-top: 1px solid var(--border); - @media (max-width: 1024px) { - height: 48px; - } -} - -.ticks { - position: relative; - width: 100%; - - &::before, - &::after { - content: ''; - position: absolute; - top: -4.5px; - border: 5px solid transparent; - } - - &::before { - left: 0; - border-left-color: var(--border); - } - &::after { - right: 0; - border-right-color: var(--border); - } -} diff --git a/client/src/App.jsx b/client/src/App.jsx index b2bf2e8..fc6d440 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -1,119 +1,10 @@ -import { useState } from 'react' -import reactLogo from './assets/react.svg' -import viteLogo from './assets/vite.svg' -import heroImg from './assets/hero.png' -import './App.css' +import Header from './components/layout/Header' function App() { - const [count, setCount] = useState(0) return ( <> -
-
- - React logo - Vite logo -
-
-

Get started

-

- Edit src/App.jsx and save to test HMR -

-
- -
- -
- -
-
- -

Documentation

-

Your questions, answered

- -
-
- -

Connect with us

-

Join the Vite community

- -
-
- -
-
+
) } diff --git a/client/src/components/layout/Footer.jsx b/client/src/components/layout/Footer.jsx new file mode 100644 index 0000000..26cb1b8 --- /dev/null +++ b/client/src/components/layout/Footer.jsx @@ -0,0 +1,26 @@ +const Footer = () => { + return ( +
+
+

© 2024 OntheWay. All rights reserved.

+

Built by G A Arjun

+
+
+ ); +}; + +const footerStyle = { + backgroundColor: '#333', + color: 'white', + padding: '2rem 0', + marginTop: 'auto', + textAlign: 'center', +}; + +const containerStyle = { + maxWidth: '1200px', + margin: '0 auto', + padding: '0 2rem', +}; + +export default Footer; \ No newline at end of file diff --git a/client/src/components/layout/Header.jsx b/client/src/components/layout/Header.jsx new file mode 100644 index 0000000..c4c273f --- /dev/null +++ b/client/src/components/layout/Header.jsx @@ -0,0 +1,50 @@ +import { Link } from 'react-router-dom' + +function Header(){ + return ( +
+
+

OntheWay

+ +
+
+ ) +} + +const headerStyle = { + backgroundColor: '#333', + color: 'white', + padding: '1rem 0', +}; + +const containerStyle = { + maxWidth: '1200px', + margin: '0 auto', + padding: '0 2rem', + display: 'flex', + justifyContent: 'space-between', + alignItems: 'center', +}; + +const logoStyle = { + margin: 0, + fontSize: '1.5rem', +}; + +const linkStyle = { + color: 'white', + textDecoration: 'none', +}; + +const navLinkStyle = { + color: 'white', + textDecoration: 'none', + marginLeft: '2rem', +}; + + +export default Header diff --git a/client/src/index.css b/client/src/index.css deleted file mode 100644 index 2c84af0..0000000 --- a/client/src/index.css +++ /dev/null @@ -1,111 +0,0 @@ -:root { - --text: #6b6375; - --text-h: #08060d; - --bg: #fff; - --border: #e5e4e7; - --code-bg: #f4f3ec; - --accent: #aa3bff; - --accent-bg: rgba(170, 59, 255, 0.1); - --accent-border: rgba(170, 59, 255, 0.5); - --social-bg: rgba(244, 243, 236, 0.5); - --shadow: - rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px; - - --sans: system-ui, 'Segoe UI', Roboto, sans-serif; - --heading: system-ui, 'Segoe UI', Roboto, sans-serif; - --mono: ui-monospace, Consolas, monospace; - - font: 18px/145% var(--sans); - letter-spacing: 0.18px; - color-scheme: light dark; - color: var(--text); - background: var(--bg); - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - - @media (max-width: 1024px) { - font-size: 16px; - } -} - -@media (prefers-color-scheme: dark) { - :root { - --text: #9ca3af; - --text-h: #f3f4f6; - --bg: #16171d; - --border: #2e303a; - --code-bg: #1f2028; - --accent: #c084fc; - --accent-bg: rgba(192, 132, 252, 0.15); - --accent-border: rgba(192, 132, 252, 0.5); - --social-bg: rgba(47, 48, 58, 0.5); - --shadow: - rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px; - } - - #social .button-icon { - filter: invert(1) brightness(2); - } -} - -body { - margin: 0; -} - -#root { - width: 1126px; - max-width: 100%; - margin: 0 auto; - text-align: center; - border-inline: 1px solid var(--border); - min-height: 100svh; - display: flex; - flex-direction: column; - box-sizing: border-box; -} - -h1, -h2 { - font-family: var(--heading); - font-weight: 500; - color: var(--text-h); -} - -h1 { - font-size: 56px; - letter-spacing: -1.68px; - margin: 32px 0; - @media (max-width: 1024px) { - font-size: 36px; - margin: 20px 0; - } -} -h2 { - font-size: 24px; - line-height: 118%; - letter-spacing: -0.24px; - margin: 0 0 8px; - @media (max-width: 1024px) { - font-size: 20px; - } -} -p { - margin: 0; -} - -code, -.counter { - font-family: var(--mono); - display: inline-flex; - border-radius: 4px; - color: var(--text-h); -} - -code { - font-size: 15px; - line-height: 135%; - padding: 4px 8px; - background: var(--code-bg); -} diff --git a/client/src/main.jsx b/client/src/main.jsx index b9a1a6d..3d9da8a 100644 --- a/client/src/main.jsx +++ b/client/src/main.jsx @@ -1,6 +1,5 @@ import { StrictMode } from 'react' import { createRoot } from 'react-dom/client' -import './index.css' import App from './App.jsx' createRoot(document.getElementById('root')).render( diff --git a/client/src/pages/Dashboard.jsx b/client/src/pages/Dashboard.jsx new file mode 100644 index 0000000..e69de29 diff --git a/client/src/pages/Home.jsx b/client/src/pages/Home.jsx new file mode 100644 index 0000000..c7f3699 --- /dev/null +++ b/client/src/pages/Home.jsx @@ -0,0 +1,112 @@ +import { Link } from 'react-router-dom'; + +const Home = () => { + return ( +
+
+

{/* Platform Name/Tagline */}

+

+ {/* Brief description of what your platform does */} +

+
+ + Get Started + + + Login + +
+
+ + {/* Features Section (Optional) */} +
+

Why Choose OntheWay?

+
+ {/* Add 3 feature cards based on your theme */} +
+

Feature 1

+

Description

+
+
+

Feature 2

+

Description

+
+
+

Feature 3

+

Description

+
+
+
+
+ ); +}; + +const containerStyle = { + minHeight: '100vh', +}; + +const heroStyle = { + textAlign: 'center', + padding: '4rem 2rem', + backgroundColor: '#f5f5f5', +}; + +const titleStyle = { + fontSize: '3rem', + marginBottom: '1rem', + color: '#333', +}; + +const subtitleStyle = { + fontSize: '1.25rem', + color: '#666', + marginBottom: '2rem', +}; + +const ctaStyle = { + display: 'flex', + gap: '1rem', + justifyContent: 'center', +}; + +const buttonStyle = { + backgroundColor: '#007bff', + color: 'white', + padding: '0.75rem 2rem', + borderRadius: '5px', + textDecoration: 'none', + fontWeight: 'bold', +}; + +const secondaryButtonStyle = { + backgroundColor: 'white', + color: '#007bff', + padding: '0.75rem 2rem', + borderRadius: '5px', + textDecoration: 'none', + fontWeight: 'bold', + border: '2px solid #007bff', +}; + +const featuresStyle = { + padding: '4rem 2rem', + textAlign: 'center', +}; + +const featureGridStyle = { + display: 'grid', + gridTemplateColumns: 'repeat(auto-fit, minmax(250px, 1fr))', + gap: '2rem', + marginTop: '2rem', + maxWidth: '1200px', + margin: '2rem auto', +}; + +const featureCardStyle = { + padding: '2rem', + backgroundColor: 'white', + borderRadius: '8px', + boxShadow: '0 2px 4px rgba(0,0,0,0.1)', +}; + +export default Home; \ No newline at end of file diff --git a/client/src/pages/Login.jsx b/client/src/pages/Login.jsx new file mode 100644 index 0000000..e69de29 diff --git a/client/src/pages/Register.jsx b/client/src/pages/Register.jsx new file mode 100644 index 0000000..e69de29