Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phs sitemap fix #66

Merged
merged 32 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3893b85
done with popup styling
miha-bhaskaran Mar 6, 2024
15e2cd0
updated package lock for npm install
sarahhpeng Apr 5, 2024
2ecb503
Revert "fix: remove formatting changes to media/queries.tsx"
oahnh Apr 9, 2024
57b4668
cont. rebase
oahnh Apr 9, 2024
027bea8
cont. rebase
oahnh Apr 9, 2024
b292e54
rebase 3
oahnh Apr 9, 2024
fdaaddb
rebase 4
oahnh Apr 9, 2024
25c618e
refactor: add formatting changes
oahnh Apr 9, 2024
9d37b4e
refactor: add jsdoc, imports, change queries.tsx -> .ts
oahnh Apr 11, 2024
a0d3c1c
edited to accomodate database changes for categories and exhibits
jxmoose Apr 11, 2024
d484703
claire's approval
miha-bhaskaran Apr 12, 2024
e28a546
figma dev changes resolved
miha-bhaskaran Apr 21, 2024
b5fecb1
updated desktop version
miha-bhaskaran Apr 21, 2024
937ea21
finished all desktop feedback - delted display component (not using) …
miha-bhaskaran May 9, 2024
4ae3305
done with claire's mobile edits
miha-bhaskaran May 10, 2024
83758b8
Merge branch 'main' of github.com:calblueprint/phs into claire_fixes
miha-bhaskaran May 10, 2024
e629b6c
added working nav bar to mihas pr
sarahhpeng May 14, 2024
52fb463
fixed bracket issue in the siteMapPage
sarahhpeng May 14, 2024
3fd6535
filter button duplicated import statement
sarahhpeng May 14, 2024
ac2f6ec
changed hunterGreen to hunter-green for filter button
sarahhpeng May 14, 2024
1146cc1
testing w-auto
sarahhpeng May 14, 2024
def3fdc
minor change
sarahhpeng May 14, 2024
12c2974
Merge branch 'main' of github.com:calblueprint/phs into phs-sitemap-fix
miha-bhaskaran May 14, 2024
67f3add
fixed alignment issues and used andrei's resizing
miha-bhaskaran May 14, 2024
8807d51
fixed popup alignment
miha-bhaskaran May 14, 2024
0d8cc58
resolved justin's comments
miha-bhaskaran May 14, 2024
5495594
fixed fonts
miha-bhaskaran May 14, 2024
db154ba
fixing lag from tours to exhibit
miha-bhaskaran May 21, 2024
68a1588
combined use affects
miha-bhaskaran May 22, 2024
bc1f9f0
trying to push with eslint fixes
miha-bhaskaran May 22, 2024
7ab6431
fixed eslint errors - ready to push
miha-bhaskaran May 22, 2024
6a61b0d
Merge branch 'main' of https://github.com/calblueprint/phs into phs-s…
miha-bhaskaran May 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 60 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
"i": "^0.3.7",
"leaflet": "^1.9.4",
"moment": "^2.30.1",
"next": "latest",
"next": "^14.2.1",
"node": "^21.7.1",
"react": "latest",
"react": "^18.2.0",
"react-bootstrap": "^2.9.0",
"react-dom": "latest",
"react-dom": "^18.2.0",
"react-icons": "^4.12.0",
"react-leaflet": "^4.2.1",
"react-responsive-carousel": "^3.2.23",
Expand Down
7 changes: 7 additions & 0 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,10 @@ body {
html {
height: 100%;
}
.bottom-center {
position: absolute;
bottom: 10px; /* Adjust as needed */
left: 50%;
transform: translateX(-50%);
z-index: 1000; /* Ensure it is above other elements */
}
1 change: 1 addition & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default function RootLayout({
crossOrigin=""
/>
<script src="html5-qrcode.min.js" />

</head>

<body className={inter.className}>
Expand Down
87 changes: 68 additions & 19 deletions src/app/siteMapPage/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ import React, { useState } from 'react';
import dynamic from 'next/dynamic';
import NavBar from '../../components/userComponents/navBar/navBar';
import FilterButton from '../../components/userComponents/FilterButton/FilterButton';
import { useWebDeviceDetection } from '../../context/WindowWidthContext/WindowWidthContext';

const filterButtonContent: string[] = ['Virtual Tour Map', 'Exhibits Map'];
const filterButtonContent: string[] = [
'Virtual Tour Map',
'Exhibits Map',
];

const SiteMap = dynamic(
() => import('../../components/userComponents/SiteMap/SiteMap'),
Expand All @@ -20,50 +24,95 @@ type ModeState = 'tours' | 'exhibits';
* @returns Page for the interactive map
*/
function MapPage() {

const [selectedMap, setSelectedMap] = useState(filterButtonContent[0]); // "Virtual Tour Map" by default
const [mode, setMode] = useState<ModeState>('tours');

// move tour logic here: need to share state between filter
const isWebDevice = useWebDeviceDetection();

const handleFilter = (mapName: string) => {
setSelectedMap(mapName);
if (mapName === 'Virtual Tour Map') {
setMode('tours');
} else if (mapName === 'Exhibits Map') {
setMode('exhibits');
if (mapName === "Virtual Tour Map") {
setMode("tours");
} else if (mapName === "Exhibits Map") {
setMode("exhibits");
}
};

const renderFilterContainer = () => (
<div className="mb-6 pl-0 pr-0 ">
<div className="pt-9 pr-2 pl-2 pb-7">
<p className="text-night font-lato text-2xl font-semibold">
Wildlife Care Center Maps
</p>
</div>
<div className="flex flex-row items-center gap-x-0 pr-1 pl-1 w-full rounded-lg bg-mint-cream border-mint-cream border-[5px]">
<div className="mb-6 w-full px-4">
<div className="flex flex-row items-center justify-between bg-mint-cream border-mint-cream border-[8px] rounded-lg w-full">
{filterButtonContent &&
filterButtonContent.map(text => (
<FilterButton
key={text}
content={text}
onClick={() => handleFilter(text)} // Fixed here
onClick={() => handleFilter(text)}
isSelected={selectedMap === text}
/>
))}
</div>
</div>
);
const renderFilterContainerWide = () => (
<div className="flex justify-end w-[23.875rem] h-[3.25rem]">
<div className="flex flex-row items-center rounded-lg bg-mint-cream border-mint-cream border-[8px] mx-auto w-full">

{filterButtonContent &&
filterButtonContent.map(text => (
<FilterButton
key={text}
content={text}
onClick={() => handleFilter(text)}
isSelected={selectedMap === text}
/>

))}
</div>
</div>
);

return (
<div className="bg-ivory">
return isWebDevice ? (
<>
<NavBar />
<div className='justify-center mx-auto w-[70%]'>
<div className="pt-0 pl-2 pr-2 bg-ivory">

<div className="pt-20 pb-6 pl-2 ">
<text className="text-scary-forest font-lato text-sm font-normal">
Home <text className='text-night'> / Wildlife Care Center Maps </text>
</text>
</div>
<div className="flex items-center pb-4">
<div className='flex-initial pr-2 pl-2'>
<p className="text-night font-lato font-normal text-3xl">Wildlife Care Center Maps</p>
</div>
<div className="flex-grow flex justify-end pr-2 pl-2 pb-3">
{renderFilterContainerWide()}
</div>
</div>
<div className="w-full pr-2 pl-2 flex h-2/3 mb-8">
<SiteMap mode={mode} />
</div>
</div>
</div>

</>
) : (
<>
<NavBar />
<div className='pt-6.25 pr-2 pl-2 pb-2 bg-ivory'>
<div className="p-4">
<p className="text-night font-lato text-2xl font-normal">Wildlife Care Center Maps</p>
</div>

{renderFilterContainer()}
<div className="pt-0 pl-2 pr-2 bg-ivory">
{renderFilterContainer()}
<div className=" w-full pr-2 pl-2 flex h-2/3 mb-8">
<div className="w-full pr-2 pl-2 flex h-2/3 mb-8">
<SiteMap mode={mode} />
</div>
</div>
</div>
</>
);
}

Expand Down
Loading
Loading