Skip to content

Commit

Permalink
Basic version for landing, search, favourites pages
Browse files Browse the repository at this point in the history
  • Loading branch information
seadeep42 committed Dec 4, 2023
1 parent 6f157cb commit e42f0bb
Show file tree
Hide file tree
Showing 24 changed files with 1,018 additions and 158 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ node_modules
dist
dist-ssr
*.local
.env

# Editor directories and files
.vscode/*
Expand Down
24 changes: 23 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,29 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
<title>BLR Public transport app</title>


<link
rel="preconnect"
crossorigin="anonymous"
href="https://fonts.googleapis.com"
/>
<link
rel="preconnect"
crossorigin="anonymous"
href="https://fonts.gstatic.com"
/>
<link
crossorigin="anonymous"
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;700&display=swap"
rel="stylesheet"
/>

<link
href="https://api.mapbox.com/mapbox-gl-js/v2.10.0/mapbox-gl.css"
rel="stylesheet"
/>
</head>
<body>
<div id="root"></div>
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"start": "vite",
"start": "vite --port 3000",
"dev": "vite",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"mapbox-gl": "^2.15.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"react-router-dom": "^6.19.0",
"sass": "^1.69.5"
},
"devDependencies": {
"@iconify/react": "^4.1.1",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@vitejs/plugin-react": "^4.2.0",
Expand Down
42 changes: 0 additions & 42 deletions src/App.css

This file was deleted.

35 changes: 0 additions & 35 deletions src/App.jsx

This file was deleted.

10 changes: 10 additions & 0 deletions src/about/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from "react";


const AboutPage = () => {
return (
<div>About page</div>
);
};

export default AboutPage;
10 changes: 10 additions & 0 deletions src/all-buses/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from "react";


const AllBusesPage = () => {
return (
<div>All buses page</div>
);
};

export default AllBusesPage;
10 changes: 10 additions & 0 deletions src/assets/icon_bus_number.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/icon_bus_stop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icon_location.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/icon_metro_green.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/icon_metro_purple.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/assets/react.svg

This file was deleted.

57 changes: 57 additions & 0 deletions src/favourites/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import React from "react";
import {Icon} from "@iconify/react/dist/iconify.js";
import SearchResultItem from "../search/search_result_item";
import {ROUTES, SEARCH_RESULT_TYPES} from "../utils/constants.js";
import {Link} from "react-router-dom";

const FAVOURITES = [
{
type: SEARCH_RESULT_TYPES.location,
text: "Mayur Paradise",
favourite: true,
},
{
type: SEARCH_RESULT_TYPES.bus_stop,
text: "Tippasandra Market Bus Stop",
favourite: true,
},
{
type: SEARCH_RESULT_TYPES.metro_station_purple,
text: "Nadaprabhu Kempegowda Metro Station, Majestic",
favourite: true,
},
{
type: SEARCH_RESULT_TYPES.bus_number,
text: "314",
favourite: true,
},
{
type: SEARCH_RESULT_TYPES.bus_number,
text: "333G",
favourite: true,
},
];

const FavouritesPage = () => {
return (
<>
<div id="page-header">
<Link id="header-back" to={ROUTES.home}>
<Icon icon="mdi:arrow-back" color="#FFFFFF" width="24" height="24" />
</Link>
<p id="header-text" className="center">
<span>
Favourites
</span>
</p>
</div>
<div id="search-results">
{
FAVOURITES.map(i => <SearchResultItem key={i.text} info={i} />)
}
</div>
</>
);
};

export default FavouritesPage;
68 changes: 0 additions & 68 deletions src/index.css

This file was deleted.

Loading

0 comments on commit e42f0bb

Please sign in to comment.