From 1afaa3d2586074da238df5b35f93479b89e8025c Mon Sep 17 00:00:00 2001 From: Tyler Du <35591950+Vicguin65@users.noreply.github.com> Date: Fri, 15 Mar 2024 16:47:19 -0400 Subject: [PATCH 01/14] reformat code --- .../components/CustomNavBar.component.js | 50 +++++++++++-------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/Website/webb/src/common/components/CustomNavBar.component.js b/Website/webb/src/common/components/CustomNavBar.component.js index e35f45e..ffc9d94 100644 --- a/Website/webb/src/common/components/CustomNavBar.component.js +++ b/Website/webb/src/common/components/CustomNavBar.component.js @@ -1,31 +1,41 @@ -import React from 'react'; -import { Navbar, Nav, Container } from 'react-bootstrap'; -import { NavLink } from 'react-router-dom'; -import CONFIG from '../../config.json' +import React from "react"; +import { Navbar, Nav, Container } from "react-bootstrap"; +import { NavLink } from "react-router-dom"; +import CONFIG from "../../config.json"; -import styles from './NavBar.module.css'; +import styles from "./NavBar.module.css"; function CustomNavBar() { return ( - Accessible Routes - Accessible Routes logo - - + + Accessible Routes + + Accessible Routes logo + ); } -export default CustomNavBar; \ No newline at end of file +export default CustomNavBar; From d9c2af7aadda2b75e2adb07c7f4fe46dd71ca405 Mon Sep 17 00:00:00 2001 From: Tyler Du <35591950+Vicguin65@users.noreply.github.com> Date: Fri, 15 Mar 2024 17:19:10 -0400 Subject: [PATCH 02/14] more reformatting of code --- .../src/common/components/NavBar.module.css | 50 +++++++++++-------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/Website/webb/src/common/components/NavBar.module.css b/Website/webb/src/common/components/NavBar.module.css index 7e14466..fe4c3f6 100644 --- a/Website/webb/src/common/components/NavBar.module.css +++ b/Website/webb/src/common/components/NavBar.module.css @@ -1,34 +1,40 @@ /* NavBar.module.css */ -@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap'); +@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap"); .navbar { - font-family: 'Roboto', sans-serif; - text-align: center; - align-items: center; - margin-bottom: 0px; - border:2px solid #2397e9; - border-radius: 0%; + font-family: "Roboto", sans-serif; + text-align: center; + align-items: center; + margin-bottom: 0px; + border: 2px solid #2397e9; + border-radius: 0%; +} + +.navbar-toggler { + border: #ff0000; + background-image: url("https://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/Hamburger_icon.svg/2048px-Hamburger_icon.svg.png"); } .navLink { - color: #3f3b3b; - font-weight: 300; - padding-left: 1.5rem; - padding-right: 1.5rem; - transition: color 0.3s, background-color 0.3s; - text-decoration: none; - border-radius: 5px; - margin-left: 5px; - margin-right: 5px; + color: #3f3b3b; + font-weight: 300; + padding-left: 1.5rem; + padding-right: 1.5rem; + transition: color 0.3s, background-color 0.3s; + text-decoration: none; + border-radius: 5px; + margin-left: 5px; + margin-right: 5px; } .navLink:hover { - background-color: #aeccf1; + background-color: #aeccf1; } .navbarContainer { - display: flex; - justify-content: center; - align-items: center; - justify-content: flex-start; -} \ No newline at end of file + display: flex; + justify-content: center; + align-items: center; + justify-content: flex-start; + flex-direction: column; +} From e136e7db29777accb018337c5a3a127400979416 Mon Sep 17 00:00:00 2001 From: Tyler Du <35591950+Vicguin65@users.noreply.github.com> Date: Fri, 15 Mar 2024 17:19:23 -0400 Subject: [PATCH 03/14] prototype of collapsing Navbar --- .../components/CustomNavBar.component.js | 52 ++++++++++--------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/Website/webb/src/common/components/CustomNavBar.component.js b/Website/webb/src/common/components/CustomNavBar.component.js index ffc9d94..e31a1c7 100644 --- a/Website/webb/src/common/components/CustomNavBar.component.js +++ b/Website/webb/src/common/components/CustomNavBar.component.js @@ -9,30 +9,34 @@ function CustomNavBar() { return ( - - Accessible Routes - - Accessible Routes logo - + + + + Accessible Routes + + Accessible Routes logo + + + Toggle ); From 3c7e0307122ae38686c7e846c7a32a6148d920c4 Mon Sep 17 00:00:00 2001 From: Tyler Du <35591950+Vicguin65@users.noreply.github.com> Date: Fri, 22 Mar 2024 17:27:25 -0400 Subject: [PATCH 04/14] initial sidebar prototype --- Website/webb/src/App.js | 1 - .../components/CustomNavBar.component.js | 73 +++++++++++-------- .../components/CustomSideBar/CustomSideBar.js | 26 +++++++ .../components/CustomSideBar/styles.css | 33 +++++++++ Website/webb/src/pages/HomePage.js | 11 ++- Website/webb/src/pages/page.css | 11 ++- 6 files changed, 117 insertions(+), 38 deletions(-) create mode 100644 Website/webb/src/common/components/CustomSideBar/CustomSideBar.js create mode 100644 Website/webb/src/common/components/CustomSideBar/styles.css diff --git a/Website/webb/src/App.js b/Website/webb/src/App.js index f8057f6..1e9ca36 100644 --- a/Website/webb/src/App.js +++ b/Website/webb/src/App.js @@ -9,7 +9,6 @@ import About from "./pages/about.js"; function App() { return ( - } /> } /> diff --git a/Website/webb/src/common/components/CustomNavBar.component.js b/Website/webb/src/common/components/CustomNavBar.component.js index e31a1c7..43d6566 100644 --- a/Website/webb/src/common/components/CustomNavBar.component.js +++ b/Website/webb/src/common/components/CustomNavBar.component.js @@ -1,44 +1,55 @@ import React from "react"; +import { useState } from "react"; import { Navbar, Nav, Container } from "react-bootstrap"; import { NavLink } from "react-router-dom"; import CONFIG from "../../config.json"; import styles from "./NavBar.module.css"; +import { Header, SideBar } from "./CustomSideBar/CustomSideBar"; + function CustomNavBar() { + const [sidebarOpen, setSideBarOpen] = useState(false); + const handleViewSidebar = () => { + setSideBarOpen(!sidebarOpen); + }; + return ( - - + <> + + + // + // - - - Accessible Routes - - Accessible Routes logo - - - Toggle - - + // + // + // Accessible Routes + // + // Accessible Routes logo + // + // + // Toggle + // + // ); } diff --git a/Website/webb/src/common/components/CustomSideBar/CustomSideBar.js b/Website/webb/src/common/components/CustomSideBar/CustomSideBar.js new file mode 100644 index 0000000..3efb61b --- /dev/null +++ b/Website/webb/src/common/components/CustomSideBar/CustomSideBar.js @@ -0,0 +1,26 @@ +import React from "react"; +import "./styles.css"; + +const SideBar = props => { + const sidebarClass = props.isOpen ? "sidebar open" : "sidebar"; + return ( +
+
I slide into view
+
Me Too!
+
Me Three!
+ +
+ ); +}; + +const Header = props => { + return ( +
+ +
+ ); + }; + +export {Header, SideBar}; \ No newline at end of file diff --git a/Website/webb/src/common/components/CustomSideBar/styles.css b/Website/webb/src/common/components/CustomSideBar/styles.css new file mode 100644 index 0000000..7a230f3 --- /dev/null +++ b/Website/webb/src/common/components/CustomSideBar/styles.css @@ -0,0 +1,33 @@ +.sidebar { + position: absolute; + left: -15vw; + height: 100%; + width: 15vw; + transition: left 0.3s ease-in-out; + background-color: lightgray; + display: flex; +} +.sidebar-toggle { + position: absolute; + top: 20%; + right: -60px; + height: 60px; + width: 60px; + z-index: 1; +} +.content { + position: relative; + top: 60px; + left: 0; + right: 0; + height: 100%; + transition: left 0.3s ease-in-out; + background-color: lightgray; + z-index: -4; +} +.sidebar.open { + left: 0; +} +.content.open { + left: 15vw; +} diff --git a/Website/webb/src/pages/HomePage.js b/Website/webb/src/pages/HomePage.js index 6dd511f..1bb0141 100644 --- a/Website/webb/src/pages/HomePage.js +++ b/Website/webb/src/pages/HomePage.js @@ -9,6 +9,8 @@ import Map from '../common/components/Map'; import RouteStatusPanel from '../common/components/RouteStatusPanel.component'; import CONFIG from '../config.json' +import { Navbar } from 'react-bootstrap'; +import CustomNavBar from '../common/components/CustomNavBar.component'; const HomePage = () => { // STATES @@ -81,8 +83,11 @@ const HomePage = () => { // RENDERING return ( -
+
+ + { setSelectedBuilding={setDestinationBuilding} />
+
); } diff --git a/Website/webb/src/pages/page.css b/Website/webb/src/pages/page.css index 07fd999..afa86be 100644 --- a/Website/webb/src/pages/page.css +++ b/Website/webb/src/pages/page.css @@ -9,16 +9,21 @@ color: white; } +.CustomBar { + width: 90%; + position: relative; + right: 50%; +} .Page { - display: flex; + display: flex; + flex-direction: row-reverse; } .MyMap { position: static; } - .search-building-panel { width: 30%; border: 2px solid #c6c6c6; @@ -28,4 +33,4 @@ align-items: center; flex-direction: column; gap: 1rem; -} \ No newline at end of file +} From f23803e1dee01eee9a440bcac4b496e238af1742 Mon Sep 17 00:00:00 2001 From: Tyler Du <35591950+Vicguin65@users.noreply.github.com> Date: Fri, 22 Mar 2024 17:34:45 -0400 Subject: [PATCH 05/14] added div sidebar --- Website/webb/src/pages/HomePage.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Website/webb/src/pages/HomePage.js b/Website/webb/src/pages/HomePage.js index 1bb0141..491bb24 100644 --- a/Website/webb/src/pages/HomePage.js +++ b/Website/webb/src/pages/HomePage.js @@ -84,7 +84,10 @@ const HomePage = () => { // RENDERING return (
- +
+ +
+ Date: Fri, 22 Mar 2024 17:39:41 -0400 Subject: [PATCH 06/14] moved the search panel to the top --- Website/webb/src/pages/page.css | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/Website/webb/src/pages/page.css b/Website/webb/src/pages/page.css index afa86be..c952945 100644 --- a/Website/webb/src/pages/page.css +++ b/Website/webb/src/pages/page.css @@ -9,28 +9,25 @@ color: white; } -.CustomBar { - width: 90%; - position: relative; - right: 50%; -} .Page { - display: flex; - flex-direction: row-reverse; + display: flex; + flex-direction: column-reverse; } .MyMap { position: static; } + .search-building-panel { - width: 30%; + width: 100%; + border: 2px solid #c6c6c6; border-bottom-left-radius: 80px 80px; display: flex; - justify-content: flex-start; + justify-content: center; align-items: center; - flex-direction: column; - gap: 1rem; -} + flex-direction: row; + gap: 2rem; +} \ No newline at end of file From 46f905958233597d27ee6ae323a50ad57d4e0c3c Mon Sep 17 00:00:00 2001 From: Tyler Du <35591950+Vicguin65@users.noreply.github.com> Date: Fri, 29 Mar 2024 17:30:53 -0400 Subject: [PATCH 07/14] some fixing of styling --- .../components/CustomNavBar.component.js | 69 ++++++++++--------- .../components/CustomSideBar/CustomSideBar.js | 8 +-- Website/webb/src/common/components/Map.js | 3 +- .../src/common/components/NavBar.module.css | 1 - Website/webb/src/pages/HomePage.js | 40 +++++++---- Website/webb/src/pages/page.css | 18 +++-- 6 files changed, 78 insertions(+), 61 deletions(-) diff --git a/Website/webb/src/common/components/CustomNavBar.component.js b/Website/webb/src/common/components/CustomNavBar.component.js index 43d6566..ea9ebd1 100644 --- a/Website/webb/src/common/components/CustomNavBar.component.js +++ b/Website/webb/src/common/components/CustomNavBar.component.js @@ -15,41 +15,42 @@ function CustomNavBar() { }; return ( - <> - - - // - // + // <> + //
HEY OVE RHERE
+ // + // + + - // - // - // Accessible Routes - // - // Accessible Routes logo - // - // - // Toggle - // - // + + + Accessible Routes + + Accessible Routes logo + + + Toggle +
+
); } diff --git a/Website/webb/src/common/components/CustomSideBar/CustomSideBar.js b/Website/webb/src/common/components/CustomSideBar/CustomSideBar.js index 3efb61b..3337a69 100644 --- a/Website/webb/src/common/components/CustomSideBar/CustomSideBar.js +++ b/Website/webb/src/common/components/CustomSideBar/CustomSideBar.js @@ -1,13 +1,13 @@ import React from "react"; import "./styles.css"; +import { Link } from "react-router-dom"; const SideBar = props => { const sidebarClass = props.isOpen ? "sidebar open" : "sidebar"; return ( -
-
I slide into view
-
Me Too!
-
Me Three!
+
+ About + diff --git a/Website/webb/src/common/components/Map.js b/Website/webb/src/common/components/Map.js index 8dd014c..9f52968 100644 --- a/Website/webb/src/common/components/Map.js +++ b/Website/webb/src/common/components/Map.js @@ -16,10 +16,11 @@ const Map = ({ buildingLocations, routeCordList, stairCordList, displayStairCord } return ( - + {/* Draw buildings */ diff --git a/Website/webb/src/common/components/NavBar.module.css b/Website/webb/src/common/components/NavBar.module.css index fe4c3f6..103e5f9 100644 --- a/Website/webb/src/common/components/NavBar.module.css +++ b/Website/webb/src/common/components/NavBar.module.css @@ -12,7 +12,6 @@ .navbar-toggler { border: #ff0000; - background-image: url("https://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/Hamburger_icon.svg/2048px-Hamburger_icon.svg.png"); } .navLink { diff --git a/Website/webb/src/pages/HomePage.js b/Website/webb/src/pages/HomePage.js index 491bb24..56c2bc4 100644 --- a/Website/webb/src/pages/HomePage.js +++ b/Website/webb/src/pages/HomePage.js @@ -83,21 +83,16 @@ const HomePage = () => { // RENDERING return ( -
-
- -
+
+ + + +
- -
-

Find Route

+
+

Find Route

+
{ setSelectedBuilding={setDestinationBuilding} />
+ {CONFIG.visible_display_stairs_option==="y" ? {setDisplayStairCords(!displayStairCords)}} />} label="Display Stairs" /> : <>} -
+
+ +
+ + + +
+ +
+
+ ); } diff --git a/Website/webb/src/pages/page.css b/Website/webb/src/pages/page.css index c952945..8fbabfa 100644 --- a/Website/webb/src/pages/page.css +++ b/Website/webb/src/pages/page.css @@ -9,25 +9,29 @@ color: white; } +.CustomBar { + width: 90%; + position: relative; + right: 50%; +} .Page { - display: flex; + display: flex; flex-direction: column-reverse; } .MyMap { - position: static; + position: relative; + width: 50%; } - .search-building-panel { width: 100%; - + border: 2px solid #c6c6c6; border-bottom-left-radius: 80px 80px; - display: flex; justify-content: center; align-items: center; - flex-direction: row; gap: 2rem; -} \ No newline at end of file + flex: 1; +} From bd778a39dbef0edf6b8dd5ebaa18b34fbee6acdd Mon Sep 17 00:00:00 2001 From: bcritika <58982008+bcritika@users.noreply.github.com> Date: Fri, 29 Mar 2024 17:48:01 -0400 Subject: [PATCH 08/14] played around with fixing dropdown --- .../common/components/BuildingDropdown.component.js | 13 ++++++++++++- Website/webb/src/pages/page.css | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Website/webb/src/common/components/BuildingDropdown.component.js b/Website/webb/src/common/components/BuildingDropdown.component.js index 9633b53..ed55c92 100644 --- a/Website/webb/src/common/components/BuildingDropdown.component.js +++ b/Website/webb/src/common/components/BuildingDropdown.component.js @@ -7,14 +7,25 @@ const BuildingDropdown = ({ place_holder_text, building_options, setSelectedBuil setSelectedBuilding(selectedOption) } + // const customStyles = { + // control: (provided, state) => ({ + // flex: 1, + // position: 'absolute', + // ...provided, // Spread provided styles to retain default styles + // }), + // }; + + return (
- {/* styles={customStyles} */} + options={building_options} + styles={{ + menuPortal: base => ({ ...base, zIndex: 9999 }), // Apply high z-index to the menu + menu: provided => ({ ...provided, zIndex: 9999 }), // Apply high z-index to the dropdown menu + option: provided => ({ ...provided, zIndex: 9999 }) // Apply high z-index to the dropdown options + }} + />
); -} +}; -export default BuildingDropdown; \ No newline at end of file +export default BuildingDropdown; From c14be37c769a9f584875402df7811ccb9880787d Mon Sep 17 00:00:00 2001 From: Tyler Du <35591950+Vicguin65@users.noreply.github.com> Date: Fri, 5 Apr 2024 17:08:53 -0400 Subject: [PATCH 13/14] renamed components --- Website/webb/src/pages/HomePage.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Website/webb/src/pages/HomePage.js b/Website/webb/src/pages/HomePage.js index a9b78df..b3b5e59 100644 --- a/Website/webb/src/pages/HomePage.js +++ b/Website/webb/src/pages/HomePage.js @@ -13,8 +13,7 @@ import Map from "../common/components/Map"; import RouteStatusPanel from "../common/components/RouteStatusPanel.component"; import CONFIG from "../config.json"; -import { Navbar } from "react-bootstrap"; -import CustomNavBar from "../common/components/Navbars/VerticalNavbar"; +import VerticalNavBar from "../common/components/Navbars/VerticalNavbar"; const HomePage = () => { // STATES @@ -106,7 +105,7 @@ const HomePage = () => { { toggle && (
- +
)} From f038ac4136e33a422bf05034de09e78424ed868f Mon Sep 17 00:00:00 2001 From: Tyler Du <35591950+Vicguin65@users.noreply.github.com> Date: Fri, 5 Apr 2024 17:36:44 -0400 Subject: [PATCH 14/14] changed to percentage --- Website/webb/src/common/components/Navbars/VerticalNavbar.js | 5 +---- Website/webb/src/pages/page.css | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Website/webb/src/common/components/Navbars/VerticalNavbar.js b/Website/webb/src/common/components/Navbars/VerticalNavbar.js index f9ca19d..b784812 100644 --- a/Website/webb/src/common/components/Navbars/VerticalNavbar.js +++ b/Website/webb/src/common/components/Navbars/VerticalNavbar.js @@ -9,10 +9,7 @@ import { flexbox } from "@mui/system"; function VerticalNavBar({ toggle }) { const [sidebarOpen, setSideBarOpen] = useState(toggle); - const handleViewSidebar = () => { - setSideBarOpen(!sidebarOpen); - }; - + return ( {sidebarOpen && ( diff --git a/Website/webb/src/pages/page.css b/Website/webb/src/pages/page.css index 70c3220..16976f0 100644 --- a/Website/webb/src/pages/page.css +++ b/Website/webb/src/pages/page.css @@ -43,5 +43,5 @@ border: none; color: white; font-size: 40px; - width: 40px; + width: 2.4%; }