Skip to content

Commit e7cf828

Browse files
Replace fonts loaded via stylesheet with use of next/font (#2600)
Solves #1832 I wasn't sure to use local font or just use google font. I can undo that change if use of Google font is undesirable
1 parent 6ebcd3b commit e7cf828

File tree

11 files changed

+14
-30
lines changed

11 files changed

+14
-30
lines changed

website/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@marsidev/react-turnstile": "^0.0.7",
3838
"@next-auth/prisma-adapter": "^1.0.5",
3939
"@next/bundle-analyzer": "^13.2.4",
40-
"@next/font": "^13.2.4",
40+
"@next/font": "13.0.6",
4141
"@nikolovlazar/chakra-ui-prose": "^1.2.1",
4242
"@prisma/client": "^4.11.0",
4343
"@tailwindcss/forms": "^0.5.3",
-239 KB
Binary file not shown.
-222 KB
Binary file not shown.

website/src/components/Header/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export function Header({ preLogoSlot }: HeaderProps) {
9898
{preLogoSlot}
9999
<Flex as={Link} gap="3" href={homeURL} aria-label="Home" alignItems="center">
100100
<Image src="/images/logos/logo.svg" className="mx-auto object-fill" width="50" height="50" alt="logo" />
101-
<Text fontFamily="inter" fontSize={["lg", "2xl"]} fontWeight="bold" className="hidden sm:block">
101+
<Text fontSize={["lg", "2xl"]} fontWeight="bold" className="hidden sm:block">
102102
{t("title")}
103103
</Text>
104104
</Flex>

website/src/components/SideMenu.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export function SideMenu({ items, collapsed }: SideMenuProps) {
5151
return (
5252
<Tooltip
5353
key={item.labelID}
54-
fontFamily="inter"
5554
label={label}
5655
placement="right"
5756
className={clsx("hidden sm:block", { "lg:hidden": !collapsed })}

website/src/pages/privacy-policy.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ const PrivacyPolicy = () => {
168168
<title>Privacy Policy - Open Assistant</title>
169169
<meta name="description" content="Open Assistant's Privacy Policy" />
170170
</Head>
171-
<Box fontFamily="Inter" p="6" className="oa-basic-theme">
171+
<Box p="6" className="oa-basic-theme">
172172
<Box className="max-w-4xl mx-auto">
173173
<Stack spacing="6" mb="6">
174174
<Heading as="h1" size="xl" color="blue.500">

website/src/pages/team.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const Team = () => {
1717
<title>{`${t("who_are_we")} - Open Assistant`}</title>
1818
<meta name="description" content="The team behind Open Assistant" />
1919
</Head>
20-
<Box fontFamily="Inter" p="6" className="oa-basic-theme">
20+
<Box p="6" className="oa-basic-theme">
2121
<Stack className="max-w-6xl mx-auto" spacing="6" mb="6">
2222
<Heading as="h1" size="xl" color="blue.500">
2323
{t("who_are_we")}

website/src/pages/terms-of-service.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const TermsOfServicePage = () => {
1010
<title>Terms of Service - Open Assistant</title>
1111
<meta name="description" content="Open Assistant's Terms of Service" />
1212
</Head>
13-
<Box fontFamily="Inter" p="6" className="oa-basic-theme">
13+
<Box p="6" className="oa-basic-theme">
1414
<Box className="max-w-4xl mx-auto">
1515
<Heading as="h1" size="xl" color="blue.500" mb="6">
1616
Terms of Service

website/src/styles/Theme/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import { badgeTheme } from "./components/Badge";
77
import { cardTheme } from "./components/Card";
88
import { containerTheme } from "./components/Container";
99
import { tableTheme } from "./components/Table";
10+
import { Inter } from "@next/font/google";
11+
12+
const inter = Inter({ subsets: ["latin"] });
1013

1114
const config: ThemeConfig = {
1215
initialColorMode: "light",
@@ -30,8 +33,8 @@ const breakpoints = {
3033
};
3134

3235
const fonts = {
33-
heading: "Inter",
34-
body: "Inter",
36+
heading: inter.style.fontFamily,
37+
body: inter.style.fontFamily,
3538
};
3639

3740
const styles: Styles = {

0 commit comments

Comments
 (0)