-
Notifications
You must be signed in to change notification settings - Fork 3
Image and video optimizations #1769
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
Changes from 14 commits
1687bfb
28f4207
a3be265
56e3dc5
2f1f01f
0fbacef
20f0f05
18fee78
3164d75
8dc2db9
92e8cd4
ec40724
b96fb61
f4d8056
4e4af0a
f5e916f
d66ab6e
f97d90f
eb5b317
00ef518
8bb8dcb
cb37c04
d75212a
0ce9cf9
e38f0d9
1086dde
36a3982
c868b00
9386f27
6ed1589
9fc386a
97ad4b8
186b748
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,15 +8,16 @@ import { | |
| BannerBackground, | ||
| Typography, | ||
| VisuallyHidden, | ||
| PlatformLogo, | ||
| } from "ol-components" | ||
| import { OfferedByEnum, SourceTypeEnum } from "api" | ||
| import { SearchSubscriptionToggle } from "@/page-components/SearchSubscriptionToggle/SearchSubscriptionToggle" | ||
| import { ChannelDetails } from "@/page-components/ChannelDetails/ChannelDetails" | ||
| import { useChannelDetail } from "api/hooks/channels" | ||
| import ChannelMenu from "@/components/ChannelMenu/ChannelMenu" | ||
| import ResourceCarousel, { | ||
| ResourceCarouselProps, | ||
| } from "@/page-components/ResourceCarousel/ResourceCarousel" | ||
| import { SourceTypeEnum } from "api" | ||
| import { getSearchParamMap } from "@/common/utils" | ||
| import { HOME as HOME_URL, UNITS as UNITS_URL } from "../../common/urls" | ||
| import { ChannelTypeEnum } from "api/v0" | ||
|
|
@@ -38,16 +39,24 @@ const FeaturedCoursesCarousel = styled(ResourceCarousel)(({ theme }) => ({ | |
| }, | ||
| })) | ||
|
|
||
| const UnitLogo = styled.img(({ theme }) => ({ | ||
| filter: "saturate(0%) invert(100%)", | ||
| maxWidth: "100%", | ||
| width: "auto", | ||
| height: "50px", | ||
| const MobileOnly = styled.div(({ theme }) => ({ | ||
| display: "contents", | ||
| [theme.breakpoints.up("md")]: { | ||
| display: "none", | ||
| }, | ||
| })) | ||
|
|
||
| const DesktopOnly = styled.div(({ theme }) => ({ | ||
| display: "contents", | ||
| [theme.breakpoints.down("md")]: { | ||
| height: "40px", | ||
| display: "none", | ||
| }, | ||
| })) | ||
|
|
||
| const PlatformLogoInverted = styled(PlatformLogo)({ | ||
| filter: "saturate(0%) invert(100%)", | ||
| }) | ||
|
|
||
| const BannerContent = styled.div(({ theme }) => ({ | ||
| display: "flex", | ||
| flexDirection: "row", | ||
|
|
@@ -126,7 +135,20 @@ const UnitChannelTemplate: React.FC<UnitChannelTemplateProps> = ({ | |
| <ChannelHeader> | ||
| <VisuallyHidden>{channel.data?.title}</VisuallyHidden> | ||
| {channel.data ? ( | ||
| <UnitLogo alt="" src={displayConfiguration.logo} /> | ||
| <> | ||
| <DesktopOnly> | ||
| <PlatformLogoInverted | ||
| unitCode={name as OfferedByEnum} | ||
| height={50} | ||
| /> | ||
| </DesktopOnly> | ||
| <MobileOnly> | ||
| <PlatformLogoInverted | ||
| unitCode={name as OfferedByEnum} | ||
| height={40} | ||
| /> | ||
| </MobileOnly> | ||
|
||
| </> | ||
| ) : null} | ||
| </ChannelHeader> | ||
| <Stack gap={{ xs: "16px", lg: "32px" }}> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ import { | |
| RiTerminalBoxLine, | ||
| } from "@remixicon/react" | ||
| import { HOME } from "@/common/urls" | ||
|
|
||
| import backgroundSteps from "@/public/images/backgrounds/background_steps.jpg" | ||
| import { aggregateProgramCounts, aggregateCourseCounts } from "@/common/utils" | ||
| import { useChannelCounts } from "api/hooks/channels" | ||
|
|
||
|
|
@@ -201,7 +201,6 @@ const DepartmentListingPage: React.FC = () => { | |
| return ( | ||
| <> | ||
| <Banner | ||
| backgroundUrl="/images/backgrounds/background_steps.jpg" | ||
| title="Browse by Academic Department" | ||
| header="At MIT, academic departments span a wide range of disciplines, from science and engineering to humanities. Select a department below to explore all of its non-degree learning offerings." | ||
| navText={ | ||
|
|
@@ -211,6 +210,7 @@ const DepartmentListingPage: React.FC = () => { | |
| current="Departments" | ||
| /> | ||
| } | ||
| backgroundUrl={backgroundSteps.src} | ||
|
||
| /> | ||
| <Container> | ||
| <Grid container> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,13 +15,13 @@ import { | |
| } from "ol-components" | ||
| import Link from "next/link" | ||
| import { propsNotNil } from "ol-utilities" | ||
|
|
||
| import { useLearningResourceTopics } from "api/hooks/learningResources" | ||
| import { LearningResourceTopic } from "api" | ||
| import RootTopicIcon from "@/components/RootTopicIcon/RootTopicIcon" | ||
| import { HOME } from "@/common/urls" | ||
| import { aggregateProgramCounts, aggregateCourseCounts } from "@/common/utils" | ||
| import { useChannelCounts } from "api/hooks/channels" | ||
| import backgroundSteps from "@/public/images/backgrounds/background_steps.jpg" | ||
|
|
||
| type ChannelSummary = { | ||
| id: number | string | ||
|
|
@@ -275,6 +275,7 @@ const TopicsListingPage: React.FC = () => { | |
| } | ||
| title="Browse by Topic" | ||
| header="Select a topic below to explore relevant learning resources across all Academic and Professional units." | ||
| backgroundUrl={backgroundSteps.src} | ||
|
||
| /> | ||
| <Container> | ||
| <Grid container> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
today i learn...