Skip to content

Commit

Permalink
fixup font
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccahongsf committed Apr 22, 2024
1 parent 6bb4538 commit d9d5309
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import BackToTop from "@components/elements/back-to-top";
import PageFooter from "@components/global/page-footer";
import PageHeader from "@components/global/page-header";
import {Icon} from "next/dist/lib/metadata/types/metadata-types";
import {sourceSans3} from "../src/styles/fonts";
import { roboto, sourceSans3} from "../src/styles/fonts";
import DrupalWindowSync from "@components/elements/drupal-window-sync";
import {isPreviewMode} from "@lib/drupal/utils";
import UserAnalytics from "@components/elements/user-analytics";
import clsx from "clsx";

const appleIcons: Icon[] = [60, 72, 76, 114, 120, 144, 152, 180].map(size => ({
url: `https://www-media.stanford.edu/assets/favicon/apple-touch-icon-${size}x${size}.png`,
Expand Down Expand Up @@ -45,7 +46,7 @@ export const revalidate = false;
const RootLayout = ({children, modal}: { children: React.ReactNode, modal: React.ReactNode }) => {
const isPreview = isPreviewMode();
return (
<html lang="en" className={sourceSans3.className}>
<html lang="en" className={clsx(sourceSans3.className, roboto.variable)}>
{/* Add Google Analytics and SiteImprove when not in preview mode. */}
{!isPreview &&
<UserAnalytics/>
Expand Down
2 changes: 1 addition & 1 deletion src/styles/fonts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ export const roboto = Roboto({
subsets: ["latin"],
display: "swap",
variable: "--font-roboto",
weight: "100",
weight: "400"
});
5 changes: 4 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ module.exports = {
},
scale: {
'-100': '-1'
}
},
fontFamily: {
roboto: ['var(--font-roboto)', 'sans-serif'],
},
},
},
plugins: [
Expand Down

0 comments on commit d9d5309

Please sign in to comment.