aboutsummaryrefslogtreecommitdiff
path: root/static/index.js
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2024-03-13 21:17:32 +0000
committerLouis Pilfold <louis@lpil.uk>2024-03-26 10:31:25 +0000
commit8c199ac34bd80aeb241412a967d4202cacf5a69b (patch)
tree5f685854edf320f603050e4b73cac79103e8187e /static/index.js
parentfe7c0d741e8ebee61ce24bda36f706ec6e6058bf (diff)
downloadtour-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.js5
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);