A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
feat: add code block colors & fonts
thecodrrca49c3622845
diff --git a/packages/theme/package-lock.json b/packages/theme/package-lock.jsonindex 17efa447c..217d0c86e 100644--- a/packages/theme/package-lock.json+++ b/packages/theme/package-lock.json@@ -1,11 +1,11 @@{- "name": "notesnook-editor",+ "name": "@notesnook/theme","version": "0.0.1","lockfileVersion": 2,"requires": true,"packages": {"": {- "name": "notesnook-editor",+ "name": "@notesnook/theme","version": "0.0.1","dependencies": {"@rebass/forms": "^4.0.6",diff --git a/packages/theme/src/theme/colorscheme/static.ts b/packages/theme/src/theme/colorscheme/static.tsindex b08029969..4ac1b2c0f 100644--- a/packages/theme/src/theme/colorscheme/static.ts+++ b/packages/theme/src/theme/colorscheme/static.ts@@ -12,6 +12,14 @@ export type StaticColors = {warn: string;warnBg: string;favorite: string;++ codeBg: string;+ codeFg: string;+ codeHighlight: string;+ codeSelectionBg: string;+ codeSelectionFg: string;+ codeBorder: string;+ codeSelection: string;};export function getStaticColors(accent: string): StaticColors {return {@@ -26,5 +34,14 @@ export function getStaticColors(accent: string): StaticColors {warn: "#FF5722",warnBg: "#FF572220",favorite: "#ffd700",++ // dracula colors+ codeBg: "#282a36",+ codeFg: "#6c7393",+ codeHighlight: "#50fa7b",+ codeSelectionFg: "#f8f8f2",+ codeSelectionBg: "#44475a",+ codeBorder: "#6c7393",+ codeSelection: "#9580ff1a",};}diff --git a/packages/theme/src/theme/font/fontsize.ts b/packages/theme/src/theme/font/fontsize.tsindex c39d8faeb..5022cddb3 100644--- a/packages/theme/src/theme/font/fontsize.ts+++ b/packages/theme/src/theme/font/fontsize.ts@@ -8,6 +8,7 @@ export function getFontSizes(scale?: number): FontSizes {body: "0.8rem",menu: "0.8rem",subBody: "0.750rem",+ code: "0.9rem",};}@@ -20,4 +21,5 @@ export type FontSizes = {body: string;menu: string;subBody: string;+ code: string;};diff --git a/packages/theme/src/theme/font/index.ts b/packages/theme/src/theme/font/index.tsindex 8166b7f2a..5a7a2aec6 100644--- a/packages/theme/src/theme/font/index.ts+++ b/packages/theme/src/theme/font/index.ts@@ -8,7 +8,7 @@ export type FontConfig = {heading: number;bold: number;};- fonts: { body: string; heading: string };+ fonts: { body: string; monospace: string; heading: string };};export function getFontConfig(scale?: number): FontConfig {return {@@ -21,6 +21,8 @@ export function getFontConfig(scale?: number): FontConfig {},fonts: {body: `Open Sans,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Oxygen-Sans,Ubuntu,Cantarell,sans-serif;`,+ monospace:+ "ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace",heading: `Open Sans,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Oxygen-Sans,Ubuntu,Cantarell,sans-serif;`,},};