Skip to content

Commit

Permalink
added correct links to site map (#76)
Browse files Browse the repository at this point in the history
* added correct links to site map

* made images fit to exhibit component
  • Loading branch information
jxmoose authored May 27, 2024
1 parent 8745949 commit a775685
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/app/exhibits/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ 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;
Expand Down Expand Up @@ -121,7 +121,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

0 comments on commit a775685

Please sign in to comment.