diff --git a/client/index.css b/client/index.css new file mode 100644 index 0000000..bf6f1fa --- /dev/null +++ b/client/index.css @@ -0,0 +1,39 @@ +p { + line-height: 0.3; +} + +html, body { + width: 100%; + height: 100%; + padding: 0; + margin: 0; +} + +button { + font-family: monospace; + background-color: #48156e; + color: #e6e8ff; + border: 0px; + border-radius: 2px; +} + +.left { + height: 100%; + width: 70%; + padding: 10px; + background-color: #331d42; + color: #e6e8ff; + position: absolute; + overflow: scroll; +} + +.right { + height: 100%; + width: 30%; + padding: 10px; + background-color: #1b0f24; + color: #e6e8ff; + position: absolute; + right: 0; +} + diff --git a/client/index.html b/client/index.html index c3ef083..307bee4 100644 --- a/client/index.html +++ b/client/index.html @@ -3,14 +3,16 @@ gride - + - - +
+ +
+
+ +
+ Output will be shown here, click the run button to run your code! +
diff --git a/client/index.js b/client/index.js index b5aea78..14824aa 100644 --- a/client/index.js +++ b/client/index.js @@ -1,9 +1,11 @@ let textbox; +let textconsole; let text = '

# welcome to gride!

\n

# start typing to code a program in Ground!

\n

'; // Wait for the window to load before doing anything window.addEventListener("load", function() { textbox = document.getElementById("editor"); + textconsole = document.getElementById("console"); textbox.innerHTML = text + "

"; }); @@ -33,5 +35,5 @@ async function runCode() { "body": text.split("

").join("").split("

").join("") }); const data = await result.json(); - console.log("Output: ", data); + textconsole.innerHTML = data.stdout; }