forked from spitkov/sxbin
68 lines
1.9 KiB
HTML
68 lines
1.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Edit Content</title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
line-height: 1.6;
|
|
margin: 0;
|
|
padding: 20px;
|
|
background-color: #1a1a1a;
|
|
color: #f0f0f0;
|
|
}
|
|
.container {
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
}
|
|
h1 {
|
|
color: #4CAF50;
|
|
}
|
|
#editor {
|
|
width: 100%;
|
|
height: 400px;
|
|
font-family: monospace;
|
|
font-size: 14px;
|
|
background-color: #2a2a2a;
|
|
color: #f0f0f0;
|
|
border: 1px solid #4CAF50;
|
|
padding: 10px;
|
|
box-sizing: border-box;
|
|
}
|
|
input[type="submit"] {
|
|
background-color: #4CAF50;
|
|
color: white;
|
|
padding: 10px 20px;
|
|
border: none;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
margin-top: 10px;
|
|
}
|
|
input[type="submit"]:hover {
|
|
background-color: #45a049;
|
|
}
|
|
</style>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.12/ace.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>Edit Content</h1>
|
|
<form method="post">
|
|
<div id="editor">{{ content }}</div>
|
|
<input type="hidden" name="content" id="hidden-content">
|
|
<input type="submit" value="Save" onclick="updateContent()">
|
|
</form>
|
|
</div>
|
|
<script>
|
|
var editor = ace.edit("editor");
|
|
editor.setTheme("ace/theme/monokai");
|
|
editor.session.setMode("ace/mode/text");
|
|
|
|
function updateContent() {
|
|
document.getElementById('hidden-content').value = editor.getValue();
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |