Skip to content

Commit

Permalink
Update fonts (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
TyHil authored Nov 15, 2023
1 parent c68f560 commit 3d24dbe
Show file tree
Hide file tree
Showing 23 changed files with 100 additions and 138 deletions.
4 changes: 2 additions & 2 deletions components/common/SearchBar/searchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const SearchBar = (props: SearchProps) => {
<Autocomplete
autoHighlight={true}
disabled={props.disabled}
className="w-full h-12 bg-primary-light font-sans"
className="w-full h-12 bg-primary-light"
open={open}
onOpen={() => {
setOpen(true);
Expand Down Expand Up @@ -115,7 +115,7 @@ export const SearchBar = (props: SearchProps) => {
ref={params.InputProps.ref}
inputProps={params.inputProps}
fullWidth={true}
className="font-sans w-full h-12 bg-primary-light text-gray-600 dark:text-gray-200 placeholder-dark"
className="w-full h-12 bg-primary-light text-gray-600 dark:text-gray-200 placeholder-dark"
placeholder="Search course, professor, or both...."
startAdornment={
<InputAdornment position="start">
Expand Down
6 changes: 4 additions & 2 deletions components/graph/BoxGraph/BoxGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ export function BoxGraph(props: GraphProps) {
title: {
text: props.title,
align: 'left',
style: {
fontFamily: 'inherit',
},
},
noData: {
text: 'Please select a class to add',
Expand All @@ -111,9 +114,8 @@ export function BoxGraph(props: GraphProps) {
offsetX: 0,
offsetY: 0,
style: {
color: undefined,
fontSize: '14px',
fontFamily: undefined,
fontFamily: 'inherit',
},
},
theme: {
Expand Down
6 changes: 4 additions & 2 deletions components/graph/HorizontalBarGraph/HorizontalBarGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ export function HorizontalBarGraph(props: GraphProps) {
title: {
text: props.title,
align: 'left',
style: {
fontFamily: 'inherit',
},
},
noData: {
text: 'Please select a class to add',
Expand All @@ -86,9 +89,8 @@ export function HorizontalBarGraph(props: GraphProps) {
offsetX: 0,
offsetY: 0,
style: {
color: undefined,
fontSize: '14px',
fontFamily: undefined,
fontFamily: 'inherit',
},
},
theme: {
Expand Down
6 changes: 4 additions & 2 deletions components/graph/LineGraph/LineGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ export function LineGraph(props: GraphProps) {
title: {
text: props.title,
align: 'left',
style: {
fontFamily: 'inherit',
},
},
noData: {
text: 'Please select a class to add',
Expand All @@ -79,9 +82,8 @@ export function LineGraph(props: GraphProps) {
offsetX: 0,
offsetY: 0,
style: {
color: undefined,
fontSize: '14px',
fontFamily: undefined,
fontFamily: 'inherit',
},
},
theme: {
Expand Down
6 changes: 4 additions & 2 deletions components/graph/RadarChart/RadarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ export function RadarChart(props: GraphProps) {
title: {
text: props.title,
align: 'left',
style: {
fontFamily: 'inherit',
},
},
noData: {
text: 'Please select a class to add',
Expand All @@ -68,9 +71,8 @@ export function RadarChart(props: GraphProps) {
offsetX: 0,
offsetY: 0,
style: {
color: undefined,
fontSize: '14px',
fontFamily: undefined,
fontFamily: 'inherit',
},
},
theme: {
Expand Down
6 changes: 4 additions & 2 deletions components/graph/RadialBarChart/RadialBarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ export function RadialBarChart(props: GraphProps) {
title: {
text: props.title,
align: 'left',
style: {
fontFamily: 'inherit',
},
},
noData: {
text: 'Please select a class to add',
Expand All @@ -69,9 +72,8 @@ export function RadialBarChart(props: GraphProps) {
offsetX: 0,
offsetY: 0,
style: {
color: undefined,
fontSize: '14px',
fontFamily: undefined,
fontFamily: 'inherit',
},
},
plotOptions: {
Expand Down
6 changes: 4 additions & 2 deletions components/graph/VerticalBarGraph/VerticalBarGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ export function VerticalBarGraph(props: GraphProps) {
title: {
text: props.title,
align: 'left',
style: {
fontFamily: 'inherit',
},
},
noData: {
text: 'Please select a class to add',
Expand All @@ -81,9 +84,8 @@ export function VerticalBarGraph(props: GraphProps) {
offsetX: 0,
offsetY: 0,
style: {
color: undefined,
fontSize: '14px',
fontFamily: undefined,
fontFamily: 'inherit',
},
},
theme: {
Expand Down
Binary file added fonts/Kallisto/Kallisto Bold Italic.otf
Binary file not shown.
Binary file added fonts/Kallisto/Kallisto Bold.otf
Binary file not shown.
Binary file added fonts/Kallisto/Kallisto Heavy Italic.otf
Binary file not shown.
Binary file added fonts/Kallisto/Kallisto Heavy.otf
Binary file not shown.
Binary file added fonts/Kallisto/Kallisto Light Italic.otf
Binary file not shown.
Binary file added fonts/Kallisto/Kallisto Light.otf
Binary file not shown.
Binary file added fonts/Kallisto/Kallisto Medium Italic.otf
Binary file not shown.
Binary file added fonts/Kallisto/Kallisto Medium.otf
Binary file not shown.
Binary file added fonts/Kallisto/Kallisto Thin Italic.otf
Binary file not shown.
Binary file added fonts/Kallisto/Kallisto Thin.otf
Binary file not shown.
69 changes: 68 additions & 1 deletion pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,71 @@ import { Card, IconButton, Tooltip, useMediaQuery } from '@mui/material';
import { createTheme, ThemeProvider } from '@mui/material/styles';
import { Analytics } from '@vercel/analytics/react';
import type { AppProps } from 'next/app';
import { Inter } from 'next/font/google';
import localFont from 'next/font/local';
import Head from 'next/head';
import React from 'react';

const inter = Inter({
subsets: ['latin'],
variable: '--font-inter',
});
const kallisto = localFont({
src: [
{
path: '../fonts/Kallisto/Kallisto Thin.otf',
weight: '100',
style: 'normal',
},
{
path: '../fonts/Kallisto/Kallisto Thin Italic.otf',
weight: '100',
style: 'italic',
},
{
path: '../fonts/Kallisto/Kallisto Light.otf',
weight: '300',
style: 'normal',
},
{
path: '../fonts/Kallisto/Kallisto Light Italic.otf',
weight: '300',
style: 'italic',
},
{
path: '../fonts/Kallisto/Kallisto Medium.otf',
weight: '500',
style: 'normal',
},
{
path: '../fonts/Kallisto/Kallisto Medium Italic.otf',
weight: '500',
style: 'italic',
},
{
path: '../fonts/Kallisto/Kallisto Bold.otf',
weight: '700',
style: 'normal',
},
{
path: '../fonts/Kallisto/Kallisto Bold Italic.otf',
weight: '700',
style: 'italic',
},
{
path: '../fonts/Kallisto/Kallisto Heavy.otf',
weight: '900',
style: 'normal',
},
{
path: '../fonts/Kallisto/Kallisto Heavy Italic.otf',
weight: '900',
style: 'italic',
},
],
variable: '--font-kallisto',
});

function MyApp({ Component, pageProps }: AppProps) {
const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)');

Expand All @@ -25,6 +87,9 @@ function MyApp({ Component, pageProps }: AppProps) {
main: '#7486ce',
},
},
typography: {
fontFamily: 'inherit',
},
});

return (
Expand Down Expand Up @@ -52,7 +117,9 @@ function MyApp({ Component, pageProps }: AppProps) {
<link rel="manifest" href="/site.webmanifest" />
</Head>
<ThemeProvider theme={muiTheme}>
<Component {...pageProps} />
<main className={inter.variable + ' ' + kallisto.variable}>
<Component {...pageProps} />
</main>
</ThemeProvider>
<Analytics />
{showGitInfo ? (
Expand Down
2 changes: 1 addition & 1 deletion pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function Document() {
<meta name="twitter:card" content="summary" />
<meta name="twitter:domain" content="trends.utdnebula.com" />
</Head>
<body>
<body className="font-inter">
<Main />
<NextScript />
</body>
Expand Down
2 changes: 1 addition & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const Home: NextPage = () => {
/>
</div>
<div className="text-center pb-2">
<h2 className="text-headline4 text-light-always">
<h2 className="text-headline4 text-light-always font-kallisto">
Welcome to UTD Trends!
</h2>
</div>
Expand Down
116 changes: 0 additions & 116 deletions styles/Home.module.css

This file was deleted.

2 changes: 0 additions & 2 deletions styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ body {
margin: 0;
height: 100%;
width: 100%;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
background-color: rgb(var(--light-DEFAULT));
}

Expand Down
7 changes: 4 additions & 3 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,10 @@ module.exports = {
gridTemplateColumns: {
onboardingHonors: '40px minmax(0, 1fr)',
},
},
fontFamily: {
sans: ['Roboto', 'ui-sans-serif', 'system-ui'],
fontFamily: {
kallisto: ['var(--font-kallisto)', 'Roboto', 'sans-serif'],
inter: ['var(--font-inter)', 'Roboto', 'sans-serif'],
},
},
},
plugins: [],
Expand Down

0 comments on commit 3d24dbe

Please sign in to comment.