Skip to content

Commit

Permalink
Replace Inter font with Atkinson Hyperlegible (#98)
Browse files Browse the repository at this point in the history
Closes #73
  • Loading branch information
samglover authored Sep 25, 2024
1 parent 7ee3198 commit 1416a6b
Show file tree
Hide file tree
Showing 7 changed files with 6,373 additions and 8,872 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open [http://localhost:3000](http://localhost:3000) with your browser to see the

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Atkinson Hyperlegible, a custom Google Font.

## Form Sources Config

Expand Down
258 changes: 134 additions & 124 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@fontsource/inter": "^5.0.17",
"@fontsource/atkinson-hyperlegible": "^5.1.0",
"@fortawesome/fontawesome-free": "^6.4.0",
"@fortawesome/fontawesome-svg-core": "^6.5.1",
"@fortawesome/free-solid-svg-icons": "^6.4.0",
Expand Down
Binary file removed src/app/fonts/Inter-Bold.ttf
Binary file not shown.
34 changes: 11 additions & 23 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,13 @@
* Font
*/

@font-face {
font-family: 'Inter';
src: url('/fonts/Inter-Bold.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}

body {
font-family: 'Inter';
}

h1,
h2,
h3,
h4,
h5,
.logo-text {
font-family: 'Inter', Arial, Helvetica, sans-serif;
font-weight: 600;
}

/**
* Layout
*/

@media (max-width: 576px) {
h1.text-center {
text-align: left !important;
}
font-weight: bold;
}

/**
Expand All @@ -54,3 +32,13 @@ h5,
.body-container:has(#affiliates-section:last-child) {
padding-bottom: 0 !important;
}

/**
* Responsive changes
*/

@media (max-width: 576px) {
h1.text-center {
text-align: left !important;
}
}
22 changes: 18 additions & 4 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
import { Inter } from 'next/font/google';
import { Atkinson_Hyperlegible } from 'next/font/google';
import Script from 'next/script';

import NavigationBar from './components/NavigationBar';
import Footer from './components/Footer';

import 'bootstrap/dist/css/bootstrap.css';
import '@fortawesome/fontawesome-free/css/all.min.css';
import '@fontsource/inter/700.css'; // Bold weight
import './globals.css';

const inter = Inter({ subsets: ['latin'] });
const AtkinsonHyperLegible = Atkinson_Hyperlegible({
subsets: ['latin'],
weight: ['400', '700'],
adjustFontFallback: false,
fallback: [
'system-ui',
'-apple-system',
'Segoe UI',
'Roboto',
'Helvetica Neue',
'Arial',
'Noto Sans',
'Liberation Sans',
'sans-serif',
],
});

export const metadata = {
title: 'Court Forms Online',
Expand All @@ -24,7 +38,7 @@ export default function RootLayout({
}) {
return (
<html lang="en">
<body className={inter.className}>
<body className={AtkinsonHyperLegible.className}>
<NavigationBar />
<div className="body-container py-5">{children}</div>
<Footer />
Expand Down
Loading

0 comments on commit 1416a6b

Please sign in to comment.