NDOJ/templates/ide.html

228 lines
12 KiB
HTML
Raw Normal View History

2022-02-21 01:33:35 +00:00
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Favicons-->
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/manifest.json">
<meta name="msapplication-TileColor" content="#FFBB33">
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
{# Chrome 39 for Android colour #}
<meta name="theme-color" content="#FFBB33">
{% if og_image %}
<meta property="og:image" content="{{ request.build_absolute_uri(og_image) }}">
{% endif %}
{% block og_title %}{% endblock %}
<meta property="og:site_name" content="{{ SITE_LONG_NAME }}">
<meta property="og:url"
content="{{ DMOJ_SCHEME }}://{{ DMOJ_CANONICAL|default(site.domain) }}{{ request.get_full_path() }}">
{% if meta_description %}
<meta property="og:description" content="{{ meta_description }}">
{% endif %}
<meta property="og:title" content="IDE">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/golden-layout/1.5.9/goldenlayout.min.js" integrity="sha256-NhJAZDfGgv4PiB+GVlSrPdh3uc75XXYSM4su8hgTchI=" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/golden-layout/1.5.9/css/goldenlayout-base.css" integrity="sha256-oIDR18yKFZtfjCJfDsJYpTBv1S9QmxYopeqw2dO96xM=" crossorigin="anonymous" />
<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" />
<script>
var require = {
paths: {
"vs": "https://unpkg.com/monaco-editor/min/vs",
"monaco-vim": "https://unpkg.com/monaco-vim/dist/monaco-vim",
"monaco-emacs": "https://unpkg.com/monaco-emacs/dist/monaco-emacs"
}
};
</script>
<script src="https://unpkg.com/monaco-editor/min/vs/loader.js"></script>
<script src="https://unpkg.com/monaco-editor@0.23.0/min/vs/editor/editor.main.nls.js"></script>
<script src="https://unpkg.com/monaco-editor@0.23.0/min/vs/editor/editor.main.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css" integrity="sha256-9mbkOfVho3ZPXfM7W8sV2SndrGDuh7wuyLjtsWeTI1Q=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.js" integrity="sha256-t8GepnyPmw9t+foMh3mKNvcorqNHamSKtKRxxpUEgFI=" crossorigin="anonymous"></script>
<link href="https://fonts.googleapis.com/css?family=Exo+2" rel="stylesheet">
<script type="text/javascript" src="{{ static('download.js') }}"></script>
<script type="text/javascript" src="{{ static('ide.js') }}"></script>
<link type="text/css" rel="stylesheet" href="{{ static('ide.css') }}">
<title>IDE</title>
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
<link rel="icon" href="./favicon.ico" type="image/x-icon">
<script>
$(function() {
window.apiUrl = "{{ url('ide_api') }}";
$(window).on('beforeunload', function(e) {
return "T";
});
});
</script>
</head>
<body>
<div id="site-navigation" class="ui small inverted menu">
<div id="site-header" class="header item">
<a href="/">
<img id="site-icon" src="{{ static('icons/logo.png') }}">
</a>
</div>
<div class="left menu">
<div class="ui dropdown item site-links on-hover">
File <i class="dropdown icon"></i>
<div class="menu">
<a class="item" target="_blank" href="/"><i class="file code icon"></i>{{ _('New File') }}</a>
<div class="item" onclick="downloadSource()"><i class="download icon"></i>{{ _('Download') }}</div>
<div id="insert-template-btn" class="item"><i class="file code outline icon"></i>{{ _('Insert template
for current language') }}</div>
</div>
</div>
<div class="link item" onclick="$('#site-settings').modal('show')"><i class="cog icon"></i> Settings</div>
<div class="item borderless">
<select id="select-language" class="ui dropdown">
<option value="45" mode="UNKNOWN">Assembly (NASM 2.14.02)</option> <!-- Unknown mode. Help needed. -->
<option value="46" mode="shell">Bash (5.0.0)</option>
<option value="47" mode="UNKNOWN">Basic (FBC 1.07.1)</option> <!-- Unknown mode. Help needed. -->
<option value="75" mode="c">C (Clang 7.0.1)</option>
<option value="48" mode="c">C (GCC 7.4.0)</option>
<option value="49" mode="c">C (GCC 8.3.0)</option>
<option value="50" mode="c">C (GCC 9.2.0)</option>
<option value="51" mode="csharp">C# (Mono 6.6.0.161)</option>
<option value="76" mode="cpp">C++ (Clang 7.0.1)</option>
<option value="52" mode="cpp">C++ (GCC 7.4.0)</option>
<option value="53" mode="cpp">C++ (GCC 8.3.0)</option>
<option value="54" mode="cpp">C++ (GCC 9.2.0)</option>
<option value="86" mode="clojure">Clojure (1.10.1)</option>
<option value="77" mode="UNKNOWN">COBOL (GnuCOBOL 2.2)</option> <!-- Unknown mode. Help needed. -->
<option value="55" mode="UNKNOWN">Common Lisp (SBCL 2.0.0)</option> <!-- Unknown mode. Help needed. -->
<option value="56" mode="UNKNOWN">D (DMD 2.089.1)</option> <!-- Unknown mode. Help needed. -->
<option value="57" mode="UNKNOWN">Elixir (1.9.4)</option> <!-- Unknown mode. Help needed. -->
<option value="58" mode="UNKNOWN">Erlang (OTP 22.2)</option> <!-- Unknown mode. Help needed. -->
<option value="44" mode="plaintext">Executable</option>
<option value="87" mode="fsharp">F# (.NET Core SDK 3.1.202)</option>
<option value="59" mode="UNKNOWN">Fortran (GFortran 9.2.0)</option> <!-- Unknown mode. Help needed. -->
<option value="60" mode="go">Go (1.13.5)</option>
<option value="88" mode="UNKNOWN">Groovy (3.0.3)</option> <!-- Unknown mode. Help needed. -->
<option value="61" mode="UNKNOWN">Haskell (GHC 8.8.1)</option> <!-- Unknown mode. Help needed. -->
<option value="62" mode="java">Java (OpenJDK 13.0.1)</option>
<option value="63" mode="javascript">JavaScript (Node.js 12.14.0)</option>
<option value="78" mode="kotlin">Kotlin (1.3.70)</option>
<option value="64" mode="lua">Lua (5.3.5)</option>
<option value="79" mode="objective-c">Objective-C (Clang 7.0.1)</option>
<option value="65" mode="UNKNOWN">OCaml (4.09.0)</option> <!-- Unknown mode. Help needed. -->
<option value="66" mode="UNKNOWN">Octave (5.1.0)</option> <!-- Unknown mode. Help needed. -->
<option value="67" mode="pascal">Pascal (FPC 3.0.4)</option>
<option value="85" mode="perl">Perl (5.28.1)</option>
<option value="68" mode="php">PHP (7.4.1)</option>
<option value="43" mode="plaintext">Plain Text</option>
<option value="69" mode="UNKNOWN">Prolog (GNU Prolog 1.4.5)</option> <!-- Unknown mode. Help needed. -->
<option value="70" mode="python">Python (2.7.17)</option>
<option value="71" mode="python">Python (3.8.1)</option>
<option value="80" mode="r">R (4.0.0)</option>
<option value="72" mode="ruby">Ruby (2.7.0)</option>
<option value="73" mode="rust">Rust (1.40.0)</option>
<option value="81" mode="UNKNOWN">Scala (2.13.2)</option> <!-- Unknown mode. Help needed. -->
<option value="83" mode="swift">Swift (5.2.3)</option>
<option value="74" mode="typescript">TypeScript (3.7.4)</option>
<option value="84" mode="vb">Visual Basic.Net (vbnc 0.0.0.5943)</option> <!-- (vbnc 0.0.0.5943) -->
</select>
</div>
<div class="item no-left-padding borderless">
<button id="run-btn" class="ui primary labeled icon button"><i class="play icon"></i>Run (F9)</button>
</div>
</div>
</div>
<div id="site-content"></div>
<div id="site-modal" class="ui modal">
<div class="header">
<i class="close icon"></i>
<span id="title"></span>
</div>
<div class="scrolling content"></div>
<div class="actions">
<div class="ui small labeled icon cancel button">
<i class="remove icon"></i>
Close (ESC)
</div>
</div>
</div>
<div id="site-settings" class="ui modal">
<i class="close icon"></i>
<div class="header">
<i class="cog icon"></i>
Settings
</div>
<div class="content">
<div class="ui form">
<div class="inline fields">
<label>Editor Mode</label>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="editor-mode" value="normal" checked="checked">
<label>Normal</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="editor-mode" value="vim">
<label>Vim</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="editor-mode" value="emacs">
<label>Emacs</label>
</div>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
<input type="checkbox" name="redirect-output">
<label>Redirect stderr to stdout</label>
</div>
</div>
<div class="inline field">
<label>{{ _('Editor Theme') }}</label>
<select id="select-theme" class="ui dropdown">
<option value="vs">VS Light</option>
<option value="vs-dark">VS Dark</option>
<option value="hc-black">HC Black</option>
</select>
</div>
</div>
</div>
</div>
<div id="site-footer">
<div id="editor-status-line"></div>
<span id="cursor-position"></span>
</div>
</body>
</html>