From 4acbbf3db18de6d57c44eb9bb140be207f31a2e6 Mon Sep 17 00:00:00 2001 From: Jen Breese Date: Thu, 18 Apr 2024 12:41:18 -0700 Subject: [PATCH] SUP-180: local footer (#4) --- .../config-pages/LocalFooter.stories.tsx | 37 +--- .../elements/lockup/Lockup.stories.tsx | 142 ---------------- app/layout.tsx | 4 +- src/components/config-pages/local-footer.tsx | 158 +++++------------- src/components/elements/headers.tsx | 2 +- .../elements/icons/InstagramIcon.tsx | 4 +- src/components/elements/icons/TwitterIcon.tsx | 6 +- src/components/elements/lockup/lockup-a.tsx | 29 ---- src/components/elements/lockup/lockup-b.tsx | 24 --- src/components/elements/lockup/lockup-d.tsx | 24 --- src/components/elements/lockup/lockup-e.tsx | 25 --- src/components/elements/lockup/lockup-h.tsx | 25 --- src/components/elements/lockup/lockup-i.tsx | 25 --- .../elements/lockup/lockup-logo.tsx | 28 ++-- src/components/elements/lockup/lockup-m.tsx | 24 --- src/components/elements/lockup/lockup-o.tsx | 15 -- src/components/elements/lockup/lockup-p.tsx | 24 --- src/components/elements/lockup/lockup-r.tsx | 19 --- src/components/elements/lockup/lockup-s.tsx | 21 --- src/components/elements/lockup/lockup-t.tsx | 22 --- src/components/elements/lockup/lockup.tsx | 100 +---------- src/components/global/page-footer.tsx | 85 ---------- src/components/images/logo-lg.tsx | 54 ++++++ src/components/images/logo-xs.tsx | 55 ++++++ src/components/images/logo.svg | 33 ++++ src/styles/fonts.tsx | 7 +- src/styles/typography/local-footer.tsx | 16 +- 27 files changed, 246 insertions(+), 762 deletions(-) delete mode 100644 .storybook/stories/elements/lockup/Lockup.stories.tsx delete mode 100644 src/components/elements/lockup/lockup-a.tsx delete mode 100644 src/components/elements/lockup/lockup-b.tsx delete mode 100644 src/components/elements/lockup/lockup-d.tsx delete mode 100644 src/components/elements/lockup/lockup-e.tsx delete mode 100644 src/components/elements/lockup/lockup-h.tsx delete mode 100644 src/components/elements/lockup/lockup-i.tsx delete mode 100644 src/components/elements/lockup/lockup-m.tsx delete mode 100644 src/components/elements/lockup/lockup-o.tsx delete mode 100644 src/components/elements/lockup/lockup-p.tsx delete mode 100644 src/components/elements/lockup/lockup-r.tsx delete mode 100644 src/components/elements/lockup/lockup-s.tsx delete mode 100644 src/components/elements/lockup/lockup-t.tsx create mode 100644 src/components/images/logo-lg.tsx create mode 100644 src/components/images/logo-xs.tsx create mode 100644 src/components/images/logo.svg diff --git a/.storybook/stories/config-pages/LocalFooter.stories.tsx b/.storybook/stories/config-pages/LocalFooter.stories.tsx index 495d97cd..d5485292 100644 --- a/.storybook/stories/config-pages/LocalFooter.stories.tsx +++ b/.storybook/stories/config-pages/LocalFooter.stories.tsx @@ -11,11 +11,6 @@ const meta: Meta = { component: LocalFooter, tags: ['autodocs'], argTypes: { - suLocalFootLocOp: { - description: "Lockup Options", - options: ['a', 'b', 'd', 'e', 'h', 'i', 'm', 'o', 'p', 'r', 's', 't', 'none'], - control: {type: "select"} - }, suFooterEnabled: {control: "boolean"} } }; @@ -31,49 +26,29 @@ export const LocalFooterDisplay: Story = { {title: "Action link 1", url: "https://localhost", internal: false}, {title: "Action link 2", url: "https://localhost", internal: false} ], - suLocalFootAddress: { - additionalName: "additional_name", - addressLine1: "address_line1", - addressLine2: "address_line2", - administrativeArea: "administrative_area", - country: {code: "country_code"}, - familyName: "family_name", - givenName: "given_name", - locality: "locality", - organization: "organization", - postalCode: "postal_code", - sortingCode: "sorting_code", - }, suLocalFootFButton: "suLocalFoot_f_button", suLocalFootFIntro: {processed: "suLocalFoot_f_intro"}, suLocalFootFMethod: "suLocalFoot_f_method", suLocalFootFUrl: {title: "Form Action url", url: "https://localhost", internal: false}, - suLocalFootLine1: "suLocalFoot_line_1", - suLocalFootLine2: "suLocalFoot_line_2", - suLocalFootLine3: "suLocalFoot_line_3", - suLocalFootLine4: "suLocalFoot_line_4", - suLocalFootLine5: "suLocalFoot_line_5", - suLocalFootLocImg: null, suLocalFootLocLink: {title: "suLocalFoot_loc_link", url: "https://localhost", internal: false}, - suLocalFootPrCo: {processed: "suLocalFoot_pr_co"}, + suLocalFootPrCo: {processed: "First Content Block"}, suLocalFootPrimary: [ {title: "Primary link 1", url: "https://localhost", internal: false}, {title: "Primary link 2", url: "https://localhost", internal: false} ], - suLocalFootPrimeH: "suLocalFoot_prime_h", - suLocalFootSeCo: {processed: "suLocalFoot_se_co"}, + suLocalFootPrimeH: "Primary Links Header", + suLocalFootSeCo: {processed: "Second Content Block"}, suLocalFootSecond: [ {title: "Second Link 1", url: "https://localhost", internal: false}, {title: "Second Link 2", url: "https://localhost", internal: false} ], - suLocalFootSecondH: "suLocalFoot_second_h", + suLocalFootSecondH: "Secondary Links Header", suLocalFootSocial: [ {title: "Facebook", url: "https://localhost", internal: false}, {title: "YouTube", url: "https://localhost", internal: false} ], - suLocalFootSunetT: "suLocalFoot_sunet_t", - suLocalFootTr2Co: {processed: "suLocalFoot_tr2_co"}, - suLocalFootTrCo: {processed: "suLocalFoot_tr_co"}, + suLocalFootTr2Co: {processed: "Third Content Block"}, + suLocalFootTrCo: {processed: "Fourth Content Block"}, suLocalFootUseLoc: true, suLocalFootUseLogo: true, suLocalFootLocOp: "suLocalFoot_loc_op", diff --git a/.storybook/stories/elements/lockup/Lockup.stories.tsx b/.storybook/stories/elements/lockup/Lockup.stories.tsx deleted file mode 100644 index 57f5a3f5..00000000 --- a/.storybook/stories/elements/lockup/Lockup.stories.tsx +++ /dev/null @@ -1,142 +0,0 @@ -import type {Meta, StoryObj} from '@storybook/react'; -import Lockup from "@components/elements/lockup/lockup"; -import {ComponentProps} from "react"; -import {Image} from "@lib/gql/__generated__/drupal"; - -type ComponentStoryProps = ComponentProps & { - logoUrl?: Image["url"] -} - -// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction -const meta: Meta = { - title: 'Design/Elements/Lockup', - component: Lockup, - tags: ['autodocs'], - argTypes: { - suLockupOptions: { - options: ['a', 'b', 'd', 'e', 'h', 'i', 'm', 'o', 'p', 'r', 's', 't', 'none'], - control: {type: "select"} - }, - suLockupEnabled: { - control: "boolean" - }, - suUseThemeLogo: { - control: "boolean" - } - } -}; - -export default meta; -type Story = StoryObj; - -// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args -export const LockupDisplay: Story = { - render: ({logoUrl, ...args}) => { - if(logoUrl) args.suUploadLogoImage = {url: logoUrl, height: 50, width: 300, size: 123, focalY: 50, focalX: 50} - return - }, - args: { - suLine1: "Line 1", - suLine2: "Line 2", - suLine3: "Line 3", - suLine4: "Line 4", - suLine5: "Line 5", - suSiteName: "Site Name", - suUseThemeLogo: true, - logoUrl: "https://placehold.co/300x50", - suLockupEnabled: true, - suLockupOptions: "none", - }, -}; - -export const LockupA: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "a" - } -} -export const LockupB: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "b" - } -} -export const LockupD: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "d" - } -} -export const LockupE: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "e" - } -} -export const LockupH: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "h" - } -} -export const LockupI: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "i" - } -} -export const LockupM: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "m" - } -} -export const LockupO: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "o" - } -} -export const LockupP: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "p" - } -} -export const LockupR: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "r" - } -} -export const LockupS: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "s" - } -} -export const LockupT: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "t" - } -} -export const LockupNone: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "none" - } -} diff --git a/app/layout.tsx b/app/layout.tsx index e5383aff..db7bd184 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -3,7 +3,7 @@ import BackToTop from "@components/elements/back-to-top"; import PageFooter from "@components/global/page-footer"; import PageHeader from "@components/global/page-header"; import {Icon} from "next/dist/lib/metadata/types/metadata-types"; -import {sourceSans3} from "../src/styles/fonts"; +import {montserrat} from "../src/styles/fonts"; import DrupalWindowSync from "@components/elements/drupal-window-sync"; import {isPreviewMode} from "@lib/drupal/utils"; import UserAnalytics from "@components/elements/user-analytics"; @@ -45,7 +45,7 @@ export const revalidate = false; const RootLayout = ({children, modal}: { children: React.ReactNode, modal: React.ReactNode }) => { const isPreview = isPreviewMode(); return ( - + {/* Add Google Analytics and SiteImprove when not in preview mode. */} {!isPreview && diff --git a/src/components/config-pages/local-footer.tsx b/src/components/config-pages/local-footer.tsx index be5332c0..f3ee739c 100644 --- a/src/components/config-pages/local-footer.tsx +++ b/src/components/config-pages/local-footer.tsx @@ -1,36 +1,18 @@ -import Address from "@components/elements/address"; import Link from "@components/elements/link"; import Wysiwyg from "@components/elements/wysiwyg"; import LockupLogo from "@components/elements/lockup/lockup-logo"; -import LockupA from "@components/elements/lockup/lockup-a"; -import LockupB from "@components/elements/lockup/lockup-b"; -import LockupD from "@components/elements/lockup/lockup-d"; -import LockupE from "@components/elements/lockup/lockup-e"; -import LockupH from "@components/elements/lockup/lockup-h"; -import LockupI from "@components/elements/lockup/lockup-i"; -import LockupM from "@components/elements/lockup/lockup-m"; -import LockupO from "@components/elements/lockup/lockup-o"; -import LockupP from "@components/elements/lockup/lockup-p"; -import LockupR from "@components/elements/lockup/lockup-r"; -import LockupS from "@components/elements/lockup/lockup-s"; -import LockupT from "@components/elements/lockup/lockup-t"; import {JSX} from "react"; import {H2} from "@components/elements/headers"; import TwitterIcon from "@components/elements/icons/TwitterIcon"; import YoutubeIcon from "@components/elements/icons/YoutubeIcon"; import FacebookIcon from "@components/elements/icons/FacebookIcon"; +import InstagramIcon from "@components/elements/icons/InstagramIcon"; import { Maybe, StanfordLocalFooter} from "@lib/gql/__generated__/drupal.d"; import {buildUrl} from "@lib/drupal/utils"; const LocalFooter = ({ suFooterEnabled, suLocalFootAction, - suLocalFootAddress, - suLocalFootLine1, - suLocalFootLine2, - suLocalFootLine3, - suLocalFootLine4, - suLocalFootLine5, suLocalFootLocImg, suLocalFootLocOp, suLocalFootPrCo, @@ -50,31 +32,40 @@ const LocalFooter = ({ const lockupProps = { useDefault: suLocalFootUseLoc, lockupOption: suLocalFootLocOp, - line1: suLocalFootLine1, - line2: suLocalFootLine2, - line3: suLocalFootLine3, - line4: suLocalFootLine4, - line5: suLocalFootLine5, logoUrl: !suLocalFootUseLogo && suLocalFootLocImg?.url ? buildUrl(suLocalFootLocImg?.url).toString() : undefined, } return ( -
+
-
+
-
-
- - {suLocalFootAddress && -
- } - + {/* Social Links */} + {suLocalFootSocial && +
    + {suLocalFootSocial.map((link, index) => { + if (!link.url) return; + return ( +
  • + + + {link.title} + +
  • + ) + })} +
+ } +
+
+ {/* Content block 1 */} + + + {/* Action Links */} {suLocalFootAction && -
    +
      {suLocalFootAction.map((link, index) => { if (!link.url) return; return ( @@ -87,29 +78,14 @@ const LocalFooter = ({ })}
    } - - {suLocalFootSocial && -
      - {suLocalFootSocial.map((link, index) => { - if (!link.url) return; - return ( -
    • - - - {link.title} - -
    • - ) - })} -
    - } - -
-
+
+ {/* Content block 3 */} + + {/* Primary Links */} {suLocalFootPrimeH && -

{suLocalFootPrimeH}

} +

{suLocalFootPrimeH}

} {suLocalFootPrimary &&
    {suLocalFootPrimary.map((link, index) => { @@ -124,13 +100,14 @@ const LocalFooter = ({ })}
} - -
-
+
+ {/* Content block 2 */} + + {/* Secondary links */} {suLocalFootSecondH && -

{suLocalFootSecondH}

} +

{suLocalFootSecondH}

} {suLocalFootSecond &&
    @@ -147,38 +124,36 @@ const LocalFooter = ({
} - -
- - +
+ {/* Content block 4 */} + +
+
+ © 2024 Stanford University Press. All rights reserved. +
) } const SocialIcon = ({url}: { url: string }) => { + if (url.includes("facebook")) return if (url.includes("twitter.com")) return if (url.includes("youtube.com")) return - if (url.includes("facebook")) return + if (url.includes("instagram.com")) return return null; } export interface FooterLockupProps { useDefault?: Maybe - siteName?: Maybe lockupOption?: Maybe - line1?: Maybe - line2?: Maybe - line3?: Maybe - line4?: Maybe - line5?: Maybe logoUrl?: Maybe } -const FooterLockup = ({useDefault = true, siteName, lockupOption, ...props}: FooterLockupProps): JSX.Element => { +const FooterLockup = ({useDefault = true, lockupOption, ...props}: FooterLockupProps): JSX.Element => { const lockupProps = { ...props } @@ -195,42 +170,6 @@ const FooterLockup = ({useDefault = true, siteName, lockupOption, ...props}: Foo
) - - case "a": - return ; - - case "b": - return ; - - case "d": - return ; - - case "e": - return ; - - case "h": - return ; - - case "i": - return ; - - case "m": - return ; - - case "o": - return ; - - case "p": - return ; - - case "r": - return ; - - case "s": - return ; - - case "t": - return ; } @@ -238,11 +177,6 @@ const FooterLockup = ({useDefault = true, siteName, lockupOption, ...props}: Foo
- -
-
- {siteName || "University"} -
) diff --git a/src/components/elements/headers.tsx b/src/components/elements/headers.tsx index 5f5a0734..2f621a0a 100644 --- a/src/components/elements/headers.tsx +++ b/src/components/elements/headers.tsx @@ -3,7 +3,7 @@ import {twMerge} from "tailwind-merge"; type Props = HtmlHTMLAttributes -const headingLinkClasses = "[&_a]:text-digital-red [&_a]:hocus:text-black [&_a]:hocus:underline"; +const headingLinkClasses = "[&_a]:hocus:underline"; export const H1 = ({children, className, ...props}: Props) => { return ( diff --git a/src/components/elements/icons/InstagramIcon.tsx b/src/components/elements/icons/InstagramIcon.tsx index 2540ed08..00d4275f 100644 --- a/src/components/elements/icons/InstagramIcon.tsx +++ b/src/components/elements/icons/InstagramIcon.tsx @@ -2,7 +2,9 @@ import {HTMLAttributes} from "react"; const InstagramIcon = (props: HTMLAttributes) => { return ( - + Instagram icon ) => ( ) diff --git a/src/components/elements/lockup/lockup-a.tsx b/src/components/elements/lockup/lockup-a.tsx deleted file mode 100644 index a117b138..00000000 --- a/src/components/elements/lockup/lockup-a.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import Link from "@components/elements/link"; -import LockupLogo from "@components/elements/lockup/lockup-logo"; -import {FooterLockupProps} from "@components/config-pages/local-footer"; - -const LockupA = ({line1, line5, siteName, logoUrl}: FooterLockupProps) => { - return ( -
- -
-
- -
- -
-
- {line1 || siteName} -
-
- - {line5 && -
- {line5} -
- } - -
- ) -} -export default LockupA; \ No newline at end of file diff --git a/src/components/elements/lockup/lockup-b.tsx b/src/components/elements/lockup/lockup-b.tsx deleted file mode 100644 index 9529d61b..00000000 --- a/src/components/elements/lockup/lockup-b.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import Link from "@components/elements/link"; -import LockupLogo from "@components/elements/lockup/lockup-logo"; -import {FooterLockupProps} from "@components/config-pages/local-footer"; - -const LockupB = ({line1, line2, siteName, logoUrl}: FooterLockupProps) => { - return ( -
- -
-
- -
- -
-
-
{line1 || siteName}
-
{line2}
-
-
- -
- ) -} -export default LockupB; \ No newline at end of file diff --git a/src/components/elements/lockup/lockup-d.tsx b/src/components/elements/lockup/lockup-d.tsx deleted file mode 100644 index 949bbc53..00000000 --- a/src/components/elements/lockup/lockup-d.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import Link from "@components/elements/link"; -import LockupLogo from "@components/elements/lockup/lockup-logo"; -import {FooterLockupProps} from "@components/config-pages/local-footer"; - -const LockupD = ({line1, line3, siteName, logoUrl}: FooterLockupProps) => { - return ( -
- -
-
- -
- -
-
-
{line1 || siteName}
-
{line3}
-
-
- -
- ) -} -export default LockupD; \ No newline at end of file diff --git a/src/components/elements/lockup/lockup-e.tsx b/src/components/elements/lockup/lockup-e.tsx deleted file mode 100644 index 8c530f62..00000000 --- a/src/components/elements/lockup/lockup-e.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import Link from "@components/elements/link"; -import LockupLogo from "@components/elements/lockup/lockup-logo"; -import {FooterLockupProps} from "@components/config-pages/local-footer"; - -const LockupE = ({line1, line2, line3, siteName, logoUrl}: FooterLockupProps) => { - return ( -
- -
-
- -
- -
-
-
{line1 || siteName}
-
{line2 || siteName}
-
{line3}
-
-
- -
- ) -} -export default LockupE; \ No newline at end of file diff --git a/src/components/elements/lockup/lockup-h.tsx b/src/components/elements/lockup/lockup-h.tsx deleted file mode 100644 index 056888c2..00000000 --- a/src/components/elements/lockup/lockup-h.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import Link from "@components/elements/link"; -import LockupLogo from "@components/elements/lockup/lockup-logo"; -import {FooterLockupProps} from "@components/config-pages/local-footer"; - -const LockupH = ({line1, line3, line4, siteName, logoUrl}: FooterLockupProps) => { - return ( -
- -
-
- -
{line4}
-
- -
-
-
{line1 || siteName}
-
{line3}
-
-
- -
- ) -} -export default LockupH; \ No newline at end of file diff --git a/src/components/elements/lockup/lockup-i.tsx b/src/components/elements/lockup/lockup-i.tsx deleted file mode 100644 index 45ea75f8..00000000 --- a/src/components/elements/lockup/lockup-i.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import Link from "@components/elements/link"; -import LockupLogo from "@components/elements/lockup/lockup-logo"; -import {FooterLockupProps} from "@components/config-pages/local-footer"; - -const LockupI = ({line1, line3, line4, siteName, logoUrl}: FooterLockupProps) => { - return ( -
- -
-
- -
{line4}
-
- -
-
-
{line1 || siteName}
-
{line3}
-
-
- -
- ) -} -export default LockupI; \ No newline at end of file diff --git a/src/components/elements/lockup/lockup-logo.tsx b/src/components/elements/lockup/lockup-logo.tsx index d8b755b8..9ba6252e 100644 --- a/src/components/elements/lockup/lockup-logo.tsx +++ b/src/components/elements/lockup/lockup-logo.tsx @@ -1,21 +1,21 @@ import {Maybe} from "@lib/gql/__generated__/drupal.d"; -import StanfordWordMark from "@components/images/stanford-wordmark"; +import PressFooterLogoLg from "@components/images/logo-lg"; +import PressFooterLogoXs from "@components/images/logo-xs"; + +const LockupLogo = ({logoUrl}: { logoUrl?: Maybe, siteName?: Maybe }) => { -const LockupLogo = ({logoUrl, siteName = ""}: { logoUrl?: Maybe, siteName?: Maybe }) => { return ( <> - {logoUrl && - - {`${siteName} - - } - {!logoUrl && - - } +
+ {!logoUrl && + + } +
+
+ {!logoUrl && + + } +
) } diff --git a/src/components/elements/lockup/lockup-m.tsx b/src/components/elements/lockup/lockup-m.tsx deleted file mode 100644 index 8ff84fec..00000000 --- a/src/components/elements/lockup/lockup-m.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import Link from "@components/elements/link"; -import LockupLogo from "@components/elements/lockup/lockup-logo"; -import {FooterLockupProps} from "@components/config-pages/local-footer"; - -const LockupM = ({line1, line2, siteName, logoUrl}: FooterLockupProps) => { - return ( -
- -
-
- -
- -
-
-
{line1 || siteName}
-
{line2}
-
-
- -
- ) -} -export default LockupM; \ No newline at end of file diff --git a/src/components/elements/lockup/lockup-o.tsx b/src/components/elements/lockup/lockup-o.tsx deleted file mode 100644 index e046f0b1..00000000 --- a/src/components/elements/lockup/lockup-o.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import Link from "@components/elements/link"; -import LockupLogo from "@components/elements/lockup/lockup-logo"; -import {FooterLockupProps} from "@components/config-pages/local-footer"; - -const LockupO = ({line4, siteName, logoUrl}: FooterLockupProps) => { - return ( -
- - -
{line4}
- -
- ) -} -export default LockupO; \ No newline at end of file diff --git a/src/components/elements/lockup/lockup-p.tsx b/src/components/elements/lockup/lockup-p.tsx deleted file mode 100644 index fe46c83f..00000000 --- a/src/components/elements/lockup/lockup-p.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import Link from "@components/elements/link"; -import LockupLogo from "@components/elements/lockup/lockup-logo"; -import {FooterLockupProps} from "@components/config-pages/local-footer"; - -const LockupP = ({line1, line4, siteName, logoUrl}: FooterLockupProps) => { - return ( -
- -
-
- -
{line4}
-
- -
-
- {line1 || siteName} -
-
- -
- ) -} -export default LockupP; \ No newline at end of file diff --git a/src/components/elements/lockup/lockup-r.tsx b/src/components/elements/lockup/lockup-r.tsx deleted file mode 100644 index 085d7097..00000000 --- a/src/components/elements/lockup/lockup-r.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import Link from "@components/elements/link"; -import LockupLogo from "@components/elements/lockup/lockup-logo"; -import {FooterLockupProps} from "@components/config-pages/local-footer"; - -const LockupR = ({line5, siteName, logoUrl}: FooterLockupProps) => { - return ( -
- -
-
- -
{line5}
-
-
- -
- ) -} -export default LockupR; \ No newline at end of file diff --git a/src/components/elements/lockup/lockup-s.tsx b/src/components/elements/lockup/lockup-s.tsx deleted file mode 100644 index 5c889fb5..00000000 --- a/src/components/elements/lockup/lockup-s.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import Link from "@components/elements/link"; -import LockupLogo from "@components/elements/lockup/lockup-logo"; -import {FooterLockupProps} from "@components/config-pages/local-footer"; - -const LockupS = ({line1, line2, line4, siteName, logoUrl}: FooterLockupProps) => { - return ( -
- - - -
{line4}
-
-
{line1 || siteName}
-
{line2}
-
- - -
- ) -} -export default LockupS; \ No newline at end of file diff --git a/src/components/elements/lockup/lockup-t.tsx b/src/components/elements/lockup/lockup-t.tsx deleted file mode 100644 index 4eba4c70..00000000 --- a/src/components/elements/lockup/lockup-t.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import Link from "@components/elements/link"; -import LockupLogo from "@components/elements/lockup/lockup-logo"; -import {FooterLockupProps} from "@components/config-pages/local-footer"; - -const LockupT = ({line1, line2, line3, line4, siteName, logoUrl}: FooterLockupProps) => { - return ( -
- - - -
{line4}
-
-
{line1 || siteName}
-
{line2}
-
{line3}
-
- - -
- ) -} -export default LockupT; \ No newline at end of file diff --git a/src/components/elements/lockup/lockup.tsx b/src/components/elements/lockup/lockup.tsx index 3723b767..33a19afc 100644 --- a/src/components/elements/lockup/lockup.tsx +++ b/src/components/elements/lockup/lockup.tsx @@ -1,16 +1,4 @@ import Link from "@components/elements/link"; -import LockupA from "@components/elements/lockup/lockup-a"; -import LockupB from "@components/elements/lockup/lockup-b"; -import LockupD from "@components/elements/lockup/lockup-d"; -import LockupE from "@components/elements/lockup/lockup-e"; -import LockupH from "@components/elements/lockup/lockup-h"; -import LockupI from "@components/elements/lockup/lockup-i"; -import LockupM from "@components/elements/lockup/lockup-m"; -import LockupO from "@components/elements/lockup/lockup-o"; -import LockupP from "@components/elements/lockup/lockup-p"; -import LockupR from "@components/elements/lockup/lockup-r"; -import LockupS from "@components/elements/lockup/lockup-s"; -import LockupT from "@components/elements/lockup/lockup-t"; import LockupLogo from "@components/elements/lockup/lockup-logo"; import {LockupSetting, StanfordBasicSiteSetting} from "@lib/gql/__generated__/drupal.d"; @@ -19,93 +7,23 @@ type Props = Omit export const Lockup = ({ - suLockupEnabled, suUseThemeLogo, suUploadLogoImage, suSiteName, - suLine1, - suLine2, - suLine3, - suLine4, - suLine5, - suLockupOptions }: Props) => { const logoUrl = !suUseThemeLogo ? suUploadLogoImage?.url : undefined; const lockupProps = { - line1: suLine1, - line2: suLine2, - line3: suLine3, - line4: suLine4, - line5: suLine5, siteName: suSiteName || "Stanford", logoUrl: logoUrl, } - - if (!suLockupEnabled) { - return ( -
- -
-
- -
-
- {suSiteName || "University"} -
-
- -
- ) - } - - switch (suLockupOptions) { - case "a": - return ; - - case "b": - return ; - - case "d": - return ; - - case "e": - return ; - - case "h": - return ; - - case "i": - return ; - - case "m": - return ; - - case "o": - return ; - - case "p": - return ; - - case "r": - return ; - - case "s": - return ; - - case "t": - return ; - - case "none": - default: - return ( -
- - - -
- ) - } + + return ( +
+ + + +
+ ) } export default Lockup; \ No newline at end of file diff --git a/src/components/global/page-footer.tsx b/src/components/global/page-footer.tsx index 11444871..ee31378c 100644 --- a/src/components/global/page-footer.tsx +++ b/src/components/global/page-footer.tsx @@ -12,91 +12,6 @@ const PageFooter = async () => { ) } diff --git a/src/components/images/logo-lg.tsx b/src/components/images/logo-lg.tsx new file mode 100644 index 00000000..93304c9f --- /dev/null +++ b/src/components/images/logo-lg.tsx @@ -0,0 +1,54 @@ +import {HtmlHTMLAttributes} from "react"; + +type Props = HtmlHTMLAttributes & { + height?: number + width?: number +} + +const PressFooterLogoLg = ({height = 89, width = 579, ...props}: Props) => { + if (height != 89 && width == 579) { + width *= height / 89 + } + + if (height == 89 && width != 579) { + height *= width / 579 + } + + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) +} + +export default PressFooterLogoLg; \ No newline at end of file diff --git a/src/components/images/logo-xs.tsx b/src/components/images/logo-xs.tsx new file mode 100644 index 00000000..c1cd036c --- /dev/null +++ b/src/components/images/logo-xs.tsx @@ -0,0 +1,55 @@ +import {HtmlHTMLAttributes} from "react"; + +type Props = HtmlHTMLAttributes & { + height?: number + width?: number +} + +const PressFooterLogoXs = ({height = 91, width = 426, ...props}: Props) => { + if (height != 91 && width == 426) { + width *= height / 91 + } + + if (height == 91 && width != 426) { + height *= width / 426 + } + + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) +} + +export default PressFooterLogoXs; \ No newline at end of file diff --git a/src/components/images/logo.svg b/src/components/images/logo.svg new file mode 100644 index 00000000..83053a8e --- /dev/null +++ b/src/components/images/logo.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/styles/fonts.tsx b/src/styles/fonts.tsx index 7f897512..889cbafd 100644 --- a/src/styles/fonts.tsx +++ b/src/styles/fonts.tsx @@ -1,7 +1,12 @@ -import {Source_Sans_3} from "next/font/google"; +import {Montserrat, Source_Sans_3} from "next/font/google"; export const sourceSans3 = Source_Sans_3({ subsets: ["latin"], display: "swap", variable: "--font-sans", +}) +export const montserrat = Montserrat({ + subsets: ["latin"], + display: "swap", + variable: "--font-sans", }) \ No newline at end of file diff --git a/src/styles/typography/local-footer.tsx b/src/styles/typography/local-footer.tsx index 063b64dc..32d7d302 100644 --- a/src/styles/typography/local-footer.tsx +++ b/src/styles/typography/local-footer.tsx @@ -3,15 +3,27 @@ module.exports = function () { return function ({addComponents}) { const components = { ".local-footer": { + color: "white", "h2": { - fontSize: "1.5em", + fontSize: "1.2em", + "a": { + "&:hover": { + color: "#8AB8A7", + textDecorationThickness: "2px", + }, + } }, "h3": { fontSize: "1.3em", }, "h4": { fontSize: "1.1em", - } + }, + "ul": { + color: "#fff", + listStyle: "none", + paddingLeft: "0", + }, }, };