From 5287d46931f3272987b21c2d6a16e914f48029d3 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Sat, 26 Nov 2016 23:18:51 +0800 Subject: Optimize hackmd resource packing and load orders --- public/js/extra.js | 2 +- public/views/foot.ejs | 25 ++++++++----------------- public/views/head.ejs | 35 +++++++---------------------------- public/views/help-modal.ejs | 2 +- 4 files changed, 17 insertions(+), 47 deletions(-) (limited to 'public') diff --git a/public/js/extra.js b/public/js/extra.js index dd02c9c1..20ce1728 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -904,7 +904,7 @@ emojify.setConfig({ elements: ['script', 'textarea', 'a', 'pre', 'code', 'svg'], classes: ['no-emojify'] }, - img_dir: serverurl + '/vendor/emojify.js/dist/images/basic', + img_dir: serverurl + '/build/emojify.js/dist/images/basic', ignore_emoticons: true }); diff --git a/public/views/foot.ejs b/public/views/foot.ejs index 3cfec764..4a54ac44 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -3,7 +3,9 @@ <% if(useCDN) { %> + + @@ -11,26 +13,15 @@ -<% } else { %> - - - - - - - - -<% } %> - - - - + <%- include build/index-scripts %> - - - +<% } else { %> + + +<%- include build/index-pack-scripts %> +<% } %> diff --git a/public/views/head.ejs b/public/views/head.ejs index fb51b14f..218847f7 100644 --- a/public/views/head.ejs +++ b/public/views/head.ejs @@ -8,36 +8,15 @@ <% if(useCDN) { %> + + + - - + +<%- include build/index-header %> <% } else { %> - - - - + +<%- include build/index-pack-header %> <% } %> - - - - - - - - - - - - - - - - - - - - -<%- include build/index-header %> - <%- include polyfill %> \ No newline at end of file diff --git a/public/views/help-modal.ejs b/public/views/help-modal.ejs index 08fee9c0..b1ea681d 100644 --- a/public/views/help-modal.ejs +++ b/public/views/help-modal.ejs @@ -113,7 +113,7 @@ ```javascript
var i = 0;
``` - :smile: + :smile: :smile: -- cgit v1.2.3