From 8e11c19bed6b99b5476d9d7a6125dcfdd4119064 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Fri, 7 Oct 2016 23:06:10 +0800 Subject: Move out script tag and use js instead --- public/views/foot.ejs | 55 ++------------------------------------------------- 1 file changed, 2 insertions(+), 53 deletions(-) (limited to 'public/views') diff --git a/public/views/foot.ejs b/public/views/foot.ejs index 9328ac9c..128302f4 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -14,65 +14,15 @@ <% } else { %> - - - <% } %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -81,4 +31,3 @@ - \ No newline at end of file -- cgit v1.2.3 From ebee5a8d05a0282f5f584abc7d1eaa26d9d17ad8 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 8 Oct 2016 19:56:38 +0800 Subject: Use xss in script tag --- public/views/foot.ejs | 1 + 1 file changed, 1 insertion(+) (limited to 'public/views') diff --git a/public/views/foot.ejs b/public/views/foot.ejs index 128302f4..a530eff1 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -22,6 +22,7 @@ <% } %> + -- cgit v1.2.3 From 963a435ae1e9248b42b4665acf106dcffa549678 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 8 Oct 2016 20:02:30 +0800 Subject: Resolve dependency module requiring * es5 style module exports * remove script tag require * webpack config ProvidePlugin Note that this commit only fix JavaScript module loading runtime error. --- public/views/foot.ejs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'public/views') diff --git a/public/views/foot.ejs b/public/views/foot.ejs index a530eff1..759962de 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -22,13 +22,12 @@ <% } %> + + + + - - - - - -- cgit v1.2.3 From 845e9342c5b12638abcd6aa5cf96c9ce87762e9f Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sun, 9 Oct 2016 07:54:52 +0800 Subject: Add highlight.js and prism styles --- public/views/head.ejs | 3 --- 1 file changed, 3 deletions(-) (limited to 'public/views') diff --git a/public/views/head.ejs b/public/views/head.ejs index 5d8e44b6..6890ddf3 100644 --- a/public/views/head.ejs +++ b/public/views/head.ejs @@ -14,7 +14,6 @@ <% } else { %> - @@ -33,8 +32,6 @@ - - -- cgit v1.2.3 From 7e6b9f776ff18e77425bafaed76ede70fe712189 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sun, 9 Oct 2016 08:15:23 +0800 Subject: Revert customized ot library and fix dependency --- public/views/foot.ejs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'public/views') diff --git a/public/views/foot.ejs b/public/views/foot.ejs index 759962de..13805753 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -26,6 +26,8 @@ + + -- cgit v1.2.3 From 3e2905be13551a0cceeb18e72242be891db10db7 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sun, 9 Oct 2016 17:54:51 +0800 Subject: Revert to customized codemirror --- public/views/foot.ejs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'public/views') diff --git a/public/views/foot.ejs b/public/views/foot.ejs index 13805753..0ad10546 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -22,11 +22,13 @@ <% } %> + + + - - + -- cgit v1.2.3 From d0997ed0c18de0f17ea2f9435558f88e3f0fdd1c Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sun, 9 Oct 2016 18:08:46 +0800 Subject: Config TextExtract plugin and change build folder --- public/views/foot.ejs | 2 +- public/views/head.ejs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'public/views') diff --git a/public/views/foot.ejs b/public/views/foot.ejs index 0ad10546..7df96b58 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -31,7 +31,7 @@ - + diff --git a/public/views/head.ejs b/public/views/head.ejs index 6890ddf3..2aa85689 100644 --- a/public/views/head.ejs +++ b/public/views/head.ejs @@ -36,6 +36,7 @@ + -- cgit v1.2.3 From 53b5cbb89325f4acb239afb188c4bbabe1ea8189 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sun, 9 Oct 2016 21:09:22 +0800 Subject: Finish public note view js loading --- public/views/pretty.ejs | 42 +++++------------------------------------- 1 file changed, 5 insertions(+), 37 deletions(-) (limited to 'public/views') diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs index 2546b1ac..d6533a1f 100644 --- a/public/views/pretty.ejs +++ b/public/views/pretty.ejs @@ -23,21 +23,19 @@ <% } else { %> - <% } %> - - + @@ -30,7 +30,7 @@ - + diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs index d6533a1f..02908817 100644 --- a/public/views/pretty.ejs +++ b/public/views/pretty.ejs @@ -96,8 +96,8 @@ <% } %> - - + + -- cgit v1.2.3 From 70c20aaddaff75c3d0b7eb0fd53da13bb5651387 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sun, 9 Oct 2016 21:47:29 +0800 Subject: Remove redundant entry point --- public/views/foot.ejs | 2 +- public/views/head.ejs | 2 +- public/views/pretty.ejs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'public/views') diff --git a/public/views/foot.ejs b/public/views/foot.ejs index 7103b323..150214f4 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -31,7 +31,7 @@ - + diff --git a/public/views/head.ejs b/public/views/head.ejs index 2aa85689..72434892 100644 --- a/public/views/head.ejs +++ b/public/views/head.ejs @@ -36,7 +36,7 @@ - + diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs index 02908817..6b1096bb 100644 --- a/public/views/pretty.ejs +++ b/public/views/pretty.ejs @@ -35,7 +35,7 @@ - + diff --git a/public/views/index.ejs b/public/views/index.ejs index 04a401a4..79ee5ddc 100644 --- a/public/views/index.ejs +++ b/public/views/index.ejs @@ -193,9 +193,8 @@ <% } else { %> - + - diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs index 6b1096bb..346cb272 100644 --- a/public/views/pretty.ejs +++ b/public/views/pretty.ejs @@ -90,7 +90,7 @@ <% } else { %> - + diff --git a/public/views/slide.ejs b/public/views/slide.ejs index 1549989f..8c248917 100644 --- a/public/views/slide.ejs +++ b/public/views/slide.ejs @@ -87,7 +87,7 @@ <% } else { %> - + -- cgit v1.2.3 From 06437ccaa995afc48e30154c136c4e485ac04ae7 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Tue, 11 Oct 2016 14:52:45 +0800 Subject: Manage more packages with npm and webpack --- public/views/foot.ejs | 3 --- public/views/index.ejs | 8 +------- public/views/pretty.ejs | 2 -- public/views/slide.ejs | 1 - 4 files changed, 1 insertion(+), 13 deletions(-) (limited to 'public/views') diff --git a/public/views/foot.ejs b/public/views/foot.ejs index 9ce320bc..4a9b1756 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -15,14 +15,12 @@ <% } else { %> - <% } %> - @@ -30,7 +28,6 @@ - diff --git a/public/views/index.ejs b/public/views/index.ejs index 79ee5ddc..c7bea341 100644 --- a/public/views/index.ejs +++ b/public/views/index.ejs @@ -185,6 +185,7 @@ + <% if(useCDN) { %> @@ -193,17 +194,10 @@ <% } else { %> - - <% } %> - - - - - diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs index 346cb272..6f13155a 100644 --- a/public/views/pretty.ejs +++ b/public/views/pretty.ejs @@ -96,8 +96,6 @@ <% } %> - - diff --git a/public/views/slide.ejs b/public/views/slide.ejs index 8c248917..b0c5ddbc 100644 --- a/public/views/slide.ejs +++ b/public/views/slide.ejs @@ -96,7 +96,6 @@ <% } %> - -- cgit v1.2.3 From 56c5378939c6498d0440b3ed76a604523678073f Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Tue, 11 Oct 2016 17:15:06 +0800 Subject: Optimize viz.js async rendering through webpack chunk --- public/views/foot.ejs | 2 +- public/views/index.ejs | 2 +- public/views/pretty.ejs | 2 +- public/views/slide.ejs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'public/views') diff --git a/public/views/foot.ejs b/public/views/foot.ejs index 4a9b1756..adab9d15 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -21,7 +21,7 @@ <% } %> - + diff --git a/public/views/index.ejs b/public/views/index.ejs index c7bea341..c00623c6 100644 --- a/public/views/index.ejs +++ b/public/views/index.ejs @@ -185,7 +185,7 @@ - + <% if(useCDN) { %> diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs index 6f13155a..4cfbdb04 100644 --- a/public/views/pretty.ejs +++ b/public/views/pretty.ejs @@ -90,7 +90,7 @@ <% } else { %> - + diff --git a/public/views/slide.ejs b/public/views/slide.ejs index b0c5ddbc..b3212f44 100644 --- a/public/views/slide.ejs +++ b/public/views/slide.ejs @@ -87,7 +87,7 @@ <% } else { %> - + -- cgit v1.2.3 From 02eef3f68ae83b9d101f92f2a92b608879ba0855 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Wed, 12 Oct 2016 13:18:29 +0800 Subject: Load customized vendor script through script-loader --- public/views/foot.ejs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'public/views') diff --git a/public/views/foot.ejs b/public/views/foot.ejs index de714bbe..55be9e54 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -23,11 +23,7 @@ - - - - -- cgit v1.2.3 From 91266f1cad25c5f19f332134dd82011f01ce7419 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Wed, 12 Oct 2016 17:03:47 +0800 Subject: Load more scripts using webpack --- public/views/foot.ejs | 2 -- public/views/index.ejs | 1 - 2 files changed, 3 deletions(-) (limited to 'public/views') diff --git a/public/views/foot.ejs b/public/views/foot.ejs index 55be9e54..0ce4b85b 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -20,10 +20,8 @@ <% } %> - - diff --git a/public/views/index.ejs b/public/views/index.ejs index 93933771..f24a039e 100644 --- a/public/views/index.ejs +++ b/public/views/index.ejs @@ -203,7 +203,6 @@ <% } else { %> - <% } %> -- cgit v1.2.3 From 2cafe15e854b493d335652755b74674c7e2da4f6 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Wed, 12 Oct 2016 17:15:59 +0800 Subject: Enable production assets hash --- public/views/foot.ejs | 3 +-- public/views/head.ejs | 2 +- public/views/includes/header.ejs | 3 +++ public/views/includes/scripts.ejs | 3 +++ public/views/index.ejs | 4 ++-- public/views/pretty.ejs | 5 ++--- public/views/slide.ejs | 4 ++-- 7 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 public/views/includes/header.ejs create mode 100644 public/views/includes/scripts.ejs (limited to 'public/views') diff --git a/public/views/foot.ejs b/public/views/foot.ejs index 0ce4b85b..abf2da12 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -20,9 +20,8 @@ <% } %> - - +<%- include build/index-scripts %> diff --git a/public/views/head.ejs b/public/views/head.ejs index 72434892..f4ba108a 100644 --- a/public/views/head.ejs +++ b/public/views/head.ejs @@ -36,7 +36,7 @@ - +<%- include build/index-header %> diff --git a/public/views/includes/header.ejs b/public/views/includes/header.ejs new file mode 100644 index 00000000..89f3a0d1 --- /dev/null +++ b/public/views/includes/header.ejs @@ -0,0 +1,3 @@ +<% for (var css in htmlWebpackPlugin.files.css) { %> + +<% } %> diff --git a/public/views/includes/scripts.ejs b/public/views/includes/scripts.ejs new file mode 100644 index 00000000..4eec75e8 --- /dev/null +++ b/public/views/includes/scripts.ejs @@ -0,0 +1,3 @@ +<% for (var chunk in htmlWebpackPlugin.files.chunks) { %> + +<% } %> diff --git a/public/views/index.ejs b/public/views/index.ejs index f24a039e..0e41db57 100644 --- a/public/views/index.ejs +++ b/public/views/index.ejs @@ -27,6 +27,7 @@ + <%- include build/cover-header %> @@ -193,7 +194,6 @@ - <% if(useCDN) { %> @@ -205,7 +205,7 @@ <% } %> - + <%- include build/cover-scripts %> diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs index 6f7c4e72..e617383c 100644 --- a/public/views/pretty.ejs +++ b/public/views/pretty.ejs @@ -35,6 +35,7 @@ + <%- include build/pretty-header %> @@ -97,13 +98,11 @@ <% } else { %> - <% } %> +<%- include build/pretty-scripts %> - - <%- include ga %> diff --git a/public/views/slide.ejs b/public/views/slide.ejs index c463f378..f959a346 100644 --- a/public/views/slide.ejs +++ b/public/views/slide.ejs @@ -39,6 +39,7 @@ + <%- include build/slide-header %> <% } else { %> - @@ -103,7 +103,7 @@ <% } %> - + <%- include build/slide-scripts %> -- cgit v1.2.3 From 0bf3c63622a61e784cd00bc21a7e04661a9d6761 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Wed, 12 Oct 2016 17:37:21 +0800 Subject: Remove slide.ejs style tag --- public/views/slide.ejs | 1 - 1 file changed, 1 deletion(-) (limited to 'public/views') diff --git a/public/views/slide.ejs b/public/views/slide.ejs index f959a346..ac34006b 100644 --- a/public/views/slide.ejs +++ b/public/views/slide.ejs @@ -39,7 +39,6 @@ - <%- include build/slide-header %> <%- include build/index-scripts %> diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs index 7e617dc5..ecce68d9 100644 --- a/public/views/pretty.ejs +++ b/public/views/pretty.ejs @@ -102,6 +102,7 @@ <% } %> + <%- include build/pretty-scripts %> <%- include ga %> diff --git a/public/views/slide.ejs b/public/views/slide.ejs index ac34006b..5b24ab4e 100644 --- a/public/views/slide.ejs +++ b/public/views/slide.ejs @@ -102,6 +102,7 @@ <% } %> + <%- include build/slide-scripts %> -- cgit v1.2.3 From 773c0ce39e2da7ea155949b5a6dae986a747e89a Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Thu, 13 Oct 2016 11:42:17 +0800 Subject: Optimize common assets with CDN * jquery * lodash * socket.io * boostrap --- public/views/foot.ejs | 7 ++++--- public/views/head.ejs | 5 ++--- public/views/index.ejs | 3 ++- public/views/pretty.ejs | 10 +++++----- public/views/slide.ejs | 3 ++- 5 files changed, 15 insertions(+), 13 deletions(-) (limited to 'public/views') diff --git a/public/views/foot.ejs b/public/views/foot.ejs index 323d18f3..696fe3b6 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -3,11 +3,8 @@ <% if(useCDN) { %> - - - @@ -20,6 +17,10 @@ <% } %> + + + + <%- include build/index-scripts %> diff --git a/public/views/head.ejs b/public/views/head.ejs index f4ba108a..67884495 100644 --- a/public/views/head.ejs +++ b/public/views/head.ejs @@ -8,17 +8,16 @@ <% if(useCDN) { %> - - <% } else { %> - <% } %> + + diff --git a/public/views/index.ejs b/public/views/index.ejs index 0e41db57..0bc3dd50 100644 --- a/public/views/index.ejs +++ b/public/views/index.ejs @@ -195,7 +195,6 @@ ================================================== --> <% if(useCDN) { %> - @@ -205,6 +204,8 @@ <% } %> + + <%- include build/cover-scripts %> diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs index ecce68d9..0cd9e012 100644 --- a/public/views/pretty.ejs +++ b/public/views/pretty.ejs @@ -18,15 +18,14 @@ <% if(useCDN) { %> - - <% } else { %> - <% } %> + + @@ -90,8 +89,6 @@ MathJax.Hub.Config({ messageStyle: "none", skipStartupTypeset: true ,tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']], processEscapes: true }}); <% if(useCDN) { %> - - @@ -102,6 +99,9 @@ <% } %> + + + <%- include build/pretty-scripts %> diff --git a/public/views/slide.ejs b/public/views/slide.ejs index 5b24ab4e..79d77086 100644 --- a/public/views/slide.ejs +++ b/public/views/slide.ejs @@ -87,7 +87,6 @@ MathJax.Hub.Config({ messageStyle: "none", skipStartupTypeset: true ,tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']], processEscapes: true }}); <% if(useCDN) { %> - @@ -102,6 +101,8 @@ <% } %> + + <%- include build/slide-scripts %> -- cgit v1.2.3