blob: 6a60df7d1ac2a48016ea82fba5d935954512489d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
{% extends "layout.html" %}
{% set sidebars = sidebars + ["demo_sidebar.html"] %}
{% block extrahead %}
{{ super() }}
<link rel="stylesheet" type="text/css" href="{{ pathto("_static/demo.css", 1) }}">
<script type="text/javascript">var languagePluginUrl = "{{ pathto("_static/pyodide/", 1) }}";</script>
<script type="text/javascript" src="{{ pathto("_static/pyodide/pyodide.js", 1) }}"></script>
<script type="text/javascript" src="{{ pathto("_static/demo.js", 1) }}"></script>
{% endblock %}
{% block htmltitle %}<title>Demo{{ titlesuffix }}</title>{% endblock %}
{% block body %}
{{ body }}
<h1>Demo - Try it out!</h1>
<p>The highlighting here is performed in-browser using
a WebAssembly translation of the latest Pygments master branch, courtesy of
<a href="https://github.com/iodide-project/pyodide">Pyodide</a>.</p>
<p>Your content is neither sent over the web nor stored anywhere.</p>
<div id="try">
<h2>Enter code and select a language</h2>
<form>
<p><span id="aroundlang">
<label for="lang">Language:</label> <select id="lang" onchange="reset_err_hl()">
<option value=""> Select a lexer </option>
</select>
</span>
·
<label for="style">Style:</label> <select id="style">
<option value="default">default </option>
</select></p>
<p><label for="file">Upload a file here:</label>
<input type="file" id="file" onchange="new_file()"> or enter code below:</p>
<p><textarea id="code" rows="1" cols="60"></textarea></p>
<p style="text-align: right">
<input type="button" value="Highlight!" onclick="highlight()" id="hlbtn" disabled>
<input type="reset" value="Reset"></p>
</form>
<div id="loading">
<p><img src="{{ pathto("_static/spinner.gif", 1) }}" style="vertical-align: middle"></p>
<p>Loading Python...</p>
</div>
</div>
<div id="hlcode"></div>
<div id="hlcodedl" style="display: none">
<input type="button" value="Download" onclick="download_code()">
</div>
{% endblock %}
|