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

added correct links to site map #76

Merged
merged 2 commits into from
May 27, 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
6 changes: 3 additions & 3 deletions src/app/exhibits/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ function App() {
if (hash) {
setTimeout(() => {
const element = document.querySelector(hash);
const yOffset = -200;
const yOffset = -100;
if (element) {
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 @@ -119,7 +119,7 @@ function App() {
</p>
</div>
</Link>
<div className="mt-8 grid grid-cols-2 gap-16 pb-[6rem]">
<div className="pt-8 grid grid-cols-2 gap-16 pb-[6rem]">
{exhibits.map(exhibit => (
<Exhibit
title={exhibit.category || ''}
Expand Down
22 changes: 18 additions & 4 deletions src/components/userComponents/Exhibit/Exhibit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ export default function Exhibit({
<p className="text-night leading-tight font-normal font-['Lato']">
{description}
</p>
<Image src={image} alt="Exhibit" width={354} height={150} />
<Image
src={image}
width="0"
height="0"
sizes="100vw"
className="relative object-contain w-full h-auto"
alt="Exhibit"
/>
</div>
</div>
</li>
Expand All @@ -46,16 +53,23 @@ export default function Exhibit({
<div className="flex flex-col w-full px-8 py-16 bg-mint-cream rounded-lg flex-col justify-start items-start gap-2.5 mt-6">
<div className="justify-start items-start gap-5">
<div className="justify-start items-center gap-2">
<h1 className="text-hunter-green font-semibold leading-tight font-['Lato']">
<h2 className="text-hunter-green font-semibold leading-tight font-['Lato']">
{' '}
{title}
</h1>
</h2>
</div>
<p className="text-night leading-tight font-normal mt-5 mb-5 font-['Lato']">
{description}
</p>
</div>
<Image src={image} alt="Exhibit" width={354} height={150} />
<Image
src={image}
width="0"
height="0"
sizes="100vw"
className="relative object-contain w-full h-auto"
alt="Exhibit"
/>
<div className="flex-grow" />
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function ExhibitPreviewCard({
/>
</svg>
</div>
<Link href={`/wildlife-spotlights/${id}`}>
<Link href={`/exhibits#a${id}`}>
<h3 className="relative pr-[0.31rem] pl-[0.75rem] pt-[0.3rem] pb-[0rem]">
<p className="truncate font-medium font-lato text-night text-base leading-normal">
{name1}
Expand Down
Loading