diff options
author | Louis Pilfold <louis@lpil.uk> | 2024-03-13 21:17:32 +0000 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2024-03-26 10:31:25 +0000 |
commit | 8c199ac34bd80aeb241412a967d4202cacf5a69b (patch) | |
tree | 5f685854edf320f603050e4b73cac79103e8187e /static/index.js | |
parent | fe7c0d741e8ebee61ce24bda36f706ec6e6058bf (diff) | |
download | tour-8c199ac34bd80aeb241412a967d4202cacf5a69b.tar.gz tour-8c199ac34bd80aeb241412a967d4202cacf5a69b.zip |
Make content on single page (needs CSS and new name)
Diffstat (limited to 'static/index.js')
-rw-r--r-- | static/index.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/static/index.js b/static/index.js index 022082d..c09faea 100644 --- a/static/index.js +++ b/static/index.js @@ -1,5 +1,8 @@ import CodeFlask from "https://cdn.jsdelivr.net/npm/codeflask@1.4.1/+esm"; +console.log(CodeFlask); +globalThis.CodeFlask = CodeFlask; + const output = document.querySelector("#output"); const initialCode = document.querySelector("#code").innerHTML; @@ -52,7 +55,7 @@ function appendOutput(content, className) { const editor = new CodeFlask("#editor-target", { language: "gleam", - defaultTheme: false + defaultTheme: false, }); editor.addLanguage("gleam", prismGrammar); editor.updateCode(initialCode); |