From b46fa16785d3d0f433d03ebf34fdd6257a644711 Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 9 Mar 2023 15:29:28 +0100 Subject: [PATCH 1/8] customizable opacity --- frontend/src/ts/test/test-ui.ts | 4 ++-- frontend/src/ts/utils/misc.ts | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/frontend/src/ts/test/test-ui.ts b/frontend/src/ts/test/test-ui.ts index 0fe2ab1ac..2b4d413dd 100644 --- a/frontend/src/ts/test/test-ui.ts +++ b/frontend/src/ts/test/test-ui.ts @@ -1044,9 +1044,9 @@ export async function applyBurstHeatmap(): Promise { const colors = [ themeColors.colorfulError, - Misc.blendTwoHexColors(themeColors.colorfulError, themeColors.text), + Misc.blendTwoHexColors(themeColors.colorfulError, themeColors.text, 0.5), themeColors.text, - Misc.blendTwoHexColors(themeColors.main, themeColors.text), + Misc.blendTwoHexColors(themeColors.main, themeColors.text, 0.5), themeColors.main, ]; diff --git a/frontend/src/ts/utils/misc.ts b/frontend/src/ts/utils/misc.ts index 7624ffc1f..5f96307d5 100644 --- a/frontend/src/ts/utils/misc.ts +++ b/frontend/src/ts/utils/misc.ts @@ -236,7 +236,11 @@ export async function getContributorsList(): Promise { } } -export function blendTwoHexColors(color1: string, color2: string): string { +export function blendTwoHexColors( + color1: string, + color2: string, + opacity: number +): string { const rgb1 = hexToRgb(color1); const rgb2 = hexToRgb(color2); @@ -251,7 +255,7 @@ export function blendTwoHexColors(color1: string, color2: string): string { r: rgb2.r, g: rgb2.g, b: rgb2.b, - a: 0.5, + a: opacity, }; const blended = normalBlend(rgba1, rgba2); return rgbToHex(blended.r, blended.g, blended.b); From e2475645fddacfd0fd8e4c287a0bb25751039604 Mon Sep 17 00:00:00 2001 From: Dainternetdude <53956237+Dainternetdude@users.noreply.github.com> Date: Thu, 9 Mar 2023 13:51:58 -0700 Subject: [PATCH 2/8] remove "tion" from english 10k (#4058) --- frontend/static/languages/english_10k.json | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/static/languages/english_10k.json b/frontend/static/languages/english_10k.json index 934f5d61e..1f0ed2413 100644 --- a/frontend/static/languages/english_10k.json +++ b/frontend/static/languages/english_10k.json @@ -3999,7 +3999,6 @@ "pour", "digest", "lodging", - "tion", "dust", "hence", "entirely", From 5b0cd44d5faa50bc38128364a8dbee7c86959032 Mon Sep 17 00:00:00 2001 From: Dainternetdude <53956237+Dainternetdude@users.noreply.github.com> Date: Fri, 10 Mar 2023 06:17:27 -0700 Subject: [PATCH 3/8] add three quotes to english (#4062) dainternetdude --- frontend/static/quotes/english.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/frontend/static/quotes/english.json b/frontend/static/quotes/english.json index 7fbbdfac7..4954d5b70 100644 --- a/frontend/static/quotes/english.json +++ b/frontend/static/quotes/english.json @@ -38693,6 +38693,30 @@ "source": "The Legend of Vox Machina", "id": 6782, "length": 183 + }, + { + "text": "Most cities aren't. They want to believe they have a cash-flow problem because it is convenient, because insolvency is too difficult to fathom, especially when everyone else appears to be doing the exact same thing. Could everyone be wrong? Could we all be insolvent? These two questions probably cost me a total of six years in the intellectual wilderness as I clung to the notion that what I was seeing and measuring could not possibly be true, that a wisdom greater than mine had to be at work that I hadn't perceived.", + "source": "Strong Towns - A Bottom-Up Revolution to Rebuild American Prosperity", + "id": 6783, + "length": 521 + }, + { + "text": "It's also our path to salvation. Our cities are struggling financially, trapped in a system grinding them into decline. Working together in an intentional way, it is possible to make our places stronger financially while also improving the lives of people.", + "source": "Strong Towns - A Bottom-Up Revolution to Rebuild American Prosperity", + "id": 6784, + "length": 256 + }, + { + "text": "That is the essence of a Strong Towns approach, the bottom-up revolution America desperately needs.", + "source": "Strong Towns - A Bottom-Up Revolution to Rebuild American Prosperity", + "id": 6785, + "length": 99 + }, + { + "text": "I'm not against the automobile, but I just feel that the automobile has moved into communities too much. I feel that you can design so that the automobile is there, but still put pedestrians back again... I’d love to work on a project like that.", + "source": "Walt Disney", + "id": 6786, + "length": 245 } ] } From cd16b2fbf5fd11fef1ac9bba3bb9d54a9adeff95 Mon Sep 17 00:00:00 2001 From: lelazsq <123071457+lelazsq@users.noreply.github.com> Date: Fri, 10 Mar 2023 21:20:48 +0800 Subject: [PATCH 4/8] add maya and nila layouts (#4059) lelazsq --- frontend/static/layouts/_list.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/frontend/static/layouts/_list.json b/frontend/static/layouts/_list.json index f24fab78d..72554b9ad 100644 --- a/frontend/static/layouts/_list.json +++ b/frontend/static/layouts/_list.json @@ -1363,5 +1363,27 @@ "row4": ["xX", "mM", "wW", "gG", "qQ", "kK", "fF", "'\"", ";:", ".>"], "row5": [" "] } + }, + "maya": { + "keymapShowTopRow": false, + "type": "ansi", + "keys": { + "row1": ["`~", "1!", "2@", "3#", "4$", "5%", "6^", "7&", "8*", "9(", "0)", "[{", "]}"], + "row2": ["bB", "lL", "dD", "gG", "qQ", "jJ", "fF", "oO", "uU", ",<", ";:", "=+", "\\|"], + "row3": ["nN", "rR", "tT", "sS", "vV", "kK", "hH", "aA", "eE", "iI", "-_"], + "row4": ["xX", "mM", "cC", "wW", "zZ", "pP", "yY", "'\"", "/?", ".>"], + "row5": [" "] + } + }, + "nila": { + "keymapShowTopRow": false, + "type": "ansi", + "keys": { + "row1": ["`~", "1!", "2@", "3#", "4$", "5%", "6^", "7&", "8*", "9(", "0)", "[{", "]}"], + "row2": ["xX", "dD", "lL", "gG", "vV", "jJ", "fF", "oO", "uU", ",<", ";:", "=+", "\\|"], + "row3": ["rR", "tT", "nN", "sS", "bB", "qQ", "hH", "aA", "eE", "iI", "-_"], + "row4": ["kK", "mM", "cC", "wW", "zZ", "pP", "yY", "'\"", "/?", ".>"], + "row5": [" "] + } } } From 108fefd481dc584135f8e60016182387283cead1 Mon Sep 17 00:00:00 2001 From: Nolan <102072394+MushyToast@users.noreply.github.com> Date: Fri, 10 Mar 2023 05:22:42 -0800 Subject: [PATCH 5/8] added cherry blossom theme (#4057) mushytoast * Create cherry_blossom.css * Update _list.json * updated sub alt color --------- Co-authored-by: Miodec --- frontend/static/themes/_list.json | 7 +++++++ frontend/static/themes/cherry_blossom.css | 12 ++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 frontend/static/themes/cherry_blossom.css diff --git a/frontend/static/themes/_list.json b/frontend/static/themes/_list.json index 2793c7ad8..82cb1ba39 100644 --- a/frontend/static/themes/_list.json +++ b/frontend/static/themes/_list.json @@ -1153,5 +1153,12 @@ "mainColor": "#7d67a9", "subColor": "#3a98b9", "textColor": "#1b4c5e" + }, + { + "name": "cherry_blossom", + "bgColor": "#323437", + "mainColor": "#d65ccc", + "subColor": "#787d82", + "textColor": "#d1d0c5" } ] diff --git a/frontend/static/themes/cherry_blossom.css b/frontend/static/themes/cherry_blossom.css new file mode 100644 index 000000000..21beeee6a --- /dev/null +++ b/frontend/static/themes/cherry_blossom.css @@ -0,0 +1,12 @@ +:root { + --bg-color: #323437; + --main-color: #d65ccc; + --caret-color: #ffffff; + --sub-color: #787d82; + --sub-alt-color: #2d2f31; + --text-color: #d1d0c5; + --error-color: #ca4754; + --error-extra-color: #d32738; + --colorful-error-color: #ec182d; + --colorful-error-extra-color: #6e0c16; +} From 104170c2958919182bd33cc828d7ca3fb448280d Mon Sep 17 00:00:00 2001 From: Miodec Date: Fri, 10 Mar 2023 14:12:10 +0100 Subject: [PATCH 6/8] updated dracula theme to avoid using the same color for main and text --- frontend/static/themes/dracula.css | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/static/themes/dracula.css b/frontend/static/themes/dracula.css index ac844f1e5..b17f38db5 100644 --- a/frontend/static/themes/dracula.css +++ b/frontend/static/themes/dracula.css @@ -1,14 +1,14 @@ :root { --bg-color: #282a36; - --main-color: #f2f2f2; - --caret-color: #f2f2f2; - --sub-color: #bd93f9; + --main-color: #bd93f9; + --caret-color: #bd93f9; + --sub-color: #6272a4; --sub-alt-color: #20222c; - --text-color: #f2f2f2; - --error-color: #f758a0; - --error-extra-color: #732e51; - --colorful-error-color: #f758a0; - --colorful-error-extra-color: #732e51; + --text-color: #f8f8f2; + --error-color: #ff5555; + --error-extra-color: #f1fa8c; + --colorful-error-color: #ff5555; + --colorful-error-extra-color: #f1fa8c; } #menu .textButton:nth-child(1) { From c70567e9b105d937fc687df12ab5a72f7ba94e34 Mon Sep 17 00:00:00 2001 From: Miodec Date: Fri, 10 Mar 2023 14:14:40 +0100 Subject: [PATCH 7/8] using different colors if main and text are the same closes #4060 --- frontend/src/ts/test/test-ui.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/frontend/src/ts/test/test-ui.ts b/frontend/src/ts/test/test-ui.ts index 2b4d413dd..03727d021 100644 --- a/frontend/src/ts/test/test-ui.ts +++ b/frontend/src/ts/test/test-ui.ts @@ -1042,15 +1042,29 @@ export async function applyBurstHeatmap(): Promise { const themeColors = await ThemeColors.getAll(); - const colors = [ + let colors = [ themeColors.colorfulError, Misc.blendTwoHexColors(themeColors.colorfulError, themeColors.text, 0.5), themeColors.text, Misc.blendTwoHexColors(themeColors.main, themeColors.text, 0.5), themeColors.main, ]; + let unreachedColor = themeColors.sub; - const unreachedColor = themeColors.sub; + if (themeColors.main === themeColors.text) { + colors = [ + themeColors.colorfulError, + Misc.blendTwoHexColors( + themeColors.colorfulError, + themeColors.text, + 0.5 + ), + themeColors.sub, + Misc.blendTwoHexColors(themeColors.sub, themeColors.text, 0.5), + themeColors.main, + ]; + unreachedColor = themeColors.subAlt; + } const steps = [ { From 00646da6fe295014962c7d748b0df2d383dd6796 Mon Sep 17 00:00:00 2001 From: Miodec Date: Fri, 10 Mar 2023 16:06:58 +0100 Subject: [PATCH 8/8] removed single quotes from slovak punctuation --- frontend/src/ts/test/test-logic.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index 2781a0626..1103eb7bb 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -177,7 +177,8 @@ export async function punctuateWord( lastChar != "," && lastChar != "." && currentLanguage !== "russian" && - currentLanguage !== "ukrainian" + currentLanguage !== "ukrainian" && + currentLanguage !== "slovak" ) { word = `'${word}'`; } else if (Math.random() < 0.012 && lastChar != "," && lastChar != ".") {