Tidy submit page toolbar
This commit is contained in:
@@ -1,71 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="zh-CN">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>Submit Ace Smoke</title>
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
padding: 24px;
|
|
||||||
background: #f4f7fb;
|
|
||||||
font-family: "Segoe UI", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
#source {
|
|
||||||
width: 100%;
|
|
||||||
height: 320px;
|
|
||||||
border: 1px solid #d4d4d5;
|
|
||||||
border-radius: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hide_source {
|
|
||||||
width: 100%;
|
|
||||||
height: 140px;
|
|
||||||
margin-top: 16px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<pre id="source">#include <bits/stdc++.h>
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
</pre>
|
|
||||||
<textarea id="hide_source"></textarea>
|
|
||||||
<script src="../web/ace/ace.js"></script>
|
|
||||||
<script src="../web/ace/ext-language_tools.js"></script>
|
|
||||||
<script>
|
|
||||||
ace.config.set('basePath', '../web/ace');
|
|
||||||
var sourceElement = document.getElementById('source');
|
|
||||||
var hiddenSourceElement = document.getElementById('hide_source');
|
|
||||||
var initialSourceCode = sourceElement ? (sourceElement.textContent || sourceElement.innerText || '') : '';
|
|
||||||
var editor = ace.edit('source');
|
|
||||||
|
|
||||||
editor.setTheme('ace/theme/xcode');
|
|
||||||
editor.setShowPrintMargin(false);
|
|
||||||
editor.setBehavioursEnabled(true);
|
|
||||||
editor.session.setUseWrapMode(true);
|
|
||||||
editor.session.setTabSize(4);
|
|
||||||
editor.session.setUseSoftTabs(true);
|
|
||||||
editor.setOptions({
|
|
||||||
enableBasicAutocompletion: true,
|
|
||||||
enableSnippets: true,
|
|
||||||
enableLiveAutocompletion: true,
|
|
||||||
fontSize: '18px'
|
|
||||||
});
|
|
||||||
editor.setValue(initialSourceCode, -1);
|
|
||||||
|
|
||||||
function syncEditorSource() {
|
|
||||||
if (hiddenSourceElement) {
|
|
||||||
hiddenSourceElement.value = editor.getValue();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
editor.getSession().on('change', syncEditorSource);
|
|
||||||
syncEditorSource();
|
|
||||||
editor.getSession().setMode('ace/mode/c_cpp');
|
|
||||||
window.smokeEditor = editor;
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -54,6 +54,10 @@
|
|||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.submit-toolbar .submit-button-group {
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.submit-toolbar .field-group > label {
|
.submit-toolbar .field-group > label {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@@ -371,6 +375,11 @@
|
|||||||
.submit-title {
|
.submit-title {
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
}
|
}
|
||||||
|
.submit-toolbar .submit-button-group {
|
||||||
|
margin-left: 0;
|
||||||
|
width: 100%;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
#source {
|
#source {
|
||||||
height: 350px;
|
height: 350px;
|
||||||
}
|
}
|
||||||
@@ -399,14 +408,6 @@
|
|||||||
<script src="<?php echo $OJ_CDN_URL?>include/checksource.js"></script>
|
<script src="<?php echo $OJ_CDN_URL?>include/checksource.js"></script>
|
||||||
<form id="frmSolution" action="submit.php<?php if (isset($_GET['spa'])) echo "?spa" ?>" method="post" onsubmit="do_submit();return false;" enctype="multipart/form-data">
|
<form id="frmSolution" action="submit.php<?php if (isset($_GET['spa'])) echo "?spa" ?>" method="post" onsubmit="do_submit();return false;" enctype="multipart/form-data">
|
||||||
|
|
||||||
<div class="submit-actions submit-top-actions">
|
|
||||||
<div class="actions-left">
|
|
||||||
<button id="Submit" type="button" class="btn btn-primary" onclick="do_submit();">
|
|
||||||
<i class="paper plane icon"></i> <?php echo $MSG_SUBMIT?>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="submit-toolbar">
|
<div class="submit-toolbar">
|
||||||
<?php if (!isset($_GET['spa']) || $solution_name ) {?>
|
<?php if (!isset($_GET['spa']) || $solution_name ) {?>
|
||||||
<div class="field-group">
|
<div class="field-group">
|
||||||
@@ -443,6 +444,12 @@
|
|||||||
<img id="vcode-img" alt="click to change" src="vcode.php" onclick="this.src='vcode.php?'+Math.random()">
|
<img id="vcode-img" alt="click to change" src="vcode.php" onclick="this.src='vcode.php?'+Math.random()">
|
||||||
</div>
|
</div>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
|
|
||||||
|
<div class="field-group submit-button-group">
|
||||||
|
<button id="Submit" type="button" class="btn btn-primary" onclick="do_submit();">
|
||||||
|
<i class="paper plane icon"></i> <?php echo $MSG_SUBMIT?>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
Reference in New Issue
Block a user