Skip to content

Commit

Permalink
added the modification.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramin Farhadi authored and Ramin Farhadi committed Jun 18, 2024
1 parent ca44e94 commit d644cd7
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 75 deletions.
Binary file modified public/img/locations/dining.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 modified public/img/locations/lab.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 modified public/img/other/art.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 modified public/img/other/bike-racks.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 modified public/img/outdoors/recreation.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 modified public/img/outdoors/well-being.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 7 additions & 8 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ function App() {
layout: {
...defaultLayoutProps,
"icon-image": 'dining',
"icon-size": 0.4,
visibility: visibility.locations.dining! ? 'visible': 'none'
},
};
Expand All @@ -375,6 +376,7 @@ function App() {
layout: {
...defaultLayoutProps,
"icon-image": 'lab',
"icon-size": 0.8,
visibility: visibility.locations.labs! ? 'visible': 'none'
},
};
Expand Down Expand Up @@ -436,6 +438,7 @@ function App() {
layout: {
...defaultLayoutProps,
"icon-image": 'recreation',
"icon-size" : .5,
visibility: visibility.outdoors.recreation! ? 'visible': 'none'
},
};
Expand All @@ -446,6 +449,7 @@ function App() {
layout: {
...defaultLayoutProps,
"icon-image": 'wellbeing',
"icon-size": 0.5,
visibility: visibility.outdoors.wellBeing! ? 'visible': 'none'
},
};
Expand Down Expand Up @@ -521,6 +525,7 @@ function App() {
layout: {
...defaultLayoutProps,
"icon-image": 'bike-rack',
"icon-size": 0.7,
visibility: visibility.bikeRacks! ? 'visible': 'none'
},
};
Expand Down Expand Up @@ -551,6 +556,7 @@ function App() {
layout: {
...defaultLayoutProps,
"icon-image": 'art',
"icon-size": 0.5,
visibility: visibility.art! ? 'visible': 'none'
},
};
Expand Down Expand Up @@ -579,16 +585,9 @@ function App() {
return (
<div className='container-fluid px-0'>
<nav className='navbar fixed-top navbar-expand-xl navbar-light bg-light px-2 navbar-custom-style'>
<span className='navbar-brand pl-4'>Campus Map</span>
<button className='navbar-toggler justify-self-right mb-1' type='button' data-bs-toggle='collapse' data-bs-target='#navbarSupportedContent' aria-controls='navbarSupportedContent' aria-expanded='false' aria-label='Toggle navigation'>
<span className='navbar-toggler-icon'></span>
</button>
<div className='px-0 px-md-3 bg-light navbar-collapse collapse' id="navbarSupportedContent">
<MapMenu
visibility={visibility}
setVisibility={setVisibility} />
</div>

setVisibility={setVisibility} />
</nav>
<div className='map-container'>
<Map
Expand Down
2 changes: 1 addition & 1 deletion src/components/Campuses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Campuses = ({ campus, onclick }: CampusesProps) => {
<div className='d-flex w-100 flex-wrap justify-content-around mb-2'>
{campus.map((campusData, index) => (
<React.Fragment key={index}>
<a href={`#${campusData.shortName.toLowerCase()}`} className='text-decoration-none' onClick={()=> onclick(campusData)}>{campusData.shortName}</a>{ index !== campus.length - 1 && <span>|</span> }
<a href={`#${campusData.shortName.toUpperCase()}`} className='text-decoration-none' onClick={()=> onclick(campusData)}>{campusData.shortName.toUpperCase()}</a>{ index !== campus.length - 1 && <span>|</span> }
</React.Fragment>
))}
</div>
Expand Down
131 changes: 67 additions & 64 deletions src/components/MapMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ interface MapMenuProps {
export default function MapMenu(props: MapMenuProps) {
return (
<div className='w-100'>
<div className='row'>
<div className='col-12 col-sm-6'>
<div className="d-flex flex-row flex-wrap justify-content-center justify-content-sm-start py-1">
<div className='d-flex row'>
<div className='col-4 col-sm-2 col-xl-1 pt-2 mt-1 text-center'><span className='text-uppercase fw-bold navbar-brand'>Campus Map</span></div>
<div className='order-3 order-sm-2 col-12 col-sm-6'>
<div className="d-flex flex-row flex-wrap justify-content-center justify-content-md-start py-1 ms-sm-5">
<div className='btn-group my-1'>
<div className='btn-group'>
<a className='btn btn-outline-dark dropdown-toggle' data-bs-toggle='dropdown' href='#locations' role="button" aria-expanded="false">Locations</a>
Expand Down Expand Up @@ -142,15 +143,69 @@ export default function MapMenu(props: MapMenuProps) {
</li>
</ul>
</div>
<div className='btn-group'>
<a className='btn btn-outline-dark dropdown-toggle' data-bs-toggle='dropdown' href='#locations' role="button" aria-expanded="false">More</a>
<ul className="dropdown-menu dropdown-menu-end">
<li>
<a
className={props.visibility.bikeRacks ? 'dropdown-item active' : 'dropdown-item'}
href='#bikeRack'
id="bikeRacks"
onClick={() => props.setVisibility({ ...props.visibility, 'bikeRacks': !props.visibility['bikeRacks'] })}
>
Bike Racks
</a>
</li>
<li>
<a
className={props.visibility.family ? 'dropdown-item active' : 'dropdown-item'}
id="family"
href='#family'
onClick={() => props.setVisibility({ ...props.visibility, 'family': !props.visibility['family'] })}
>
Family Resources
</a>
</li>
<li>
<a
className={props.visibility.knightsPantry ? 'dropdown-item active' : 'dropdown-item'}
id="pantry"
href='#pantry'
onClick={() => props.setVisibility({ ...props.visibility, 'knightsPantry': !props.visibility['knightsPantry'] })}
>
Knight's Pantry
</a>
</li>
<li>
<a
className={props.visibility.art ? 'dropdown-item active' : 'dropdown-item'}
id="art"
href='#art'
onClick={() => props.setVisibility({ ...props.visibility, 'art': !props.visibility['art'] })}
>Art
</a>
</li>
<li>
<a
className={props.visibility.studentServices ? 'dropdown-item active' : 'dropdown-item'}
id="services"
href='#services'
onClick={() => props.setVisibility({ ...props.visibility, 'studentServices': !props.visibility['studentServices'] })}
>
Student Services
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div className='col-12 col-sm-6 px-0'>
<div className='d-flex justify-content-center py-1'>
<div className='order-1 order-sm-3 col-8 col-sm-4 px-0'>
<div className='d-flex justify-content-end me-3 pb-1'>
<div className="btn-group btn-group-sm my-1" role="group" aria-label="Basic checkbox toggle button group">
<a className="btn btn-outline-dark dropdown-toggle rounded-end-0 d-flex align-items-center" id="accessibility" href="#accessibility" type="button" data-bs-toggle="dropdown" aria-expanded="false">
<a className="btn dropdown-toggle rounded-end-0 d-flex align-items-center" id="accessibility" href="#accessibility" type="button" data-bs-toggle="dropdown" aria-expanded="false">
<img width={30} src='./img/handicap.png' alt="Accessibility" />
<span>Accessibility</span>

</a>
<ul className="dropdown-menu">
<li>
Expand Down Expand Up @@ -216,70 +271,18 @@ export default function MapMenu(props: MapMenuProps) {
</ul>

<a
className={props.visibility.shuttleStops ? 'btn btn-dark rounded-0 d-flex align-items-center' : 'btn btn-outline-dark rounded-0 d-flex align-items-center'}
className={props.visibility.shuttleStops ? 'btn btn-dark rounded-0 d-flex align-items-center' : 'btn rounded-0 d-flex align-items-center'}
id="shuttleStops"
href='#shuttleStops'
onClick={() => props.setVisibility({ ...props.visibility, 'shuttleStops': !props.visibility['shuttleStops'] })} >
<img width={30} src='./img/bus.png' alt="bus logo"/><span> Shuttle</span></a>
<img width={30} src='./img/bus.png' alt="bus logo"/></a>
<a
className={props.visibility.emergencyPhones ? 'btn btn-dark rounded-0 d-flex align-items-center' : 'btn btn-outline-dark rounded-0 d-flex align-items-center'}
className={props.visibility.emergencyPhones ? 'btn btn-dark rounded-0 d-flex align-items-center' : 'btn rounded-0 d-flex align-items-center'}
id="blueLightPhones"
href='#blueLightPhones'
onClick={() => props.setVisibility({ ...props.visibility, 'emergencyPhones': !props.visibility['emergencyPhones'] })} >
<img width={30} src='./img/phone.png' alt="emergency phones"/><span> Emergency</span></a>
<button type="button" className="btn btn-outline-dark align-items-center dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
</button>
<ul className="dropdown-menu dropdown-menu-end">
<li>
<a
className={props.visibility.bikeRacks ? 'dropdown-item active' : 'dropdown-item'}
href='#bikeRack'
id="bikeRacks"
onClick={() => props.setVisibility({ ...props.visibility, 'bikeRacks': !props.visibility['bikeRacks'] })}
>
Bike Racks
</a>
</li>
<li>
<a
className={props.visibility.family ? 'dropdown-item active' : 'dropdown-item'}
id="family"
href='#family'
onClick={() => props.setVisibility({ ...props.visibility, 'family': !props.visibility['family'] })}
>
Family Resources
</a>
</li>
<li>
<a
className={props.visibility.knightsPantry ? 'dropdown-item active' : 'dropdown-item'}
id="pantry"
href='#pantry'
onClick={() => props.setVisibility({ ...props.visibility, 'knightsPantry': !props.visibility['knightsPantry'] })}
>
Knight's Pantry
</a>
</li>
<li>
<a
className={props.visibility.art ? 'dropdown-item active' : 'dropdown-item'}
id="art"
href='#art'
onClick={() => props.setVisibility({ ...props.visibility, 'art': !props.visibility['art'] })}
>Art
</a>
</li>
<li>
<a
className={props.visibility.studentServices ? 'dropdown-item active' : 'dropdown-item'}
id="services"
href='#services'
onClick={() => props.setVisibility({ ...props.visibility, 'studentServices': !props.visibility['studentServices'] })}
>
Student Services
</a>
</li>
</ul>
<img width={30} src='./img/phone.png' alt="emergency phones"/></a>


</div>
</div>
Expand Down
5 changes: 3 additions & 2 deletions src/components/SearchResults.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
.search-control-wrapper {
background-color: black;
height: 3.1rem;
left: 0;
left: 10px;
padding: .35rem .25rem;
position: absolute;
top: 0;
top: 60px;
width: calc(100% - 1rem);

@include media-breakpoint-up(sm) {
top: 0;
width: 50%;
}

Expand Down

0 comments on commit d644cd7

Please sign in to comment.