forked from enricoros/big-AGI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
95 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Set the backend API key for OpenAI, so that users don't have to provide one | ||
OPENAI_API_KEY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import createCache from '@emotion/cache'; | ||
import { Inter, JetBrains_Mono } from 'next/font/google'; | ||
import { extendTheme } from '@mui/joy'; | ||
|
||
|
||
// Theme & Fonts | ||
|
||
const inter = Inter({ | ||
weight: ['400', '500', '600', '700'], | ||
subsets: ['latin'], | ||
display: 'swap', | ||
fallback: ['Helvetica', 'Arial', 'sans-serif'], | ||
}); | ||
|
||
const jetBrainsMono = JetBrains_Mono({ | ||
weight: ['400', '500', '600', '700'], | ||
subsets: ['latin'], | ||
display: 'swap', | ||
fallback: ['monospace'], | ||
}); | ||
|
||
export const theme = extendTheme({ | ||
fontFamily: { | ||
body: inter.style.fontFamily, | ||
code: jetBrainsMono.style.fontFamily, | ||
}, | ||
}); | ||
|
||
export const bodyFontClassName = inter.className; | ||
|
||
|
||
// Emotion Cache (with insertion point on the SSR pass) | ||
|
||
const isBrowser = typeof document !== 'undefined'; | ||
|
||
export function createEmotionCache() { | ||
let insertionPoint; | ||
|
||
if (isBrowser) { | ||
// On the client side, _document.tsx has a meta tag with the name "emotion-insertion-point" at the top of the <head>. | ||
// This assures that MUI styles are loaded first, and allows allows developers to easily override MUI styles with other solutions like CSS modules. | ||
const emotionInsertionPoint = document.querySelector<HTMLMetaElement>( | ||
'meta[name="emotion-insertion-point"]', | ||
); | ||
insertionPoint = emotionInsertionPoint ?? undefined; | ||
} | ||
|
||
return createCache({ key: 'mui-style', insertionPoint }); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters