The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Extract out code editor theme into a separate file
Joshen Limc81965b957c7
diff --git a/www/components/MadeForDevelopers/CodeExamples.tsx b/www/components/MadeForDevelopers/CodeExamples.tsxindex f37eac9cdca..ef999d6a6c6 100644--- a/www/components/MadeForDevelopers/CodeExamples.tsx+++ b/www/components/MadeForDevelopers/CodeExamples.tsx@@ -3,121 +3,7 @@ import { Light as SyntaxHighlighter } from 'react-syntax-highlighter'import js from 'react-syntax-highlighter/dist/cjs/languages/hljs/javascript'import CopyToClipboard from 'react-copy-to-clipboard'import { examples } from 'data/CodeExamples'--var monokaiCustomTheme = {- "hljs": {- "display": "block",- "overflowX": "auto",- "padding": "0.5em",- "background": "#272822",- "color": "#ddd"- },- "hljs-tag": {- "color": "#569cd6"- },- "hljs-keyword": {- "color": "#569cd6",- "fontWeight": "bold"- },- "hljs-selector-tag": {- "color": "#569cd6",- "fontWeight": "bold"- },- "hljs-literal": {- "color": "#569cd6",- "fontWeight": "bold"- },- "hljs-strong": {- "color": "#569cd6"- },- "hljs-name": {- "color": "#569cd6"- },- "hljs-code": {- "color": "#66d9ef"- },- "hljs-class .hljs-title": {- "color": "white"- },- "hljs-attribute": {- "color": "#bf79db"- },- "hljs-symbol": {- "color": "#bf79db"- },- "hljs-regexp": {- "color": "#bf79db"- },- "hljs-link": {- "color": "#bf79db"- },- "hljs-string": {- "color": "#05b560"- },- "hljs-bullet": {- "color": "#05b560"- },- "hljs-subst": {- "color": "#05b560"- },- "hljs-title": {- "color": "#05b560",- "fontWeight": "bold"- },- "hljs-section": {- "color": "#05b560",- "fontWeight": "bold"- },- "hljs-emphasis": {- "color": "#05b560"- },- "hljs-type": {- "color": "#05b560",- "fontWeight": "bold"- },- "hljs-built_in": {- "color": "#05b560"- },- "hljs-builtin-name": {- "color": "#05b560"- },- "hljs-selector-attr": {- "color": "#05b560"- },- "hljs-selector-pseudo": {- "color": "#05b560"- },- "hljs-addition": {- "color": "#05b560"- },- "hljs-variable": {- "color": "#05b560"- },- "hljs-template-tag": {- "color": "#05b560"- },- "hljs-template-variable": {- "color": "#05b560"- },- "hljs-comment": {- "color": "#75715e"- },- "hljs-quote": {- "color": "#75715e"- },- "hljs-deletion": {- "color": "#75715e"- },- "hljs-meta": {- "color": "#75715e"- },- "hljs-doctag": {- "fontWeight": "bold"- },- "hljs-selector-id": {- "fontWeight": "bold"- }-};+import monokaiCustomTheme from 'data/CodeEditorTheme'SyntaxHighlighter.registerLanguage('javascript', js)diff --git a/www/data/CodeEditorTheme.js b/www/data/CodeEditorTheme.jsnew file mode 100644index 00000000000..d9b51c7b9d4--- /dev/null+++ b/www/data/CodeEditorTheme.js@@ -0,0 +1,116 @@+const monokaiCustomTheme = {+ "hljs": {+ "display": "block",+ "overflowX": "auto",+ "padding": "0.5em",+ "background": "#272822",+ "color": "#ddd"+ },+ "hljs-tag": {+ "color": "#569cd6"+ },+ "hljs-keyword": {+ "color": "#569cd6",+ "fontWeight": "bold"+ },+ "hljs-selector-tag": {+ "color": "#569cd6",+ "fontWeight": "bold"+ },+ "hljs-literal": {+ "color": "#569cd6",+ "fontWeight": "bold"+ },+ "hljs-strong": {+ "color": "#569cd6"+ },+ "hljs-name": {+ "color": "#569cd6"+ },+ "hljs-code": {+ "color": "#66d9ef"+ },+ "hljs-class .hljs-title": {+ "color": "white"+ },+ "hljs-attribute": {+ "color": "#bf79db"+ },+ "hljs-symbol": {+ "color": "#bf79db"+ },+ "hljs-regexp": {+ "color": "#bf79db"+ },+ "hljs-link": {+ "color": "#bf79db"+ },+ "hljs-string": {+ "color": "#05b560"+ },+ "hljs-bullet": {+ "color": "#05b560"+ },+ "hljs-subst": {+ "color": "#05b560"+ },+ "hljs-title": {+ "color": "#05b560",+ "fontWeight": "bold"+ },+ "hljs-section": {+ "color": "#05b560",+ "fontWeight": "bold"+ },+ "hljs-emphasis": {+ "color": "#05b560"+ },+ "hljs-type": {+ "color": "#05b560",+ "fontWeight": "bold"+ },+ "hljs-built_in": {+ "color": "#05b560"+ },+ "hljs-builtin-name": {+ "color": "#05b560"+ },+ "hljs-selector-attr": {+ "color": "#05b560"+ },+ "hljs-selector-pseudo": {+ "color": "#05b560"+ },+ "hljs-addition": {+ "color": "#05b560"+ },+ "hljs-variable": {+ "color": "#05b560"+ },+ "hljs-template-tag": {+ "color": "#05b560"+ },+ "hljs-template-variable": {+ "color": "#05b560"+ },+ "hljs-comment": {+ "color": "#75715e"+ },+ "hljs-quote": {+ "color": "#75715e"+ },+ "hljs-deletion": {+ "color": "#75715e"+ },+ "hljs-meta": {+ "color": "#75715e"+ },+ "hljs-doctag": {+ "fontWeight": "bold"+ },+ "hljs-selector-id": {+ "fontWeight": "bold"+ }+};++export default monokaiCustomTheme\ No newline at end of file