Skip to content

Commit

Permalink
chore:homepage is set
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeya-rosini committed Jan 29, 2024
1 parent d85d577 commit e9571a1
Show file tree
Hide file tree
Showing 13 changed files with 118 additions and 59 deletions.
21 changes: 0 additions & 21 deletions react-js/src/App.jsx

This file was deleted.

File renamed without changes.
Binary file added react-js/src/assets/image/trekking.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added react-js/src/assets/image/trekking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added react-js/src/assets/image/wander-background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 16 additions & 10 deletions react-js/src/components/TheFooter.jsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
import { Link } from "react-router-dom"
import HomePage from "../pages/HomePage"
import AboutPage from "../pages/AboutPage"
import DestinationPage from "../pages/DestinationPage"
import ContactPage from "../pages/ContactPage"

const footer = () => {
return <div className="bg-black text-white p-4">
return <div className="bg-black text-white p-4 mt-10">
<div className="flex justify-between items-center space-x-6">
<div className="flex flex-col space-y-6 items-center">
<div class="flex justify-between items-center space-x-1">
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" className="fill-white"><path d="M19.3 16.9c.4-.7.7-1.5.7-2.4c0-2.5-2-4.5-4.5-4.5S11 12 11 14.5s2 4.5 4.5 4.5c.9 0 1.7-.3 2.4-.7l3.2 3.2l1.4-1.4zm-3.8.1c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5s2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5M12 20v2C6.48 22 2 17.52 2 12S6.48 2 12 2c4.84 0 8.87 3.44 9.8 8h-2.07A8 8 0 0 0 15 4.59V5c0 1.1-.9 2-2 2h-2v2c0 .55-.45 1-1 1H8v2h2v3H9l-4.79-4.79C4.08 10.79 4 11.38 4 12c0 4.41 3.59 8 8 8"/></svg>
<h3 class="text-white font-bold text-2xl">Wander<span className="text-[#FFD369]">Lust</span></h3>
<h3 class="text-white font-bold text-2xl font-cabin tracking-widest">Wander<span className="text-[#FFD369]">Lust</span></h3>
</div>
<div className="flex justify-center items-center space-x-2">
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 16 16" className="fill-white"><path d="M8 5.67C6.71 5.67 5.67 6.72 5.67 8S6.72 10.33 8 10.33S10.33 9.28 10.33 8S9.28 5.67 8 5.67M15 8c0-.97 0-1.92-.05-2.89c-.05-1.12-.31-2.12-1.13-2.93c-.82-.82-1.81-1.08-2.93-1.13C9.92 1 8.97 1 8 1s-1.92 0-2.89.05c-1.12.05-2.12.31-2.93 1.13C1.36 3 1.1 3.99 1.05 5.11C1 6.08 1 7.03 1 8s0 1.92.05 2.89c.05 1.12.31 2.12 1.13 2.93c.82.82 1.81 1.08 2.93 1.13C6.08 15 7.03 15 8 15s1.92 0 2.89-.05c1.12-.05 2.12-.31 2.93-1.13c.82-.82 1.08-1.81 1.13-2.93c.06-.96.05-1.92.05-2.89m-7 3.59c-1.99 0-3.59-1.6-3.59-3.59S6.01 4.41 8 4.41s3.59 1.6 3.59 3.59s-1.6 3.59-3.59 3.59m3.74-6.49c-.46 0-.84-.37-.84-.84s.37-.84.84-.84s.84.37.84.84a.8.8 0 0 1-.24.59a.8.8 0 0 1-.59.24Z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" className="fill-white"><path fill-rule="evenodd" d="M12 2c-2.4 0-4.7.9-6.5 2.4a10.5 10.5 0 0 0-2 13.1A10 10 0 0 0 8.7 22c.5 0 .7-.2.7-.5v-2c-2.8.7-3.4-1.1-3.4-1.1c-.1-.6-.5-1.2-1-1.5c-1-.7 0-.7 0-.7a2 2 0 0 1 1.5 1.1a2.2 2.2 0 0 0 1.3 1a2 2 0 0 0 1.6-.1c0-.6.3-1 .7-1.4c-2.2-.3-4.6-1.2-4.6-5c0-1.1.4-2 1-2.8a4 4 0 0 1 .2-2.7s.8-.3 2.7 1c1.6-.5 3.4-.5 5 0c2-1.3 2.8-1 2.8-1c.3.8.4 1.8 0 2.7a4 4 0 0 1 1 2.7c0 4-2.3 4.8-4.5 5a2.5 2.5 0 0 1 .7 2v2.8c0 .3.2.6.7.5a10 10 0 0 0 5.4-4.4a10.5 10.5 0 0 0-2.1-13.2A9.8 9.8 0 0 0 12 2" clip-rule="evenodd"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 20 20" className="fill-white"><path d="M10 .4C4.698.4.4 4.698.4 10s4.298 9.6 9.6 9.6s9.6-4.298 9.6-9.6S15.302.4 10 .4M7.65 13.979H5.706V7.723H7.65zm-.984-7.024c-.614 0-1.011-.435-1.011-.973c0-.549.409-.971 1.036-.971s1.011.422 1.023.971c0 .538-.396.973-1.048.973m8.084 7.024h-1.944v-3.467c0-.807-.282-1.355-.985-1.355c-.537 0-.856.371-.997.728c-.052.127-.065.307-.065.486v3.607H8.814v-4.26c0-.781-.025-1.434-.051-1.996h1.689l.089.869h.039c.256-.408.883-1.01 1.932-1.01c1.279 0 2.238.857 2.238 2.699z"/></svg>
</div>
</div>
<div class="grid grid-cols-2 gap-2 text-md">
<div class="grid grid-cols-2 gap-y-10 text-md font-cabin tracking-wider p-4">
<div className="list-none">
<li>Home</li>
<li>About</li>
<li>Booking</li>
<li>Destination</li>
<li><span><Link to={'/'}>Home</Link></span></li>
<li> <span><Link to={'/about'}>About</Link></span></li>
<li> <span><Link to={'/destination'}>Destination</Link></span></li>
<li> <span><Link to={'/contact'}>Contact</Link></span></li>
</div>
<div className="list-none">
<li>Privacy Policy</li>
<li>Terms and Conditions</li>
<li><Link to="/">Privacy Policy</Link></li>
<li><Link to='/'>Terms and Conditions</Link></li>
</div>
</div>
</div>
<div className="flex items-center justify-center mt-10 p-2 font-bold">
<div className="flex items-center justify-center mt-10 p-2 font-cabin font-bold tracking-wider">
<span className="flex items-center gap-x-1">copyright<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10" /><path d="M14.83 14.83a4 4 0 1 1 0-5.66" /></g></svg></span>
<p>, 2024<span className="italic text-[#FFD369]"> Jeya Rosini .H</span> , All rights reserved</p>
</div>
Expand Down
11 changes: 6 additions & 5 deletions react-js/src/components/TheNavbar.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Link } from "react-router-dom"
import HomePage from "../pages/HomePage"
import AboutPage from "../pages/AboutPage"
import DestinationPage from "../pages/DestinationPage"
Expand All @@ -9,11 +10,11 @@ const TheNavbar = () => {
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" className="fill-white"><path d="M19.3 16.9c.4-.7.7-1.5.7-2.4c0-2.5-2-4.5-4.5-4.5S11 12 11 14.5s2 4.5 4.5 4.5c.9 0 1.7-.3 2.4-.7l3.2 3.2l1.4-1.4zm-3.8.1c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5s2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5M12 20v2C6.48 22 2 17.52 2 12S6.48 2 12 2c4.84 0 8.87 3.44 9.8 8h-2.07A8 8 0 0 0 15 4.59V5c0 1.1-.9 2-2 2h-2v2c0 .55-.45 1-1 1H8v2h2v3H9l-4.79-4.79C4.08 10.79 4 11.38 4 12c0 4.41 3.59 8 8 8"/></svg>
<h3 class="text-white text-4xl font-extrabold font-cabin tracking-widest">Wander<span className="text-[#FFD369]">Lust</span></h3>
</div>
<div className="flex justify-center items-center space-x-8 text-lg">
<HomePage />
<AboutPage />
<DestinationPage />
<ContactPage/>
<div className="flex justify-center items-center space-x-8 text-lg font-cabin tracking-wider">
<span><Link to={'/'}>Home</Link></span>
<span><Link to={'/about'}>About</Link></span>
<span><Link to={'/destination'}>Destination</Link></span>
<span><Link to={'/contact'}>Contact</Link></span>
</div>
</div>
}
Expand Down
20 changes: 20 additions & 0 deletions react-js/src/layouts/guest.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import TheNavbar from "../components/TheNavbar";
import TheFooter from "../components/TheFooter"
import { Outlet } from "react-router-dom";

const GuestLayout = () => {
return (
<>

<TheNavbar/>

<Outlet />
<div>
<TheFooter />
</div>
</>

);
}

export default GuestLayout
49 changes: 29 additions & 20 deletions react-js/src/main.jsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,42 @@
import React from "react";
import { createRoot } from "react-dom/client";
import "./index.css";
import "../src/assets/css/index.css";
import GuestLayout from "./layouts/guest";
import { RouterProvider, createBrowserRouter } from "react-router-dom";
import HomePage from "./pages/HomePage";
import AboutPage from "./pages/AboutPage";
import DestinationPage from "./pages/DestinationPage";
import ContactPage from "./pages/ContactPage";
import App from "./App"
import { Route, createBrowserRouter } from "react-router-dom";
import ErrorPage from "./pages/ErrorPage";

const routers = createBrowserRouter([
Route({
const router = createBrowserRouter([
{
path: '/',
element: <HomePage />,
}),
Route({
path: '/',
element: <AboutPage />,
}),
Route({
path: '/',
element: <DestinationPage />,
}),
Route({
path: '/',
element: <ContactPage/>,
}),
element: <GuestLayout />,
children: [
{
path: '/',
element:<HomePage/>,
},
{
path: '/about',
element: <AboutPage />,
},
{
path: '/destination',
element: <DestinationPage />,
},
{
path: '/contact',
element: <ContactPage/>,
},
],
errorElement:<ErrorPage/>
},

]);


const rootId = document.getElementById("root");
const root = createRoot(rootId);
root.render(<App/>);
root.render(<RouterProvider router = {router}/>);
2 changes: 1 addition & 1 deletion react-js/src/pages/ContactPage.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const ContactPage = () => {
return <h1 className="font-bold">Booking</h1>
return <h1 className="font-bold">Contact</h1>
}

export default ContactPage
5 changes: 4 additions & 1 deletion react-js/src/pages/DestinationPage.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

const DestinationPage = () => {
return <h1 className="font-bold">Destination</h1>
return <div>
<h4>Your Destination is here</h4>
</div>
}

export default DestinationPage
21 changes: 21 additions & 0 deletions react-js/src/pages/ErrorPage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Link, useRouteError } from "react-router-dom";

const ErrorPage = () => {
const {data, status, statusText} = useRouteError();
return (
<div>
<div className="bg-[#393E46] max-w-2xl mx-auto rounded font-cabin tracking-wider mt-10 p-10">
<div className="flex items-center space-x-4 text-white italics">
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 16 16" className="fill-red-600"><path fill-rule="evenodd" d="M8 14.5a6.5 6.5 0 1 0 0-13a6.5 6.5 0 0 0 0 13M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m1-5a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-.25-6.25a.75.75 0 0 0-1.5 0v3.5a.75.75 0 0 0 1.5 0z" clip-rule="evenodd" /></svg>
<span className="text-4xl">{status} {statusText}</span>
</div>
<div className="text-white text-lg font-cabin font-bold p-8">
<p>{data}</p>
</div>
<Link to='/' className="underline underline-offset-4 font-cabin tracking-wider text-lg text-[#FFD369] hover:cursor-pointer hover:text-white">Go Home</Link>
</div>
</div>
);
};

export default ErrorPage
22 changes: 21 additions & 1 deletion react-js/src/pages/HomePage.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
const HomePage = () => {
return <h1 className="font-bold">Home</h1>
return <div>
<div>
<div>
<img src="../src/assets/image/wander-background.jpg" alt="wander image" className="h-60 w-full object-cover"></img>
</div>
<div className="m-4 p-2 text-center font-cabin tracking-wider">
<h5 className="font-bold text-4xl">Why <span className="text-[#FFD369]">Wander ?</span></h5>
<p className="first-letter:text-3xl text-xl p-2">Wandering, walking, trekking - helps to make better conclusion, give new ideas and insightfulness. Making your body and mind feel fresh and healthy. Prevent from Heart Disease. Strengthen relationships </p>
</div>
<div className="m-4">
<h5 className="font-bold font-cabin tracking-wider text-4xl text-center">Why <span className="text-[#ffd369]">WanderLust ?</span></h5>
<div className="flex justify-center items-center space-x-4">
<div><img src="../src/assets/image/trekking.png" alt="trekking" className="w-80 h-32 object-contain"></img></div>
<div>
<p className="font-cabin tracking-wider text-xl text-left">WanderLust gives the exploring options of your choice. Description of each and every place with map locations attached.
WanderLust guided you with expertise in all fields of travelling</p>
</div>
</div>
</div>
</div>
</div>
}
export default HomePage

0 comments on commit e9571a1

Please sign in to comment.