From 2692edb12e94c095a63b37f257ee672bae79a6b6 Mon Sep 17 00:00:00 2001 From: Cade Scroggins Date: Wed, 20 Jul 2022 20:34:58 -0700 Subject: [PATCH] use modern javascript class syntax --- index.html | 909 ++++++++++++++++++++++++++++------------------------- 1 file changed, 478 insertions(+), 431 deletions(-) diff --git a/index.html b/index.html index 63c5392..c2676bb 100644 --- a/index.html +++ b/index.html @@ -345,23 +345,7 @@ search: ':{}', url: 'http://localhost:3000', }, - ].map((command) => { - const hsla = (hue, saturation = 'var(--command-color-saturation)') => - `hsla(${hue}, ${saturation}, var(--command-color-lightness), 1)`; - - if (command.color || !command.name) { - return command; - } else if (!Array.isArray(command.hues) || !command.hues.length) { - command.color = hsla(0, '0%'); - } else if (command.hues.length === 1) { - command.color = hsla(command.hues[0]); - } else { - const c = command.hues.reduce((a, h) => `${a}, ${hsla(h)}`, ''); - command.color = `linear-gradient(135deg ${c})`; - } - - return command; - }), + ], }; @@ -690,6 +674,8 @@