mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-23 19:49:56 +01:00
feat: add code block colors & fonts
This commit is contained in:
4
packages/theme/package-lock.json
generated
4
packages/theme/package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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;`,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user