Skip to content

Commit

Permalink
Remove old mooc.fi logo, add new logo and new favicon (#1269)
Browse files Browse the repository at this point in the history
  • Loading branch information
Redande authored Dec 9, 2024
1 parent 871138e commit 4151fd3
Show file tree
Hide file tree
Showing 8 changed files with 2,837 additions and 25 deletions.
12 changes: 1 addition & 11 deletions frontend/components/NewLayout/Courses/CourseCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import Sponsors from "./Sponsors"
import { DifficultyTags, LanguageTags, ModuleTags } from "./Tags"
import Tooltip from "/components/Tooltip"
import { useTranslator } from "/hooks/useTranslator"
import MoocLogoIcon from "/public/images/new/logos/moocfi_white.svg?icon"
import { fontSize } from "/src/theme/util"
import CommonTranslations from "/translations/common"
import { useFormatDateTime } from "/util/dataFormatFunctions"
Expand Down Expand Up @@ -260,13 +259,6 @@ const StyledHelpIcon = styled(HelpIcon)`
}
`

const MoocLogo = styled(MoocLogoIcon)`
fill: #fff;
opacity: 0.5;
width: 160%;
height: 160%;
`

const iconStyle = css`
display: flex;
width: 19px;
Expand Down Expand Up @@ -387,9 +379,7 @@ function CourseCardLayout({
}: CourseCardLayoutProps) {
return (
<CardContainer>
<ModuleColor studyModule={studyModule} ended={ended}>
<MoocLogo viewBox="0 0 257.37 235.365" />
</ModuleColor>
<ModuleColor studyModule={studyModule} ended={ended} />
<ContentContainer>
<TextContainer>
<Title variant="h3">
Expand Down
27 changes: 13 additions & 14 deletions frontend/components/NewLayout/Header/MoocLogo.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
import { Link, Typography } from "@mui/material"
import { Link } from "@mui/material"
import { styled } from "@mui/material/styles"

import MoocLogoFilled from "../Icons/MoocLogoFilled"
import { fontSize } from "/src/theme/util"
import MoocTextLogo from "../Icons/MoocTextLogo"

const MoocLogoText = styled(Typography)(
({ theme }) => `
${fontSize(24, 24)}
font-weight: 700;
color: ${theme.palette.common.brand.nearlyBlack};
letter-spacing: -0.6px;
const MoocLogoWrapper = styled("div")<{ height: number }>(
({ theme, height }) => `
height: ${height}px;
display: flex;
align-items: center;
${theme.breakpoints.up("md")} {
${fontSize(28, 28)}
height: ${height * 1.5}px;
}
${theme.breakpoints.up("xl")} {
${fontSize(32, 32)}
letter-spacing: -0.8px;
height: ${height * 2}px;
}
`,
)
Expand All @@ -30,10 +27,12 @@ const MoocLogoLink = styled(Link)`
cursor: pointer;
}
`

const MoocLogo = () => (
<MoocLogoLink href="/" aria-label="MOOC.fi homepage">
<MoocLogoFilled sx={{ fontSize: "3rem", marginRight: "0.5rem" }} />
<MoocLogoText>MOOC.fi</MoocLogoText>
<MoocLogoWrapper height={24}>
<MoocTextLogo height={24} />
</MoocLogoWrapper>
</MoocLogoLink>
)

Expand Down
13 changes: 13 additions & 0 deletions frontend/components/NewLayout/Icons/MoocTextLogo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Image from "next/image"

import MoocLogo from "/public/images/new/logos/moocfi_text.svg"

type LogoProps = {
height?: number
}

const MoocTextLogo = ({ height }: LogoProps) => {
return <Image src={MoocLogo} alt="Mooc.fi logo" height={height} />
}

export default MoocTextLogo
Binary file modified frontend/public/favicon.ico
Binary file not shown.
3 changes: 3 additions & 0 deletions frontend/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/images/new/logos/moocfi_text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,807 changes: 2,807 additions & 0 deletions frontend/public/images/new/logos/moocfi_text.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/old_favicon.ico
Binary file not shown.

0 comments on commit 4151fd3

Please sign in to comment.