Skip to content

Commit

Permalink
SUM-45 Theme & style header (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccahongsf authored May 6, 2024
1 parent 83a8a12 commit 94c2f84
Show file tree
Hide file tree
Showing 3 changed files with 202 additions and 108 deletions.
32 changes: 14 additions & 18 deletions src/components/elements/lockup/lockup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,17 @@ export const Lockup = ({

if (!suLockupEnabled) {
return (
<div className="py-10">
<Link href="/" className="flex no-underline">
<div className="self-end">
<div className="lg:inline-block pr-2 mr-2 lg:border-r border-black">
<LockupLogo {...lockupProps}/>
</div>
<div
className="lg:inline-block font-normal text-black text-m2">
{suSiteName || "University"}
</div>
<Link href="/" className="flex no-underline">
<div className="self-end">
<div className="lg:inline-block pr-2 mr-2 lg:border-r border-black">
<LockupLogo {...lockupProps}/>
</div>
</Link>
</div>
<div
className="lg:inline-block font-normal text-black text-m2">
{suSiteName || "University"}
</div>
</div>
</Link>
)
}

Expand Down Expand Up @@ -99,12 +97,10 @@ export const Lockup = ({
case "none":
default:
return (
<div className="py-10">
<Link href="/"
className="flex flex-col lg:flex-row gap-4 no-underline">
<LockupLogo {...lockupProps}/>
</Link>
</div>
<Link href="/"
className="flex flex-col lg:flex-row gap-4 no-underline">
<LockupLogo {...lockupProps}/>
</Link>
)
}
}
Expand Down
20 changes: 12 additions & 8 deletions src/components/global/page-header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import SiteSearchForm from "@components/search/site-search-form";
import MainMenu from "@components/menu/main-menu";
import GlobalMessage from "@components/config-pages/global-message";
import Lockup from "@components/elements/lockup/lockup";
Expand All @@ -10,6 +9,7 @@ import {
StanfordGlobalMessage
} from "@lib/gql/__generated__/drupal.d";
import {isPreviewMode} from "@lib/drupal/utils";
import Button from "@components/elements/button";

const PageHeader = async () => {
const menuItems = await getMenu(MenuAvailable.Main, isPreviewMode());
Expand All @@ -30,15 +30,19 @@ const PageHeader = async () => {
</div>
</div>
{globalMessageConfig && <GlobalMessage {...globalMessageConfig}/>}
<div className="relative shadow">
<div className="centered min-h-50 pr-24 lg:pr-0">
<div className="flex w-full justify-between">
<Lockup {...siteSettingsConfig} {...lockupSettingsConfig}/>
<SiteSearchForm className="hidden lg:block"/>
<div className="relative bg-fog-light">
<div className="w-full border-b-2 lg:border-b-0">
<div className="centered min-h-50 pr-24 rs-py-2 lg:pr-0">
<div className="flex w-full justify-between">
<Lockup {...siteSettingsConfig} {...lockupSettingsConfig} />
<div className="hidden lg:block">
{siteSettingsConfig && siteSettingsConfig.sumSiteHeaderPrim && <Button href={siteSettingsConfig.sumSiteHeaderPrim.url} secondary>{siteSettingsConfig.sumSiteHeaderPrim.title}</Button>}
{siteSettingsConfig && siteSettingsConfig.sumSiteHeaderSec && <Button href={siteSettingsConfig.sumSiteHeaderSec.url}>{siteSettingsConfig.sumSiteHeaderSec.title}</Button>}
</div>
</div>
</div>
</div>

<MainMenu menuItems={menuItems}/>
<MainMenu menuItems={menuItems} sumSiteHeaderPrim={siteSettingsConfig?.sumSiteHeaderPrim} sumSiteHeaderSec={siteSettingsConfig?.sumSiteHeaderSec}/>
</div>
</header>
)
Expand Down
Loading

0 comments on commit 94c2f84

Please sign in to comment.