Skip to content

Commit

Permalink
updated header (#1622)
Browse files Browse the repository at this point in the history
* update logged out view

* Clean up MIT logo links

* use Link component

* search icon and nav menu button opacity on hover

* user menu style

* get rid of text based mit learn logo and replace with SVG

* fix vertical alignment

* adjust minimum height of mui toolbar to fit design, adjust search icon hitbox

* fix height of usermenu container

* fix nav drawer top padding

* fix header shadow

* remove manual width of user menu popover and anchor it to the left side of the trigger

* add hover underline to user menu popover links

* mobile styling fixes

* fix footer tests
  • Loading branch information
gumaerc authored Oct 1, 2024
1 parent ebb63e3 commit 1ede734
Show file tree
Hide file tree
Showing 24 changed files with 263 additions and 202 deletions.
11 changes: 4 additions & 7 deletions frontends/mit-learn/public/images/mit-learn-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions frontends/mit-learn/public/images/mit-logo-learn-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 0 additions & 17 deletions frontends/mit-learn/public/images/mit-logo-transparent2.svg

This file was deleted.

17 changes: 0 additions & 17 deletions frontends/mit-learn/public/images/mit-logo-transparent3.svg

This file was deleted.

35 changes: 0 additions & 35 deletions frontends/mit-learn/public/images/mit-logo-transparent4.svg

This file was deleted.

Binary file not shown.
Binary file not shown.
17 changes: 0 additions & 17 deletions frontends/mit-learn/public/images/mit-logo-transparent5.svg

This file was deleted.

14 changes: 14 additions & 0 deletions frontends/mit-learn/public/images/mit-logo-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 9 additions & 4 deletions frontends/mit-learn/src/page-components/Footer/Footer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@ import Footer from "./Footer"
import React from "react"
import { ThemeProvider } from "ol-components"
import * as urls from "@/common/urls"
import { MemoryRouter } from "react-router"

describe("Footer", () => {
test("Renders the appropriate text and links", async () => {
render(<Footer />, {
wrapper: ThemeProvider,
})
render(
<MemoryRouter>
<ThemeProvider>
<Footer />
</ThemeProvider>
</MemoryRouter>,
)
interface Links {
[key: string]: string
}
const expectedLinks: Links = {
// key is blank here because the link is an image
"": "https://mit.edu/",
"": "https://www.mit.edu/",
Home: urls.HOME,
"About Us": urls.ABOUT,
Accessibility: urls.ACCESSIBILITY,
Expand Down
7 changes: 2 additions & 5 deletions frontends/mit-learn/src/page-components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Container, styled } from "ol-components"
import { MITLogoLink } from "ol-utilities"
import * as urls from "@/common/urls"
import React, { FunctionComponent } from "react"
import MITLogoLink from "../MITLogoLink/MITLogoLink"

const PUBLIC_URL = APP_SETTINGS.PUBLIC_URL
const HOME_URL = `${PUBLIC_URL}/`
Expand Down Expand Up @@ -147,10 +147,7 @@ const Footer: FunctionComponent = () => {
<FooterContainerInner>
<FooterContent>
<FooterLeftContainer>
<FooterLogo
href="https://mit.edu/"
src="/static/images/mit_logo_std_cmyk_black.svg"
/>
<FooterLogo href="https://www.mit.edu/" target="_blank" />
<FooterAddress data-testid="footer-address">
Massachusetts Institute of Technology
<br />
Expand Down
Loading

0 comments on commit 1ede734

Please sign in to comment.