Skip to content

Commit

Permalink
SUM-47 | @rebeccahongsf | theme footer
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccahongsf committed Apr 10, 2024
1 parent f58eef3 commit 4dba650
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions src/components/config-pages/local-footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import YoutubeIcon from "@components/elements/icons/YoutubeIcon";
import FacebookIcon from "@components/elements/icons/FacebookIcon";
import { Maybe, StanfordLocalFooter} from "@lib/gql/__generated__/drupal.d";
import {buildUrl} from "@lib/drupal/utils";
import InstagramIcon from "@components/elements/icons/InstagramIcon";
import LinkedInIcon from "@components/elements/icons/LinkedInIcon";

const LocalFooter = ({
suFooterEnabled,
Expand Down Expand Up @@ -61,13 +63,13 @@ const LocalFooter = ({
return (
<div className="local-footer bg-foggy-light py-20">
<div className="centered">
<div className="mb-20">
<FooterLockup {...lockupProps} />
</div>
<div className="grid md:grid-cols-12 gap-x-32 [&_a]:font-normal [&_a]:no-underline [&_a:hover]:underline [&_a:hover]:text-black [&_a:focus]:underline [&_a:focus]:text-black [&_a]:transition">

<div className="col-start-2 col-span-5 rs-mb-4">
<FooterLockup {...lockupProps} />
</div>

<div
className="grid md:grid-cols-2 lg:grid-cols-4 gap-32 [&_a]:font-normal [&_a]:no-underline [&_a:hover]:underline [&_a:hover]:text-black [&_a:focus]:underline [&_a:focus]:text-black [&_a]:transition">
<div>
<div className="col-start-2 col-span-5">

{suLocalFootAddress &&
<Address {...suLocalFootAddress}/>
Expand All @@ -88,13 +90,15 @@ const LocalFooter = ({
</ul>
}

<Wysiwyg html={suLocalFootPrCo?.processed}/>

{suLocalFootSocial &&
<ul className="list-unstyled flex gap-2">
<ul className="rs-mt-4 list-unstyled flex gap-2">
{suLocalFootSocial.map((link, index) => {
if (!link.url) return;
return (
<li key={`footer-action-link-${index}`}>
<Link href={link.url}>
<Link href={link.url} className="text-black hocus:text-digital-blue">
<SocialIcon url={link.url}/>
<span className="sr-only">{link.title}</span>
</Link>
Expand All @@ -103,11 +107,9 @@ const LocalFooter = ({
})}
</ul>
}

<Wysiwyg html={suLocalFootPrCo?.processed}/>
</div>

<div>
<div className="col-start-7 col-span-2">
{suLocalFootPrimeH &&
<H2 className="text-m1">{suLocalFootPrimeH}</H2>}
{suLocalFootPrimary &&
Expand All @@ -128,7 +130,7 @@ const LocalFooter = ({

</div>

<div>
<div className="col-start-9 col-span-2">
{suLocalFootSecondH &&
<H2 className="text-m1">{suLocalFootSecondH}</H2>}

Expand Down Expand Up @@ -160,9 +162,11 @@ const LocalFooter = ({
}

const SocialIcon = ({url}: { url: string }) => {
if (url.includes("twitter.com")) return <TwitterIcon/>
if (url.includes("facebook")) return <FacebookIcon />
if (url.includes("linkdin")) return <LinkedInIcon />
if (url.includes("twitter.com")) return <TwitterIcon />
if (url.includes("instagram.com")) return <InstagramIcon />
if (url.includes("youtube.com")) return <YoutubeIcon/>
if (url.includes("facebook")) return <FacebookIcon/>
return null;
}

Expand Down

0 comments on commit 4dba650

Please sign in to comment.