diff options
author | 2018-04-04 16:09:05 +0100 | |
---|---|---|
committer | 2018-04-04 16:09:05 +0100 | |
commit | 1d1e17f7f19203d449c8641794cd2c61705fdcd2 (patch) | |
tree | 63640306e93059a181b2af04952b0403c38ef8ee /templates | |
parent | CSRF error route doesn't do shit, sadly (diff) |
Early wiki work including a WS test route for RST parsing
Diffstat (limited to 'templates')
-rw-r--r-- | templates/main/ws_test_rst.html | 39 | ||||
-rw-r--r-- | templates/wiki/page_edit.html | 11 | ||||
-rw-r--r-- | templates/wiki/page_missing.html | 11 | ||||
-rw-r--r-- | templates/wiki/page_view.html | 11 |
4 files changed, 72 insertions, 0 deletions
diff --git a/templates/main/ws_test_rst.html b/templates/main/ws_test_rst.html new file mode 100644 index 00000000..a0bae79b --- /dev/null +++ b/templates/main/ws_test_rst.html @@ -0,0 +1,39 @@ +{% extends "main/base.html" %} +{% block title %}WS Test{% endblock %} +{% block og_title %}WS Test{% endblock %} +{% block og_description %}A test page for our Websockets implementation{% endblock %} +{% block content %} + <div class="uk-container uk-section"> + <h1>Enter some text to test.</h1> + + <textarea title="RST Input" id="rst"></textarea> + <input type="button" value="Submit" id="submit-button" /> + + <br /> + + <div id="output"></div> + + <script type="application/javascript"> + let ws = new WebSocket("wss://api.{{ server_name }}/ws/rst"); + + ws.onopen = function(event) { + console.log("WS opened! Use send() to send a message."); + }; + + ws.onmessage = function (event) { + document.getElementById("output").innerHTML = event.data; + }; + + function send(text) { + console.log("-> " + text); + ws.send(text); + } + + document.getElementById("submit-button").onclick = function() { + send( + document.getElementById("rst").value + ); + } + </script> + </div> +{% endblock %} diff --git a/templates/wiki/page_edit.html b/templates/wiki/page_edit.html new file mode 100644 index 00000000..5601cbbf --- /dev/null +++ b/templates/wiki/page_edit.html @@ -0,0 +1,11 @@ +{% extends "main/base.html" %} +{% block title %}Wiki | Home{% endblock %} +{% block og_title %}Wiki | Home{% endblock %} +{% block og_description %}Landing page for the wiki{% endblock %} +{% block content %} + <div class="uk-container uk-section"> + <h1 class="uk-title uk-text-center"> + Placeholder text. + </h1> + </div> +{% endblock %}
\ No newline at end of file diff --git a/templates/wiki/page_missing.html b/templates/wiki/page_missing.html new file mode 100644 index 00000000..5601cbbf --- /dev/null +++ b/templates/wiki/page_missing.html @@ -0,0 +1,11 @@ +{% extends "main/base.html" %} +{% block title %}Wiki | Home{% endblock %} +{% block og_title %}Wiki | Home{% endblock %} +{% block og_description %}Landing page for the wiki{% endblock %} +{% block content %} + <div class="uk-container uk-section"> + <h1 class="uk-title uk-text-center"> + Placeholder text. + </h1> + </div> +{% endblock %}
\ No newline at end of file diff --git a/templates/wiki/page_view.html b/templates/wiki/page_view.html new file mode 100644 index 00000000..5601cbbf --- /dev/null +++ b/templates/wiki/page_view.html @@ -0,0 +1,11 @@ +{% extends "main/base.html" %} +{% block title %}Wiki | Home{% endblock %} +{% block og_title %}Wiki | Home{% endblock %} +{% block og_description %}Landing page for the wiki{% endblock %} +{% block content %} + <div class="uk-container uk-section"> + <h1 class="uk-title uk-text-center"> + Placeholder text. + </h1> + </div> +{% endblock %}
\ No newline at end of file |