Cover page is now working

This commit is contained in:
Yukai Huang 2016-10-10 10:14:17 +08:00
parent 8cd1cf30a5
commit 20f2e27350
5 changed files with 32 additions and 11 deletions

View File

@ -1,3 +1,17 @@
var common = require('./common');
var checkIfAuth = common.checkIfAuth;
var urlpath = common.urlpath;
var serverurl = common.serverurl;
var resetCheckAuth = common.resetCheckAuth;
var historyModule = require('./history');
var parseStorageToHistory = historyModule.parseStorageToHistory;
var parseHistory = historyModule.parseHistory;
var getStorageHistory = historyModule.getStorageHistory;
var getHistory = historyModule.getHistory;
var saveHistory = historyModule.saveHistory;
var removeHistory = historyModule.removeHistory;
var options = { var options = {
valueNames: ['id', 'text', 'timestamp', 'fromNow', 'time', 'tags', 'pinned'], valueNames: ['id', 'text', 'timestamp', 'fromNow', 'time', 'tags', 'pinned'],
item: '<li class="col-xs-12 col-sm-6 col-md-6 col-lg-4">\ item: '<li class="col-xs-12 col-sm-6 col-md-6 col-lg-4">\

View File

@ -3,6 +3,7 @@ var store = require('store');
var common = require('./common'); var common = require('./common');
var checkIfAuth = common.checkIfAuth; var checkIfAuth = common.checkIfAuth;
var urlpath = common.urlpath; var urlpath = common.urlpath;
var serverurl = common.serverurl;
var extra = require('./extra'); var extra = require('./extra');
var renderFilename = extra.renderFilename; var renderFilename = extra.renderFilename;
@ -378,5 +379,11 @@ function parseToHistory(list, notehistory, callback) {
} }
module.exports = { module.exports = {
writeHistory: writeHistory writeHistory: writeHistory,
parseHistory: parseHistory,
getStorageHistory: getStorageHistory,
getHistory: getHistory,
saveHistory: saveHistory,
removeHistory: removeHistory,
parseStorageToHistory: parseStorageToHistory
} }

View File

@ -1,3 +1,5 @@
require('./cover');
var lang = "en"; var lang = "en";
var userLang = navigator.language || navigator.userLanguage; var userLang = navigator.language || navigator.userLanguage;
var userLangCode = userLang.split('-')[0]; var userLangCode = userLang.split('-')[0];

View File

@ -205,10 +205,7 @@
<script src="<%- url %>/vendor/file-saver/FileSaver.min.js" defer></script> <script src="<%- url %>/vendor/file-saver/FileSaver.min.js" defer></script>
<script src="<%- url %>/vendor/store-js/store.min.js" defer></script> <script src="<%- url %>/vendor/store-js/store.min.js" defer></script>
<script src="<%- url %>/vendor/lz-string/libs/lz-string.min.js" defer></script> <script src="<%- url %>/vendor/lz-string/libs/lz-string.min.js" defer></script>
<script src="<%- url %>/js/common.js" defer></script> <script src="<%- url %>/build/locale.js" defer></script>
<script src="<%- url %>/js/history.js" defer></script>
<script src="<%- url %>/js/cover.js" defer></script>
<script src="<%- url %>/js/locale.js" defer></script>
</body> </body>
</html> </html>

View File

@ -23,7 +23,8 @@ module.exports = {
entry: { entry: {
index: path.join(__dirname, 'public/js/index.js'), index: path.join(__dirname, 'public/js/index.js'),
public: path.join(__dirname, 'public/js/public.js'), public: path.join(__dirname, 'public/js/public.js'),
slide: path.join(__dirname, 'public/js/slide.js') slide: path.join(__dirname, 'public/js/slide.js'),
locale: path.join(__dirname, 'public/js/locale.js')
}, },
output: { output: {