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

SUM-45 | @rebeccahongsf | Theme & style header #3

Merged
merged 21 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from 16 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
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} {...siteSettingsConfig}/>
rebeccahongsf marked this conversation as resolved.
Show resolved Hide resolved
</div>
</header>
)
Expand Down
Loading