diff --git a/src/components/ThemeModal.astro b/src/components/ThemeModal.astro index b1cfb56..89e7c66 100644 --- a/src/components/ThemeModal.astro +++ b/src/components/ThemeModal.astro @@ -27,10 +27,11 @@ import TextBox from "./TextBox.astro"; - - - - + + + + + @@ -52,6 +53,10 @@ import TextBox from "./TextBox.astro"; .color-btns { margin-top: 0.2rem; + + display: flex; + flex-direction: row; + column-gap: 0.25rem; } .hint { @@ -234,12 +239,21 @@ import TextBox from "./TextBox.astro"; lessStyles.type = 'text/css' lessStyles.href = '/theme_dyn.less' document.head.append(lessStyles) + // Create script element for Less config + const lessConfig = document.createElement('script') + lessConfig.innerText = 'less = ' + JSON.stringify({ + env: 'production', + async: true, // really important for slow internet connection + fileAsync: true, + errorReporting: 'console', + }) // Create LessCSS script element const lessScript = document.createElement('script') lessScript.src = '/less.min.js' // Modify variables when less is loaded lessScript.addEventListener('load', reloadTheme) // Load LessCSS script + document.head.append(lessConfig) document.head.append(lessScript) } else