diff options
author | 2019-04-15 11:45:46 +0100 | |
---|---|---|
committer | 2019-04-15 11:45:46 +0100 | |
commit | ab1b31e9091a173bf22712df9133328d0408ecee (patch) | |
tree | 43331a6d327e69e6dfa51329f9e55a5b76c12f8f /pydis_site/static | |
parent | Editor: TOC insert correctly places on previous line rather than next line (diff) |
Remove TOC, link headers, fix breadcrumb padding
Also removes some templates we don't care about
Diffstat (limited to 'pydis_site/static')
-rw-r--r-- | pydis_site/static/css/wiki/style.css | 3 | ||||
-rw-r--r-- | pydis_site/static/js/wiki/load_editor.js | 21 |
2 files changed, 3 insertions, 21 deletions
diff --git a/pydis_site/static/css/wiki/style.css b/pydis_site/static/css/wiki/style.css new file mode 100644 index 00000000..b4f233f7 --- /dev/null +++ b/pydis_site/static/css/wiki/style.css @@ -0,0 +1,3 @@ +.breadcrumb-section { + padding: 1rem; +} diff --git a/pydis_site/static/js/wiki/load_editor.js b/pydis_site/static/js/wiki/load_editor.js index 69730b14..dfa087d9 100644 --- a/pydis_site/static/js/wiki/load_editor.js +++ b/pydis_site/static/js/wiki/load_editor.js @@ -17,28 +17,8 @@ title: "Insert image", }; - const TOCAction = { - name: "toc", - action: insertTOC, - className: "fa fa-stream", - title: "Insert Table of Contents" - }; - let elements = document.getElementsByClassName("simple-mde"); - function insertTOC(editor) { - let doc = editor.codemirror.getDoc(), - cursor = doc.getCursor(), - line = doc.getLine(cursor.line), - position = {"line": cursor.line, "ch": 0}; - - if (line.length === 0) { - doc.replaceRange(TOCText, position); - } else { - doc.replaceRange(TOCText + "\n", position) - } - } - for (let element of elements) { window.editors[element.id] = new SimpleMDE({ "element": element, @@ -67,7 +47,6 @@ "bold", "italic", "strikethrough", headingAction, "|", "code", "quote", "unordered-list", "ordered-list", "|", "link", imageAction, "table", "horizontal-rule", "|", - TOCAction, "|", "preview", "side-by-side", "fullscreen", "|", "guide" ], |