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

Justin footer redo #75

Merged
merged 5 commits into from
May 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion src/app/exhibits/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { fetchAllCategories } from '../../supabase/category/queries';
import Exhibit from '../../components/userComponents/Exhibit/Exhibit';
import BackButton from '../../components/userComponents/BackButton/page';
import { useWebDeviceDetection } from '../../context/WindowWidthContext/WindowWidthContext';
import Footer from '../../components/userComponents/Footer/Footer';

/**
* @returns exhibit page
Expand Down Expand Up @@ -39,7 +40,7 @@ function App() {
const y =
element.getBoundingClientRect().top + window.scrollY + yOffset;
// check on this offset later
window.scrollTo({ top: y, behavior: 'auto' });
window.scrollTo({ top: y, behavior: 'smooth' });
}
}, 1000);
}
Expand Down Expand Up @@ -84,6 +85,7 @@ function App() {
))}
</ul>
</div>
<Footer />
</div>
)}
{isWebDevice && (
Expand Down Expand Up @@ -131,6 +133,7 @@ function App() {
))}
</div>
</div>
<Footer />
</div>
)}
</div>
Expand Down
3 changes: 3 additions & 0 deletions src/app/hours-and-location/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { FiCalendar, FiCompass } from 'react-icons/fi';
import Link from 'next/link';
import NavBar from '../../components/userComponents/NavBar/NavBar';
import { BackArrow } from '../../../public/icons';
import Footer from '../../components/userComponents/Footer/Footer';

/**
* @returns The hours and location page.
Expand Down Expand Up @@ -89,6 +90,7 @@ export default function HoursLocationPage() {
</div>
</div>
</div>
<Footer />
</div>
) : (
<div className="bg-ivory min-h-screen">
Expand Down Expand Up @@ -138,6 +140,7 @@ export default function HoursLocationPage() {
or contact us for guidance.
</p>
</div>
<Footer />
</div>
);
}
3 changes: 3 additions & 0 deletions src/app/news/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { NewsRow } from '../../types/types';
import { fetchAllNewsByDate } from '../../supabase/news/queries';
import NewsDisplay from '../../components/userComponents/NewsDisplay/NewsDisplay';
import { useWebDeviceDetection } from '../../context/WindowWidthContext/WindowWidthContext';
import Footer from '../../components/userComponents/Footer/Footer';

/**
* @description queries from the news table in supabase and fetches all the news rows to display
Expand Down Expand Up @@ -46,6 +47,7 @@ export default function App() {
))}
</ul>
</div>
<Footer />
</div>
)}
{isWebDevice && (
Expand Down Expand Up @@ -78,6 +80,7 @@ export default function App() {
</ul>
</div>
</div>
<Footer />
</div>
)}
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import WelcomeGraphic from '../components/userComponents/HomePageComponents/Welc
import HomeVirtualTours from '../components/userComponents/HomePageComponents/HomeVirtualTours/HomeVirtualTours';
import HomeNewsFeed from '../components/userComponents/HomePageComponents/HomeNewsFeed/HomeNewsFeed';
import { useWebDeviceDetection } from '../context/WindowWidthContext/WindowWidthContext';
import Footer from '../components/userComponents/Footer/Footer';

/**
* @returns - Home page for PHS/SPCA. Buttons are available for the major flows of the application from this page.
Expand Down Expand Up @@ -52,7 +53,7 @@ function Home() {
<VisitorResources />
<HomeVirtualTours />
<HomeNewsFeed />
{/* Add Footer Here */}
<Footer />
</div>
);
}
Expand Down
3 changes: 3 additions & 0 deletions src/app/site-maps/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ 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';
import Footer from '../../components/userComponents/Footer/Footer';

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

Expand Down Expand Up @@ -91,6 +92,7 @@ function MapPage() {
</div>
</div>
</div>
<Footer />
</>
) : (
<>
Expand All @@ -109,6 +111,7 @@ function MapPage() {
</div>
</div>
</div>
<Footer />
</>
);
}
Expand Down
3 changes: 3 additions & 0 deletions src/app/virtual-tours/[tourId]/[displayId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import NextStopButton from '../../../../components/userComponents/NextStopButton
import { fetchImagesForDisplay } from '../../../../supabase/media/queries';
import Carousel from '../../../../components/userComponents/ImageScroller/ImageScroller';
import TextButton from '../../../../components/userComponents/TextButton/TextButton';
import Footer from '../../../../components/userComponents/Footer/Footer';

/**
* Displays a stop page for the current tour
Expand Down Expand Up @@ -179,6 +180,7 @@ export default function TourStopPage({
</div>
</div>
</div>
<Footer />
</div>
) : (
<div className="bg-ivory w-full min-h-screen">
Expand Down Expand Up @@ -212,6 +214,7 @@ export default function TourStopPage({
</div>
</div>
</div>
<Footer />
</div>
);
}
131 changes: 69 additions & 62 deletions src/app/virtual-tours/[tourId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
import BackButton from '../../../components/userComponents/BackButton/BackButton';
import NavBar from '../../../components/userComponents/NavBar/NavBar';
import ButtonWithText from '../../../components/userComponents/ButtonWithText/ButtonWithText';
import Footer from '../../../components/userComponents/Footer/Footer';

/**
* @param params -
Expand Down Expand Up @@ -136,78 +137,84 @@ export default function TourStartPage({
</div>
</div>
</div>
<Footer />
</div>
)
: tour && (
<div className="bg-ivory w-full min-h-screen">
<NavBar />
<div className="flex flex-col items-center">
<Link
href="/virtual-tours"
className="absolute top-[5.25rem] left-[1.12rem] z-10"
>
<BackButton />
</Link>
<div className="w-full h-[15.3125rem]">
{media.length > 0 && (
<img
key={media.find(m => m.id === tourMedia[0]?.media_id)?.id}
src={
media.find(m => m.id === tourMedia[0]?.media_id)?.url ?? ''
}
alt={
media.find(m => m.id === tourMedia[0]?.media_id)?.text ?? ''
}
className="object-cover w-full h-full"
/>
)}
</div>
<>
<div className="bg-ivory w-full min-h-screen">
<NavBar />
<div className="flex flex-col items-center">
<Link
href="/virtual-tours"
className="absolute top-[5.25rem] left-[1.12rem] z-10"
>
<BackButton />
</Link>
<div className="w-full h-[15.3125rem]">
{media.length > 0 && (
<img
key={media.find(m => m.id === tourMedia[0]?.media_id)?.id}
src={
media.find(m => m.id === tourMedia[0]?.media_id)?.url ??
''
}
alt={
media.find(m => m.id === tourMedia[0]?.media_id)?.text ??
''
}
className="object-cover w-full h-full"
/>
)}
</div>

<div className="w-[24.375rem] flex flex-col px-[1.125rem] absolute top-[17.81rem] gap-6 mb-[2.5rem]">
<div className="bg-mint-cream w-[22.125rem] rounded-lg px-[2.1875rem] py-[2.25rem] flex-col items-center gap-3 inline-flex">
<div className="flex flex-col w-[22.125rem] px-[2.1875rem] text-center gap-1">
<p className="s1 text-night">WELCOME TO</p>
<h1 className="text-night truncate">{tour.name}</h1>
</div>
<Link
href={`/virtual-tours/${params.tourId}/${tourDisplays[0]?.display_id}`}
>
<div className="w-[12.25rem] h-10">
<ButtonWithText text="Start Tour" />
<div className="w-[24.375rem] flex flex-col px-[1.125rem] absolute top-[17.81rem] gap-6 mb-[2.5rem]">
<div className="bg-mint-cream w-[22.125rem] rounded-lg px-[2.1875rem] py-[2.25rem] flex-col items-center gap-3 inline-flex">
<div className="flex flex-col w-[22.125rem] px-[2.1875rem] text-center gap-1">
<p className="s1 text-night">WELCOME TO</p>
<h1 className="text-night truncate">{tour.name}</h1>
</div>
</Link>
</div>
<Link
href={`/virtual-tours/${params.tourId}/${tourDisplays[0]?.display_id}`}
>
<div className="w-[12.25rem] h-10">
<ButtonWithText text="Start Tour" />
</div>
</Link>
</div>

<div className="flex flex-col relative gap-4 mb-10">
<div className="flex justify-between items-center">
<h4 className="text-night">In this tour</h4>
<div className="bg-[#F5EDCF80] w-[4.375rem] h-[1.5rem] rounded-[0.5625rem] px-3 py-1 flex justify-center items-center">
<p className="s3 text-night">{tour.stop_count} stops</p>
<div className="flex flex-col relative gap-4 mb-10">
<div className="flex justify-between items-center">
<h4 className="text-night">In this tour</h4>
<div className="bg-[#F5EDCF80] w-[4.375rem] h-[1.5rem] rounded-[0.5625rem] px-3 py-1 flex justify-center items-center">
<p className="s3 text-night">{tour.stop_count} stops</p>
</div>
</div>
<ol>
{tourDisplays.map(tourDisplay => (
<li
key={tourDisplay.display_id}
className="mb-[0.44rem] ml-4"
>
<p className="b3 text-night">
{tourDisplay.display_order != null
? tourDisplay.display_order + 1
: ''}
.{' '}
{
displays.find(
display => display.id === tourDisplay.display_id,
)?.title
}
</p>
</li>
))}
</ol>
</div>
<ol>
{tourDisplays.map(tourDisplay => (
<li
key={tourDisplay.display_id}
className="mb-[0.44rem] ml-4"
>
<p className="b3 text-night">
{tourDisplay.display_order != null
? tourDisplay.display_order + 1
: ''}
.{' '}
{
displays.find(
display => display.id === tourDisplay.display_id,
)?.title
}
</p>
</li>
))}
</ol>
</div>
</div>
</div>
</div>
<Footer />
</>
);
}
3 changes: 3 additions & 0 deletions src/app/virtual-tours/[tourId]/tour-end/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { fetchTourDisplays } from '../../../../supabase/tour_displays/queries';
import { BackArrow, Congratulations } from '../../../../../public/icons';
import ButtonWithText from '../../../../components/userComponents/ButtonWithText/ButtonWithText';
import RelatedLinks from '../../../../components/userComponents/RelatedLinks/RelatedLinks';
import Footer from '../../../../components/userComponents/Footer/Footer';

/**
* @param params -
Expand Down Expand Up @@ -84,6 +85,7 @@ export default function TourEndPage({
</div>
</div>
</div>
<Footer />
</div>
) : (
<div className="bg-ivory min-h-screen">
Expand Down Expand Up @@ -114,6 +116,7 @@ export default function TourEndPage({
</div>
</div>
</div>
<Footer />
</div>
);
}
Loading
Loading