민병수

Html-Home connecting judge0

...@@ -15,7 +15,7 @@ a{ ...@@ -15,7 +15,7 @@ a{
15 color:var(--text-color); 15 color:var(--text-color);
16 16
17 } 17 }
18 -.menu{ 18 +.voi_menu{
19 display:flex; 19 display:flex;
20 justify-content:space-between; 20 justify-content:space-between;
21 align-items:center; 21 align-items:center;
...@@ -109,9 +109,9 @@ button:hover{ ...@@ -109,9 +109,9 @@ button:hover{
109 margin: 23px; 109 margin: 23px;
110 } 110 }
111 #output{ 111 #output{
112 - width:50%; 112 + margin:20px;
113 - margin-left:20px;
114 display:flex; 113 display:flex;
114 + align-items:center;
115 border: 3px solid var(--accent-color); 115 border: 3px solid var(--accent-color);
116 height:700px; 116 height:700px;
117 } 117 }
...@@ -123,7 +123,7 @@ button:hover{ ...@@ -123,7 +123,7 @@ button:hover{
123 } 123 }
124 .output_bar{ 124 .output_bar{
125 display:flex; 125 display:flex;
126 - justify-content:space-around; 126 + justify-content:center;
127 color:black; 127 color:black;
128 border: 3px solid var(--accent-color); 128 border: 3px solid var(--accent-color);
129 margin: 20px; 129 margin: 20px;
......
...@@ -6,27 +6,29 @@ ...@@ -6,27 +6,29 @@
6 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 6 <meta http-equiv="X-UA-Compatible" content="IE=edge">
7 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 7 <meta name="viewport" content="width=device-width, initial-scale=1.0">
8 <title>Voicoding</title> 8 <title>Voicoding</title>
9 - <script src="https://kit.fontawesome.com/a5f26fa106.js" crossorigin="anonymous"></script> 9 + <script defer src="https://kit.fontawesome.com/a5f26fa106.js" crossorigin="anonymous"></script>
10 - <script src="menu.js" defer></script> 10 + <script defer src="menu.js" defer></script>
11 <link rel="preconnect" href="https://fonts.gstatic.com"> 11 <link rel="preconnect" href="https://fonts.gstatic.com">
12 <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300&display=swap" rel="stylesheet"> 12 <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300&display=swap" rel="stylesheet">
13 - <script src="https://cdn.rawgit.com/mattdiamond/Recorderjs/08e7abd9/dist/recorder.js"></script> 13 + <script defer src="https://cdn.rawgit.com/mattdiamond/Recorderjs/08e7abd9/dist/recorder.js"></script>
14 - <script defer src="client.js"></script> 14 + <script defer defer src="client.js"></script>
15 <meta name="description" content="Free and open-source online code editor that allows you to write and execute code from a rich set of languages."> 15 <meta name="description" content="Free and open-source online code editor that allows you to write and execute code from a rich set of languages.">
16 <meta name="keywords" content="online editor, online code editor, online ide, online compiler, online interpreter, run code online, learn programming online, 16 <meta name="keywords" content="online editor, online code editor, online ide, online compiler, online interpreter, run code online, learn programming online,
17 online debugger, programming in browser, online code runner, online code execution, debug online, debug C code online, debug C++ code online, 17 online debugger, programming in browser, online code runner, online code execution, debug online, debug C code online, debug C++ code online,
18 programming online, snippet, snippets, code snippet, code snippets, pastebin, execute code, programming in browser, run c online, run C++ online, 18 programming online, snippet, snippets, code snippet, code snippets, pastebin, execute code, programming in browser, run c online, run C++ online,
19 run java online, run python online, run ruby online, run c# online, run rust online, run pascal online, run basic online"> 19 run java online, run python online, run ruby online, run c# online, run rust online, run pascal online, run basic online">
20 + <meta name="author" content="Herman Zvonimir Došilović">
20 21
21 22
22 <meta property="og:title" content="Judge0 IDE - Free and open-source online code editor"> 23 <meta property="og:title" content="Judge0 IDE - Free and open-source online code editor">
23 <meta property="og:description" content="Free and open-source online code editor that allows you to write and execute code from a rich set of languages."> 24 <meta property="og:description" content="Free and open-source online code editor that allows you to write and execute code from a rich set of languages.">
24 <meta property="og:image" content="https://raw.githubusercontent.com/judge0/ide/master/.github/wallpaper.png"> 25 <meta property="og:image" content="https://raw.githubusercontent.com/judge0/ide/master/.github/wallpaper.png">
25 26
26 - <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> 27 + <script defer src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
27 -
28 - <script src="https://cdnjs.cloudflare.com/ajax/libs/golden-layout/1.5.9/goldenlayout.min.js" integrity="sha256-NhJAZDfGgv4PiB+GVlSrPdh3uc75XXYSM4su8hgTchI=" crossorigin="anonymous"></script>
29 28
29 + <script defer src="https://cdnjs.cloudflare.com/ajax/libs/golden-layout/1.5.9/goldenlayout.min.js" integrity="sha256-NhJAZDfGgv4PiB+GVlSrPdh3uc75XXYSM4su8hgTchI=" crossorigin="anonymous"></script>
30 + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/golden-layout/1.5.9/css/goldenlayout-base.css" integrity="sha256-oIDR18yKFZtfjCJfDsJYpTBv1S9QmxYopeqw2dO96xM=" crossorigin="anonymous" />
31 + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/golden-layout/1.5.9/css/goldenlayout-dark-theme.css" integrity="sha256-ygw8PvSDJJUGLf6Q9KIQsYR3mOmiQNlDaxMLDOx9xL0=" crossorigin="anonymous" />
30 32
31 <script> 33 <script>
32 var require = { 34 var require = {
...@@ -37,41 +39,37 @@ ...@@ -37,41 +39,37 @@
37 } 39 }
38 }; 40 };
39 </script> 41 </script>
40 - <script src="https://unpkg.com/monaco-editor/min/vs/loader.js"></script> 42 + <script defer src="https://unpkg.com/monaco-editor/min/vs/loader.js"></script>
41 - <script src="https://unpkg.com/monaco-editor@0.23.0/min/vs/editor/editor.main.nls.js"></script> 43 + <script defer src="https://unpkg.com/monaco-editor@0.23.0/min/vs/editor/editor.main.nls.js"></script>
42 - <script src="https://unpkg.com/monaco-editor@0.23.0/min/vs/editor/editor.main.js"></script> 44 + <script defer src="https://unpkg.com/monaco-editor@0.23.0/min/vs/editor/editor.main.js"></script>
43 45
44 - <script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.js" integrity="sha256-t8GepnyPmw9t+foMh3mKNvcorqNHamSKtKRxxpUEgFI=" crossorigin="anonymous"></script> 46 + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css" integrity="sha256-9mbkOfVho3ZPXfM7W8sV2SndrGDuh7wuyLjtsWeTI1Q=" crossorigin="anonymous" />
47 + <script defer src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.js" integrity="sha256-t8GepnyPmw9t+foMh3mKNvcorqNHamSKtKRxxpUEgFI=" crossorigin="anonymous"></script>
45 48
46 <link href="https://fonts.googleapis.com/css?family=Exo+2" rel="stylesheet"> 49 <link href="https://fonts.googleapis.com/css?family=Exo+2" rel="stylesheet">
47 50
48 - <script type="text/javascript" src="third_party/download.js"></script> 51 + <script type="text/javascript" defer src="third_party/download.js"></script>
49 52
50 - <script type="text/javascript" src="js/ide.js" defer></script> 53 + <script type="text/javascript" defer src="js/ide.js"></script>
51 54
52 - <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css" integrity="sha256-9mbkOfVho3ZPXfM7W8sV2SndrGDuh7wuyLjtsWeTI1Q=" crossorigin="anonymous" /> 55 + <link type="text/css" rel="stylesheet" href="css/ide.css">
53 - <script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.js" integrity="sha256-t8GepnyPmw9t+foMh3mKNvcorqNHamSKtKRxxpUEgFI=" crossorigin="anonymous"></script>
54 - <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
55 56
56 - <script src="https://cdnjs.cloudflare.com/ajax/libs/golden-layout/1.5.9/goldenlayout.min.js" integrity="sha256-NhJAZDfGgv4PiB+GVlSrPdh3uc75XXYSM4su8hgTchI=" crossorigin="anonymous"></script> 57 + <title>Judge0 IDE - Free and open-source online code editor</title>
57 - <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/golden-layout/1.5.9/css/goldenlayout-base.css" integrity="sha256-oIDR18yKFZtfjCJfDsJYpTBv1S9QmxYopeqw2dO96xM=" crossorigin="anonymous" /> 58 + <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
58 - <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/golden-layout/1.5.9/css/goldenlayout-dark-theme.css" integrity="sha256-ygw8PvSDJJUGLf6Q9KIQsYR3mOmiQNlDaxMLDOx9xL0=" crossorigin="anonymous" /> 59 + <link rel="icon" href="./favicon.ico" type="image/x-icon">
60 +
61 + <script async defer src="https://www.googletagmanager.com/gtag/js?id=G-RHNJ50BJ2F"></script>
59 <script> 62 <script>
60 - var require = { 63 + window.dataLayer = window.dataLayer || [];
61 - paths: { 64 + function gtag(){dataLayer.push(arguments);}
62 - "vs": "https://unpkg.com/monaco-editor/min/vs", 65 + gtag('js', new Date());
63 - "monaco-vim": "https://unpkg.com/monaco-vim/dist/monaco-vim", 66 + gtag('config', 'G-RHNJ50BJ2F');
64 - "monaco-emacs": "https://unpkg.com/monaco-emacs/dist/monaco-emacs"
65 - }
66 - };
67 </script> 67 </script>
68 - <script src="https://unpkg.com/monaco-editor/min/vs/loader.js"></script>
69 - <script src="https://unpkg.com/monaco-editor@0.23.0/min/vs/editor/editor.main.nls.js"></script>
70 - <script src="https://unpkg.com/monaco-editor@0.23.0/min/vs/editor/editor.main.js"></script>
71 68
69 + <script defer type="text/javascript">window.$crisp=[];window.CRISP_WEBSITE_ID="ee4621ff-c682-44ac-8cfa-1835beddb98a";(function(){d=document;s=d.createElement("script"); src="https://client.crisp.chat/l.js";s.async=1;d.getElementsByTagName("head")[0].appendChild(s);})();</script>
72 </head> 70 </head>
73 <body> 71 <body>
74 - <nav class="menu"> 72 + <nav class="voi_menu">
75 <div class="menu_bar_logo"> 73 <div class="menu_bar_logo">
76 <i class="fas fa-microphone-alt"></i> 74 <i class="fas fa-microphone-alt"></i>
77 <a href="Voico_Home.html">Voicoding</a> 75 <a href="Voico_Home.html">Voicoding</a>
...@@ -93,15 +91,104 @@ ...@@ -93,15 +91,104 @@
93 </div> 91 </div>
94 <div class="output_bar"> 92 <div class="output_bar">
95 <h3>Transcription Raw Data</h3> 93 <h3>Transcription Raw Data</h3>
96 - <h3 style= "width:174.462px; text-align:center">TTP</h3>
97 </div> 94 </div>
98 <div id="output"></div> 95 <div id="output"></div>
99 - <div class="ttp"> 96 + <div class="output_bar">
97 + <h3>TTP</h3>
98 + </div>
99 + <div id="site-navigation" class="ui small inverted menu" style="margin:20px 20px 0px 20px;">
100 + <div id="site-header" class="header item">
101 +
102 + </div>
103 + <div class="left menu" >
104 + <div class="ui dropdown item site-links on-hover">
105 + File <i class="dropdown icon"></i>
106 + <div class="menu">
107 + <a class="item" target="_blank" href="/"><i class="file code icon"></i> New File</a>
108 + <div class="item" onclick="downloadSource()"><i class="download icon"></i> Download</div>
109 + <div id="insert-template-btn" class="item"><i class="file code outline icon"></i> Insert template
110 + for current language</div>
111 + </div>
112 + </div>
113 +
114 + <div class="item borderless">
115 +
116 + </div>
117 + <div class="item fitted borderless wide screen only">
118 + <div class="ui input">
119 + <p id="compiler-options" type="text" placeholder="Compiler options"></p>
120 + </div>
121 + </div>
122 + <div class="item borderless wide screen only">
123 + <div class="ui input">
124 + <p id="command-line-arguments" type="text" placeholder="Command line arguments"></p>
125 + </div>
126 + </div>
100 <div class="item no-left-padding borderless"> 127 <div class="item no-left-padding borderless">
101 <button id="run-btn" class="ui primary labeled icon button"><i class="play icon"></i>Run (F9)</button> 128 <button id="run-btn" class="ui primary labeled icon button"><i class="play icon"></i>Run (F9)</button>
102 </div> 129 </div>
103 - <div id="site-content"></div> 130 +
131 + </div>
132 +
133 + </div>
134 +
135 + <div id="site-content"style="margin:0px 20px 20px 20px;"></div>
136 +
137 + <div id="site-modal" class="ui modal">
138 + <div class="header">
139 + <i class="close icon"></i>
140 + <span id="title"></span>
141 + </div>
142 + <div class="scrolling content"></div>
143 + <div class="actions">
144 + <div class="ui small labeled icon cancel button">
145 + <i class="remove icon"></i>
146 + Close (ESC)
147 + </div>
148 + </div>
149 + </div>
150 +
151 + <div id="site-settings" class="ui modal">
152 + <i class="close icon"></i>
153 + <div class="header">
154 + <i class="cog icon"></i>
155 + Settings
156 + </div>
157 + <div class="content">
158 + <div class="ui form">
159 + <div class="inline fields">
160 + <label>Editor Mode</label>
161 + <div class="field">
162 + <div class="ui radio checkbox">
163 + <input type="radio" name="editor-mode" value="normal" checked="checked">
164 + <label>Normal</label>
104 </div> 165 </div>
166 + </div>
167 + <div class="field">
168 + <div class="ui radio checkbox">
169 + <input type="radio" name="editor-mode" value="vim">
170 + <label>Vim</label>
171 + </div>
172 + </div>
173 + <div class="field">
174 + <div class="ui radio checkbox">
175 + <input type="radio" name="editor-mode" value="emacs">
176 + <label>Emacs</label>
177 + </div>
178 + </div>
179 + </div>
180 + <div class="inline field">
181 + <div class="ui checkbox">
182 + <input type="checkbox" name="redirect-output">
183 + <label>Redirect stderr to stdout</label>
184 + </div>
185 + </div>
186 + </div>
187 + </div>
188 + </div>
189 +
190 +
191 + <div id="editor-status-line"></div>
105 192
106 </body> 193 </body>
107 </html> 194 </html>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -13,7 +13,7 @@ a{ ...@@ -13,7 +13,7 @@ a{
13 color:var(--text-color); 13 color:var(--text-color);
14 14
15 } 15 }
16 -.menu{ 16 +.voi_menu{
17 display:flex; 17 display:flex;
18 justify-content:space-between; 18 justify-content:space-between;
19 align-items:center; 19 align-items:center;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
12 <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300&display=swap" rel="stylesheet"> 12 <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300&display=swap" rel="stylesheet">
13 </head> 13 </head>
14 <body> 14 <body>
15 - <nav class="menu"> 15 + <nav class="voi_menu">
16 <div class="menu_bar_logo"> 16 <div class="menu_bar_logo">
17 <i class="fas fa-microphone-alt"></i> 17 <i class="fas fa-microphone-alt"></i>
18 <a href="Voico_Home.html">Voicoding</a> 18 <a href="Voico_Home.html">Voicoding</a>
......
...@@ -13,7 +13,7 @@ a{ ...@@ -13,7 +13,7 @@ a{
13 color:var(--text-color); 13 color:var(--text-color);
14 14
15 } 15 }
16 -.menu{ 16 +.voi_menu{
17 display:flex; 17 display:flex;
18 justify-content:space-between; 18 justify-content:space-between;
19 align-items:center; 19 align-items:center;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
12 <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300&display=swap" rel="stylesheet"> 12 <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300&display=swap" rel="stylesheet">
13 </head> 13 </head>
14 <body> 14 <body>
15 - <nav class="menu"> 15 + <nav class="voi_menu">
16 <div class="menu_bar_logo"> 16 <div class="menu_bar_logo">
17 <i class="fas fa-microphone-alt"></i> 17 <i class="fas fa-microphone-alt"></i>
18 <a href="Voico_Home.html">Voicoding</a> 18 <a href="Voico_Home.html">Voicoding</a>
......
...@@ -87,6 +87,7 @@ body { ...@@ -87,6 +87,7 @@ body {
87 } 87 }
88 88
89 #site-content { 89 #site-content {
90 + display:flex;
90 height: calc(100% - 45px - 19px); 91 height: calc(100% - 45px - 19px);
91 } 92 }
92 93
......
...@@ -141,8 +141,8 @@ function localStorageGetItem(key) { ...@@ -141,8 +141,8 @@ function localStorageGetItem(key) {
141 } 141 }
142 142
143 function showMessages() { 143 function showMessages() {
144 - var width = $updates.offset().left - parseFloat($updates.css("padding-left")) - 144 + var width = 100//$updates.offset().left - parseFloat($updates.css("padding-left")) -
145 - $navigationMessage.parent().offset().left - parseFloat($navigationMessage.parent().css("padding-left")) - 5; 145 + //$navigationMessage.parent().offset().left - parseFloat($navigationMessage.parent().css("padding-left")) - 5;
146 146
147 if (width < 200 || messagesData === undefined) { 147 if (width < 200 || messagesData === undefined) {
148 return; 148 return;
...@@ -255,7 +255,7 @@ function getIdFromURI() { ...@@ -255,7 +255,7 @@ function getIdFromURI() {
255 } 255 }
256 256
257 function downloadSource() { 257 function downloadSource() {
258 - var value = parseInt($selectLanguage.val()); 258 + var value = parseInt(71);
259 download(sourceEditor.getValue(), fileNames[value], "text/plain"); 259 download(sourceEditor.getValue(), fileNames[value], "text/plain");
260 } 260 }
261 261
...@@ -308,7 +308,7 @@ function run() { ...@@ -308,7 +308,7 @@ function run() {
308 308
309 var sourceValue = encode(sourceEditor.getValue()); 309 var sourceValue = encode(sourceEditor.getValue());
310 var stdinValue = encode(stdinEditor.getValue()); 310 var stdinValue = encode(stdinEditor.getValue());
311 - var languageId = resolveLanguageId($selectLanguage.val()); 311 + var languageId = resolveLanguageId(71);
312 var compilerOptions = $compilerOptions.val(); 312 var compilerOptions = $compilerOptions.val();
313 var commandLineArguments = $commandLineArguments.val(); 313 var commandLineArguments = $commandLineArguments.val();
314 314
...@@ -393,21 +393,21 @@ function fetchSubmission(submission_token) { ...@@ -393,21 +393,21 @@ function fetchSubmission(submission_token) {
393 393
394 function changeEditorLanguage() { 394 function changeEditorLanguage() {
395 monaco.editor.setModelLanguage(sourceEditor.getModel(), $selectLanguage.find(":selected").attr("mode")); 395 monaco.editor.setModelLanguage(sourceEditor.getModel(), $selectLanguage.find(":selected").attr("mode"));
396 - currentLanguageId = parseInt($selectLanguage.val()); 396 + currentLanguageId = parseInt(71);
397 $(".lm_title")[0].innerText = fileNames[currentLanguageId]; 397 $(".lm_title")[0].innerText = fileNames[currentLanguageId];
398 - apiUrl = resolveApiUrl($selectLanguage.val()); 398 + apiUrl = resolveApiUrl(71);
399 } 399 }
400 400
401 function insertTemplate() { 401 function insertTemplate() {
402 - currentLanguageId = parseInt($selectLanguage.val()); 402 + currentLanguageId = parseInt(71);
403 sourceEditor.setValue(sources[currentLanguageId]); 403 sourceEditor.setValue(sources[currentLanguageId]);
404 changeEditorLanguage(); 404 changeEditorLanguage();
405 } 405 }
406 406
407 function loadRandomLanguage() { 407 function loadRandomLanguage() {
408 // $selectLanguage.dropdown("set selected", values[Math.floor(Math.random() * $selectLanguage[0].length)]); 408 // $selectLanguage.dropdown("set selected", values[Math.floor(Math.random() * $selectLanguage[0].length)]);
409 - $selectLanguage.dropdown("set selected", 71); 409 + //$selectLanguage.dropdown("set selected", 71);
410 - apiUrl = resolveApiUrl($selectLanguage.val()); 410 + apiUrl = resolveApiUrl(71);
411 insertTemplate(); 411 insertTemplate();
412 } 412 }
413 413
...@@ -473,6 +473,7 @@ function updateScreenElements() { ...@@ -473,6 +473,7 @@ function updateScreenElements() {
473 473
474 $(window).resize(function() { 474 $(window).resize(function() {
475 layout.updateSize(); 475 layout.updateSize();
476 + console.log(`${layout.height}, ${layout.width}`);
476 updateScreenElements(); 477 updateScreenElements();
477 showMessages(); 478 showMessages();
478 }); 479 });
...@@ -582,7 +583,7 @@ $(document).ready(function () { ...@@ -582,7 +583,7 @@ $(document).ready(function () {
582 theme: "vs-dark", 583 theme: "vs-dark",
583 scrollBeyondLastLine: true, 584 scrollBeyondLastLine: true,
584 readOnly: state.readOnly, 585 readOnly: state.readOnly,
585 - language: "python", 586 + language: "cpp",
586 minimap: { 587 minimap: {
587 enabled: false 588 enabled: false
588 } 589 }
...@@ -591,7 +592,7 @@ $(document).ready(function () { ...@@ -591,7 +592,7 @@ $(document).ready(function () {
591 changeEditorMode(); 592 changeEditorMode();
592 593
593 sourceEditor.getModel().onDidChangeContent(function (e) { 594 sourceEditor.getModel().onDidChangeContent(function (e) {
594 - currentLanguageId = parseInt($selectLanguage.val()); 595 + currentLanguageId = parseInt(71);
595 isEditorDirty = sourceEditor.getValue() != sources[currentLanguageId]; 596 isEditorDirty = sourceEditor.getValue() != sources[currentLanguageId];
596 }); 597 });
597 598
......