diff options
author | 2018-06-13 16:43:42 +0100 | |
---|---|---|
committer | 2018-06-13 16:43:42 +0100 | |
commit | be2bbe35cf49763ad0258c005f3cbdddd7a21d75 (patch) | |
tree | 962d5e52f4bb57c397c068ae6a11b57952cfc459 /templates/wiki | |
parent | [DB] Attempt reconnection if current connection was lost (diff) |
Compile as much JS with Gulp as possible
This will concatenate ALL of our JS, and minify it - thus leaving us with a single file to be loaded.
There's a few libraries we can't do this with, unfortunately - these are now added in fouc.js:
* Ace Editor
* Flatpickr
* Font-Awesome
Diffstat (limited to 'templates/wiki')
-rw-r--r-- | templates/wiki/base.html | 11 | ||||
-rw-r--r-- | templates/wiki/page_edit.html | 3 | ||||
-rw-r--r-- | templates/wiki/revision_list.html | 2 |
3 files changed, 5 insertions, 11 deletions
diff --git a/templates/wiki/base.html b/templates/wiki/base.html index f9aa251e..0e5e9733 100644 --- a/templates/wiki/base.html +++ b/templates/wiki/base.html @@ -6,11 +6,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <!-- Prevent Flash of Unstyled Content --> - <script src="{{ static_file('js/fouc.js') }}"></script> - - <!-- Other JS loads --> - <script src="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-rc.4/js/uikit.min.js"></script> + <script src="{{ static_file('js/script.js') }}" type="application/javascript"></script> <!-- Static stuff --> <link rel="shortcut icon" href="{{ static_file('favicon.ico') }}"> @@ -216,7 +212,8 @@ </div> </footer> - <script src='{{ static_file('js/countdown.js') }}'></script> - <script src='{{ static_file('js/wiki.js') }}'></script> + <script> + wiki_sidebar(); + </script> </body> </html> diff --git a/templates/wiki/page_edit.html b/templates/wiki/page_edit.html index 69726d93..70f426e1 100644 --- a/templates/wiki/page_edit.html +++ b/templates/wiki/page_edit.html @@ -4,9 +4,6 @@ {% block og_description %}{% endblock %} {% block page_classes %}uses-rst{% endblock %} -{% block extra_head %} - <script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.3.3/ace.js" type="application/javascript"></script> -{% endblock %} {% block content %} <form uk-grid class="uk-grid-small" action="{{ url_for("wiki.edit", page=page) }}" method="post"> diff --git a/templates/wiki/revision_list.html b/templates/wiki/revision_list.html index a1936c32..cd6767db 100644 --- a/templates/wiki/revision_list.html +++ b/templates/wiki/revision_list.html @@ -31,6 +31,6 @@ </div> <script> let revisions = {{ revisions | tojson }}; + revision_diff(revisions); </script> - <script src="{{ static_file("js/revision_diff.js") }}"></script> {% endblock %} |