Skip to content

Commit

Permalink
Use CSS and viewport height for editor height
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevinjil committed Mar 1, 2025
1 parent ede94dc commit a0f125a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion webapp/public/style_domjudge.css
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,6 @@ blockquote {

.editor {
width: 100%;
height: 400px;
height: 80vh;
border: 1px solid grey;
}
3 changes: 0 additions & 3 deletions webapp/src/Twig/TwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -849,9 +849,6 @@ public function codeEditor(
const element = document.getElementById('__EDITOR__');
const content = element.textContent;
element.textContent = '';
// Adjust editor height to fit window.
const height = $(window).height() - 400;
element.style.height = height + 'px';
const editor = monaco.editor.create(element, {
value: content,
Expand Down

0 comments on commit a0f125a

Please sign in to comment.