Skip to content

Commit 9819274

Browse files
Don't show compiler options and command line arguments on small devices.
1 parent 4880b5d commit 9819274

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

‎index.html‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,12 @@ <h2>Judge0 IDE</h2>
139139
<option value="84" mode="vb">Visual Basic.Net</option> <!-- (vbnc 0.0.0.5943) -->
140140
</select>
141141
</div>
142-
143-
<div class="item fitted borderless">
142+
<div class="item fitted borderless wide screen only">
144143
<div class="ui input">
145144
<input id="compiler-options" type="text" placeholder="Compiler options"></input>
146145
</div>
147146
</div>
148-
<div class="item borderless">
147+
<div class="item borderless wide screen only">
149148
<div class="ui input">
150149
<input id="command-line-arguments" type="text" placeholder="Command line arguments"></input>
151150
</div>

‎js/ide.js‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,12 +522,22 @@ function editorsUpdateFontSize(fontSize) {
522522
sandboxMessageEditor.updateOptions({fontSize: fontSize});
523523
}
524524

525+
function updateScreenElements() {
526+
var display = window.innerWidth <= 1200 ? "none" : "";
527+
$(".wide.screen.only").each(function(index) {
528+
$(this).css("display", display);
529+
});
530+
}
531+
525532
$(window).resize(function() {
526533
layout.updateSize();
534+
updateScreenElements();
527535
showMessages();
528536
});
529537

530538
$(document).ready(function () {
539+
updateScreenElements();
540+
531541
console.log("Hey, Judge0 IDE is open-sourced: https://github.com/judge0/ide. Have fun!");
532542

533543
$selectLanguage = $("#select-language");

0 commit comments

Comments
 (0)