mirror of https://github.com/IoTcat/PyOne.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.1 KiB
34 lines
1.1 KiB
{%extends 'layout.html'%} |
|
|
|
{%block content%} |
|
<style type="text/css" media="screen"> |
|
#editor { |
|
/*height:800px;*/ |
|
} |
|
</style> |
|
<div class="mdui-container"> |
|
<pre id="editor" >{{content}}</pre> |
|
</div> |
|
<div class="mdui-textfield"> |
|
<label class="mdui-textfield-label">下载地址</label> |
|
<input class="mdui-textfield-input" type="text" value="{{url}}"/> |
|
</div> |
|
<a href="{{url}}" class="mdui-fab mdui-fab-fixed mdui-ripple mdui-color-theme-accent"><i class="mdui-icon material-icons">file_download</i></a> |
|
|
|
<script src="https://cdn.bootcss.com/ace/1.2.9/ace.js"></script> |
|
<script src="https://cdn.bootcss.com/ace/1.2.9/ext-language_tools.js"></script> |
|
<script> |
|
var editor = ace.edit("editor"); |
|
editor.setTheme("ace/theme/ambiance"); |
|
editor.setFontSize(18); |
|
editor.session.setMode("ace/mode/{{language}}"); |
|
|
|
//Autocompletion |
|
editor.setOptions({ |
|
enableBasicAutocompletion: true, |
|
enableSnippets: true, |
|
enableLiveAutocompletion: true, |
|
maxLines: Infinity |
|
}); |
|
</script> |
|
{%endblock content%}
|
|
|