Skip to content

Commit

Permalink
website: replace local font by google font
Browse files Browse the repository at this point in the history
  • Loading branch information
juliencrn committed Sep 19, 2022
1 parent c6380f7 commit 8c341a4
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 71 deletions.
4 changes: 2 additions & 2 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed website/src/assets/fonts/FiraMono-Bold.otf
Binary file not shown.
Binary file removed website/src/assets/fonts/FiraMono-Medium.otf
Binary file not shown.
Binary file removed website/src/assets/fonts/FiraMono-Regular.otf
Binary file not shown.
Binary file removed website/src/assets/fonts/FiraSans-Black.ttf
Binary file not shown.
Binary file removed website/src/assets/fonts/FiraSans-Bold.ttf
Binary file not shown.
Binary file removed website/src/assets/fonts/FiraSans-Light.ttf
Binary file not shown.
Binary file removed website/src/assets/fonts/FiraSans-Medium.ttf
Binary file not shown.
Binary file removed website/src/assets/fonts/FiraSans-Regular.ttf
Binary file not shown.
45 changes: 0 additions & 45 deletions website/src/assets/fonts/SIL Open Font License.txt

This file was deleted.

11 changes: 11 additions & 0 deletions website/src/components/seo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ const SEO: FC<SEOProps> = ({ title = '', description = '', children }) => {
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5817566022458684"
crossOrigin="anonymous"
></script>

<link rel="preconnect" href="https://fonts.googleapis.com" />
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossOrigin="true"
/>
<link
href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@400&family=Fira+Sans:wght@300;400;700&display=swap"
rel="stylesheet"
/>
</>
)
}
Expand Down
25 changes: 1 addition & 24 deletions website/src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ import { blue, red } from '@mui/material/colors'
import { createTheme } from '@mui/material/styles'
import deepMerge from 'deepmerge'

import FiraCode from './assets/fonts/FiraMono-Regular.otf'
import FiraRegular from './assets/fonts/FiraSans-Regular.ttf'

export const dracula = {
background: '#282a36',
currentLine: '#44475a',
Expand Down Expand Up @@ -42,7 +39,7 @@ const makeTheme = (variant: ThemeOptions): Theme => {
},
typography: {
fontFamily: [
'Fira Sans Regular',
'Fira Sans',
'-apple-system',
'BlinkMacSystemFont',
'"Segoe UI"',
Expand All @@ -57,26 +54,6 @@ const makeTheme = (variant: ThemeOptions): Theme => {
},

components: {
MuiCssBaseline: {
styleOverrides: `
@font-face {
font-family: Fira Sans Regular;
font-style: normal;
font-display: swap;
font-weight: 400;
src: url(${FiraRegular}) format(truetype);
}
@font-face {
font-family: Fira Code;
font-style: normal;
font-display: swap;
font-weight: 400;
src: url(${FiraCode}) format('woOpenTypeff2')
local('Open Sans Regular'),
local('OpenSans-Regular');
}
`,
},
MuiLink: {
defaultProps: {
underline: 'hover',
Expand Down

0 comments on commit 8c341a4

Please sign in to comment.