Skip to content

Commit

Permalink
font fallback to arial or system ui font
Browse files Browse the repository at this point in the history
  • Loading branch information
ridhozhr10 committed May 16, 2024
1 parent 2a7bc75 commit 10e12f1
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/app/_components/layout/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Logo = ({ text }: { text?: string }) => (
<div>
<span>&gt;</span>
<span>$</span>
{text ? (
{text !== undefined ? (
<span
style={{ animationTimingFunction: `steps(${text.length + 3}, end)` }}
>
Expand Down
8 changes: 5 additions & 3 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import { Inter, IBM_Plex_Mono } from "next/font/google";
import "./globals.css";

const inter = Inter({
subsets: ["latin"],
weight: ["400", "600", "700"],
display: "swap",
variable: "--font-inter",
});

export const metadata: Metadata = {
Expand All @@ -18,8 +20,8 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
<html lang="en" className={inter.className}>
<body>{children}</body>
<html lang="en">
<body className={`${inter.variable} font-sans`}>{children}</body>
</html>
);
}
2 changes: 1 addition & 1 deletion src/app/loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import BaseLayout from "./_components/layout/BaseLayout";

export default function Loading() {
return (
<BaseLayout>
<BaseLayout logoText="">
<BiLoader className="animate-spin" />
</BaseLayout>
);
Expand Down
4 changes: 2 additions & 2 deletions src/app/projects/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ export const metadata = {

export default function Project() {
return (
<BaseLayout>
<BaseLayout logoText="ls ~/Workspaces">
<main>
<h1 className="text-5xl">ls ~/Workspaces</h1>
<h1 className="text-5xl">Coming Soon</h1>
</main>
</BaseLayout>
);
Expand Down
12 changes: 11 additions & 1 deletion tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,17 @@ const config: Config = {
},
extend: {
fontFamily: {
mono: "monospace, monospace",
mono: ["monospace", "monospace"],
sans: [
"var(--font-inter)",
"-apple-system",
"BlinkMacSystemFont",
"Roboto",
"Segoe UI",
"Helvetica",
"Arial",
"sans-serif",
],
},
colors: {
"header-bg-dark": "#1b1c1d",
Expand Down

0 comments on commit 10e12f1

Please sign in to comment.