diff --git a/.editorconfig b/.editorconfig index e8019ba73..619c178d6 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,3 +9,7 @@ insert_final_newline = true [*.md] trim_trailing_whitespace = false + +[{.travis.yml,npm-shrinkwrap.json,package.json}] +indent_style = space +indent_size = 2 diff --git a/package.json b/package.json index 96b9c7e22..57e31ccf3 100644 --- a/package.json +++ b/package.json @@ -137,6 +137,7 @@ "json-loader": "^0.5.4", "less": "^2.7.1", "less-loader": "^2.2.3", + "optimize-css-assets-webpack-plugin": "^1.3.0", "script-loader": "^0.7.0", "style-loader": "^0.13.1", "url-loader": "^0.5.7", diff --git a/public/js/cover.js b/public/js/cover.js index c02f6c81b..6bc55dd98 100644 --- a/public/js/cover.js +++ b/public/js/cover.js @@ -1,5 +1,8 @@ require('./locale'); +require('../css/cover.css'); +require('../css/site.css'); + var common = require('./common'); var checkIfAuth = common.checkIfAuth; var urlpath = common.urlpath; diff --git a/public/js/extra.js b/public/js/extra.js index 01363886f..81dd4a28f 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -588,7 +588,7 @@ function exportToHTML(view) { var tocAffix = $('#ui-toc-affix').clone(); tocAffix.find('*').removeClass('active').find("a[href^='#'][smoothhashscroll]").removeAttr('smoothhashscroll'); //generate html via template - $.get(serverurl + '/css/html.min.css', function (css) { + $.get(serverurl + '/build/html.min.css', function (css) { $.get(serverurl + '/views/html.hbs', function (data) { var template = Handlebars.compile(data); var context = { diff --git a/public/js/htmlExport.js b/public/js/htmlExport.js new file mode 100644 index 000000000..e9fc41c61 --- /dev/null +++ b/public/js/htmlExport.js @@ -0,0 +1,5 @@ +require('../css/github-extract.css'); +require('../css/markdown.css'); +require('../css/extra.css'); +require('../css/slide-preview.css'); +require('../css/site.css'); diff --git a/public/js/index.js b/public/js/index.js index bb2a31f61..9c77ba8d3 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1,6 +1,11 @@ /* jquery and jquery plugins */ require('../vendor/showup/showup'); +require('../css/index.css'); +require('../css/extra.css'); +require('../css/slide-preview.css'); +require('../css/site.css'); + var toMarkdown = require('to-markdown'); var saveAs = require('file-saver').saveAs; @@ -2306,7 +2311,7 @@ socket.on('delete', function () { saveHistory(newnotehistory); location.href = serverurl; }); - } + } }); var retryTimer = null; socket.on('maintenance', function () { diff --git a/public/js/pretty.js b/public/js/pretty.js index 594035865..f7d319025 100644 --- a/public/js/pretty.js +++ b/public/js/pretty.js @@ -1,3 +1,7 @@ +require('../css/extra.css'); +require('../css/slide-preview.css'); +require('../css/site.css'); + /* other vendors plugin */ var S = require('string'); diff --git a/public/js/slide.js b/public/js/slide.js index 16ea6b8fa..b9521e641 100644 --- a/public/js/slide.js +++ b/public/js/slide.js @@ -1,3 +1,6 @@ +require('../css/extra.css'); +require('../css/site.css'); +require('../css/slide.css'); /* other vendors plugin */ var S = require('string'); diff --git a/public/views/head.ejs b/public/views/head.ejs index 00571186f..77cc1cf09 100644 --- a/public/views/head.ejs +++ b/public/views/head.ejs @@ -35,11 +35,9 @@ + <%- include build/index-header %> - - - - + <%- include build/cover-header %> - - diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs index d03be9c4b..c70553beb 100644 --- a/public/views/pretty.ejs +++ b/public/views/pretty.ejs @@ -32,9 +32,6 @@ <%- include build/pretty-header %> - - -