Skip to content

Commit 2806fa9

Browse files
committed
Use CSS and viewport height for editor height
1 parent b7d7b9a commit 2806fa9

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

webapp/public/style_domjudge.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,6 @@ blockquote {
737737

738738
.editor {
739739
width: 100%;
740-
height: 400px;
740+
height: 80vh;
741741
border: 1px solid grey;
742742
}

webapp/src/Twig/TwigExtension.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -850,9 +850,6 @@ public function codeEditor(
850850
const element = document.getElementById('__EDITOR__');
851851
const content = element.textContent;
852852
element.textContent = '';
853-
// Adjust editor height to fit window.
854-
const height = $(window).height() - 400;
855-
element.style.height = height + 'px';
856853
857854
const editor = monaco.editor.create(element, {
858855
value: content,

0 commit comments

Comments
 (0)