Skip to content
Snippets Groups Projects
Commit 293ea1ae authored by Fernando K's avatar Fernando K
Browse files

Fix some spacing

parent bf355cb0
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
#breadcrumb {
display: flex;
align-items: center;
padding: 8px;
padding-bottom: 8px;
}
#breadcrumb a {
......@@ -55,6 +55,7 @@ main {
}
#statement-submission {
overflow: auto;
display: flex;
flex: 1;
}
......@@ -65,6 +66,7 @@ main {
#editor {
flex: 1;
margin-top: 0;
}
#contest-header {
......@@ -447,8 +449,6 @@ textarea {
}
#modal > .modal-underlay {
/* underlay takes up the entire viewport. This is only
required if you want to click to dismiss the popup */
position: absolute;
z-index: -1;
top:0px;
......@@ -503,3 +503,8 @@ textarea {
border-top-right-radius: 3px;
top: 9px
}
textarea #source-text {
overflow: hidden;
}
......@@ -14,8 +14,8 @@ value="{{ this.value }}"
<label>Código-fonte</label>
<div id="editor" style="border: 1px solid grey"></div>
<textarea id="source_text" name="source_text" style="display: none"></textarea>
<input type="file" id="source_file"/>
<textarea id="source-text" name="source_text" style="display: none"></textarea>
<input type="file" id="source-file"/>
<script>
var require = { paths: { vs: 'static/vs' } };
......@@ -35,14 +35,14 @@ value="{{ this.value }}"
"}"
});
const source_file = document.getElementById("source_file");
source_file.addEventListener("change", async function (e) {
editor.setValue(await source_file.files[0].text());
source_file.value = "";
const sourceFile = document.getElementById("source-file");
sourceFile.addEventListener("change", async function (e) {
editor.setValue(await sourceFile.files[0].text());
sourceFile.value = "";
});
const source_text = document.getElementById("source_text");
function setSourceText() { source_text.value = editor.getValue(); }
const sourceText = document.getElementById("source-text");
function setSourceText() { sourceText.value = editor.getValue(); }
editor.onDidChangeModelContent(setSourceText);
setSourceText();
......@@ -52,4 +52,8 @@ value="{{ this.value }}"
}
language.addEventListener("change", setLanguage);
setLanguage();
window.addEventListener('resize', () => {
editor.layout();
});
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment