diff --git a/Website/webb/src/App.js b/Website/webb/src/App.js index f8057f6..4ee8be0 100644 --- a/Website/webb/src/App.js +++ b/Website/webb/src/App.js @@ -1,6 +1,6 @@ import { React } from 'react'; import 'react-awesome-button/dist/styles.css'; -import CustomNavBar from './common/components/CustomNavBar.component.js'; +import CustomNavBar from './common/components/Navbars/VerticalNavbar.js'; import { BrowserRouter as Router, Route, Routes } from "react-router-dom"; import HomePage from "./pages/HomePage.js"; import About from "./pages/about.js"; @@ -9,7 +9,6 @@ import About from "./pages/about.js"; function App() { return ( - } /> } /> diff --git a/Website/webb/src/common/components/Logo.png b/Website/webb/src/assets/Logo.png similarity index 100% rename from Website/webb/src/common/components/Logo.png rename to Website/webb/src/assets/Logo.png diff --git a/Website/webb/src/common/components/BuildingDropdown.component.js b/Website/webb/src/common/components/BuildingDropdown.component.js index 9633b53..b443adf 100644 --- a/Website/webb/src/common/components/BuildingDropdown.component.js +++ b/Website/webb/src/common/components/BuildingDropdown.component.js @@ -1,11 +1,9 @@ import Select from 'react-select'; const BuildingDropdown = ({ place_holder_text, building_options, setSelectedBuilding }) => { - // component for allowing a user to select a building from building options - const handleChange = (selectedOption) => { - setSelectedBuilding(selectedOption) - } + setSelectedBuilding(selectedOption); + }; return (
@@ -14,9 +12,15 @@ const BuildingDropdown = ({ place_holder_text, building_options, setSelectedBuil menuPosition={'fixed'} placeholder={place_holder_text} onChange={handleChange} - options={building_options} /> + 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; 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 deleted file mode 100644 index 7e14466..0000000 --- a/Website/webb/src/common/components/NavBar.module.css +++ /dev/null @@ -1,34 +0,0 @@ -/* NavBar.module.css */ -@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%; -} - -.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; -} - -.navLink:hover { - background-color: #aeccf1; -} - -.navbarContainer { - display: flex; - justify-content: center; - align-items: center; - justify-content: flex-start; -} \ No newline at end of file diff --git a/Website/webb/src/common/components/Navbars/CustomNavBar.module.css b/Website/webb/src/common/components/Navbars/CustomNavBar.module.css new file mode 100644 index 0000000..59f36f9 --- /dev/null +++ b/Website/webb/src/common/components/Navbars/CustomNavBar.module.css @@ -0,0 +1,34 @@ +/* NavBar.module.css */ +@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%; +} + +.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; +} + +.navLink:hover { + background-color: #aeccf1; +} + +.navbarContainer { + display: flex; + justify-content: center; + align-items: center; + justify-content: flex-start; +} diff --git a/Website/webb/src/common/components/CustomNavBar.component.js b/Website/webb/src/common/components/Navbars/CustomNavbar.js similarity index 86% rename from Website/webb/src/common/components/CustomNavBar.component.js rename to Website/webb/src/common/components/Navbars/CustomNavbar.js index e35f45e..2c192bf 100644 --- a/Website/webb/src/common/components/CustomNavBar.component.js +++ b/Website/webb/src/common/components/Navbars/CustomNavbar.js @@ -1,16 +1,16 @@ import React from 'react'; import { Navbar, Nav, Container } from 'react-bootstrap'; import { NavLink } from 'react-router-dom'; -import CONFIG from '../../config.json' +import CONFIG from '../../../config.json' -import styles from './NavBar.module.css'; +import styles from './CustomNavBar.module.css'; function CustomNavBar() { return ( Accessible Routes - Accessible Routes logo + Accessible Routes logo