beautification of editor
This commit is contained in:
@@ -275,6 +275,39 @@ tr:nth-child(odd) {
|
||||
|
||||
/* editor */
|
||||
|
||||
#editor_container {
|
||||
float:right;
|
||||
padding: 12px;
|
||||
border: 4px solid var(--border-color);
|
||||
background-color: var(--background-dark-color);
|
||||
line-height: 2em;
|
||||
-webkit-border-bottom-left-radius: 15px;
|
||||
-moz-border-radius-bottomleft: 15px;
|
||||
border-bottom-left-radius: 15px;
|
||||
}
|
||||
|
||||
#editor_form {
|
||||
}
|
||||
|
||||
#editor_area {
|
||||
width: 40vw;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#editor_preview {
|
||||
width: 40vw;
|
||||
margin-left: 2vw;
|
||||
float: left;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
#editor_preview p {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.href_button {
|
||||
margin-left: 3em;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
|
||||
4
code/static/js/remarkable.min.js
vendored
Normal file
4
code/static/js/remarkable.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -21,18 +21,18 @@ function index_form_submit() {
|
||||
document.getElementById("index_form_name").value;
|
||||
}
|
||||
|
||||
|
||||
function infoToggle() {
|
||||
var info = document.getElementById("list_info");
|
||||
info.style.display = info.style.display === 'block' ? 'none' : 'block';
|
||||
function toggler(id) {
|
||||
var el = document.getElementById(id);
|
||||
if (el) {
|
||||
el.style.display = el.style.display === 'block' ? 'none' : 'block';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function infoToggle() {
|
||||
toggler("list_info");
|
||||
}
|
||||
function scriptToggle() {
|
||||
var el = document.getElementById("list_script");
|
||||
if (el) {
|
||||
el.style.display = el.style.display === 'block' ? 'none' : 'block';
|
||||
}
|
||||
toggler("list_script");
|
||||
}
|
||||
|
||||
|
||||
@@ -151,6 +151,20 @@ function UploadURL() {
|
||||
}
|
||||
|
||||
|
||||
function updateEditorPreview() {
|
||||
var input = document.getElementById("editor_area");
|
||||
var preview = document.getElementById("editor_preview");
|
||||
preview.innerHTML = md.render(input.value);
|
||||
}
|
||||
function previewToggle() {
|
||||
toggler("editor_preview");
|
||||
if (document.getElementById("editor_preview").style.display === 'block') {
|
||||
document.getElementById("editor_area").style.width = "40vw";
|
||||
} else {
|
||||
document.getElementById("editor_area").style.width = "82vw";
|
||||
}
|
||||
}
|
||||
|
||||
function changeTitle(newTitle) {
|
||||
document.title = "Flees - " + newTitle;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user