diff --git a/src/node_modules/common.js b/src/node_modules/common.js index 86b35f6d..bdb14e61 100644 --- a/src/node_modules/common.js +++ b/src/node_modules/common.js @@ -172,6 +172,16 @@ var Common = { } }, + writeFile: function(filepath, data) { + var me = this; + try { + fs.writeFileSync(filepath, data); + return true; + } catch(e) { + return false; + } + }, + // 执行命令 cmd: function(args, exitFunc) { var me = this; diff --git a/src/node_modules/user.js b/src/node_modules/user.js index 5b3108a5..5639f1d3 100644 --- a/src/node_modules/user.js +++ b/src/node_modules/user.js @@ -76,11 +76,10 @@ User = { }, // for test - getAllUsers: function() { + getAllUsers: function(callback) { var me = this; db.users.find({}, function(err, users) { - console.log(err); - console.log(users); + callback && callback(users); }); }, @@ -160,7 +159,6 @@ User = { try { fs.mkdirSync(Evt.getBasePath() + '/data/' + this.getCurActiveUserId() + '/attachs'); } catch(e) { - console.log("eeeeeeeeeeeeeeeeee...........") console.log(e); } }, @@ -187,6 +185,14 @@ User = { }) }, + // 设为-1, 再刷新就会重新同步 + fullSyncForce: function(callback) { + var me = this; + db.users.update({UserId: me.getCurActiveUserId()}, {$set: {LastSyncUsn: -1}}, function() { + callback && callback(); + }); + }, + // 同步后更新同步状态 updateLastSyncState: function(callback) { var me = this; diff --git a/src/public/config.js b/src/public/config.js index b237d12e..124e0267 100644 --- a/src/public/config.js +++ b/src/public/config.js @@ -1,4 +1,23 @@ var Config = { - "plugins": ["theme", "import_evernote", "export_pdf"], - "lang": "zh-cn" + "plugins": [ + "theme", + "import_evernote", + "export_pdf", + "langs" + ], + "langs": [ + { + "filename": "en-us", + "name": "English" + }, + { + "filename": "zh-cn", + "name": "简体中文" + }, + { + "filename": "zh-hk", + "name": "繁体中文" + } + ], + "lang": "zh-hk" }; \ No newline at end of file diff --git a/src/public/js/app/api.js b/src/public/js/app/api.js index 12dddd80..041467c8 100644 --- a/src/public/js/app/api.js +++ b/src/public/js/app/api.js @@ -11,6 +11,16 @@ var Api = { fileService: FileService, noteService: NoteService, + getConfigFilePath: function() { + return EvtService.getProjectBasePath() + '/public/config.js'; + }, + writeConfig: function(config) { + var me = this; + var fileData = "var Config = " + JSON.stringify(config, null, 4) + ';'; + var ok = me.commonService.writeFile(me.getConfigFilePath(), fileData); + return ok; + }, + // data = {'en-us': {}, 'zh-cn' {}}; // prefix = 'plugin.theme' _langs: { @@ -52,6 +62,7 @@ var Api = { if(prefix) { key = prefix + '.' + key; } + var msg = me._langs[me.curLang][key] || me._langs[me.defaultLang][key] || key; if(data) { @@ -68,11 +79,12 @@ var Api = { // 与之前lang.js取出的数据合并 _init: function() { var me = this; + me._langs[me.curLang] || (me._langs[me.curLang] = {}); $.extend(me._langs[me.curLang], window.langData); // extend - window.getMsg = function(key, prefix) { - return me.getMsg(key, prefix); + window.getMsg = function(key, prefix, data) { + return me.getMsg(key, prefix, data); }; }, @@ -111,6 +123,7 @@ var Api = { }, + // 导出 _exportMenus: [], addExportMenu: function(menu) { var me = this; @@ -119,6 +132,17 @@ var Api = { getExportMenus: function() { var me = this; return me._exportMenus; + }, + + // 更多菜单 + _moreMenus: [], + getMoreMenus: function() { + var me = this; + return me._moreMenus; + }, + addMoreMenu: function(menu) { + var me = this; + me._moreMenus.push(menu); } }; diff --git a/src/public/js/app/page.js b/src/public/js/app/page.js index e34c9cfd..c996bca5 100644 --- a/src/public/js/app/page.js +++ b/src/public/js/app/page.js @@ -1068,6 +1068,17 @@ function fullSync(callback) { }); } +// 强制全量同步, 将Usn设为空, 刷新之 +function fullSyncForce() { + var ok = confirm(getMsg('ForceFullSyncMsg')); + if(ok) { + Note.curChangedSaveIt(); + UserService.fullSyncForce(function() { + location.reload(); + }); + } +} + // 增量同步 function incrSync() { log('incr sync'); @@ -1552,12 +1563,7 @@ function userMenu() { } }); - this.sync = new gui.MenuItem({ - label: getMsg('Sync now'), - click: function(e) { - incrSync(); - } - }); + this.checkForUpdates = new gui.MenuItem({ label: getMsg('Check for updates'), click: function(e) { @@ -1582,13 +1588,7 @@ function userMenu() { this.menu.append(Pren.pren); this.menu.append(Pren.fullScreen); - /* - this.menu.append(new gui.MenuItem( - {label: 'Toggle Presentation', click: function() { - // me.togglePren(); - } - })); - */ + height = 270; } @@ -1596,7 +1596,40 @@ function userMenu() { this.menu.append(this.checkForUpdates); this.menu.append(new gui.MenuItem({ type: 'separator' })); - this.menu.append(this.sync); + + this.more = new gui.MenuItem({ + label: getMsg('More...'), + click: function(e) { + } + }); + var mores = new gui.Menu(); + this.sync = new gui.MenuItem({ + label: getMsg('Sync now'), + click: function(e) { + incrSync(); + } + }); + this.fullSync = new gui.MenuItem({ + label: getMsg('Force full sync'), + click: function(e) { + fullSyncForce(); + } + }); + + mores.append(this.sync); + mores.append(this.fullSync); + + // 其它的 + var otherMoreMenus = Api.getMoreMenus(); + if(otherMoreMenus) { + for(var i = 0; i < otherMoreMenus.length; ++i) { + mores.append(otherMoreMenus[i]); + } + } + + this.more.submenu = mores; + + this.menu.append(this.more); this.popup = function(e) { var y = $(window).height() - height; diff --git a/src/public/langs/en-us.js b/src/public/langs/en-us.js index ee805886..c40f2e74 100644 --- a/src/public/langs/en-us.js +++ b/src/public/langs/en-us.js @@ -182,5 +182,7 @@ "Notebook": "Notebook", "Note": "Note", "Tag": "Tag", - "Starred": "Starred" + "Starred": "Starred", + + "ForceFullSyncMsg": "Full sync will load all data from server, are you sure ?" } \ No newline at end of file diff --git a/src/public/langs/zh-cn.js b/src/public/langs/zh-cn.js index fb7537cb..1477bdec 100644 --- a/src/public/langs/zh-cn.js +++ b/src/public/langs/zh-cn.js @@ -248,6 +248,10 @@ "Mode": "模式", "Toggle Fullscreen": "全屏切换", - "Toggle Presentation": "演示切换" + "Toggle Presentation": "演示切换", + + "More...": "更多", + "Force full sync": "强制全量同步", + "ForceFullSyncMsg": "强制全量同步会从服务器上同步所有数据, 可能耗时比较久, 你确定?" } \ No newline at end of file diff --git a/src/public/langs/zh-hk.js b/src/public/langs/zh-hk.js new file mode 100644 index 00000000..ed00b283 --- /dev/null +++ b/src/public/langs/zh-hk.js @@ -0,0 +1,257 @@ +{ + "3th": "第三方登錄", + "aboutLeanote": "關於leanote", + "aboutMe": "關於我", + "accountSetting": "帳戶設置", + "addChildNotebook": "添加子筆記本", + "addNotebook": "添加筆記本", + "addShare": "添加分享", + "all": "最新", + "app": "leanote", + "attachments ": " 附件", + "basicInfo": "基本信息", + "blog": "博客", + "blogInfo": "將筆記公開, 讓知識傳播的更遠!", + "blogSet": "博客設置", + "blue": "藍色", + "Cancel": "取消", + "cancelPublic": "取消公開為博客", + "canntNewNoteTips": "Sorry, 這裏不能添加筆記的. 妳需要先選擇壹個筆記本.", + "checkEmai": "查收郵箱", + "checkEmail": "查看郵件", + "clearSearch": "清除搜索", + "clickAddTag": "點擊添加標簽", + "clickToChangePermission": "點擊改變權限", + "clickToCopy": "點擊復制", + "Close": "關閉", + "confirmBackup": "確定要從該版還原? 還原前leanote會備份當前版本到歷史記錄中.", + "confirmPassword": "兩次密碼輸入不正確", + "cooperation": "協作", + "cooperationInfo": "分享給好友的同時也可以讓妳的好友和妳壹起來完善它.", + "Copy": "復制", + "copyFailed": "對不起, 復制失敗, 請自行復制", + "copySuccess": "復制成功", + "copyToMyNotebook": "復制到我的筆記本", + "create": "創建", + "createAccount": "創建帳號", + "createAccountFailed": "帳號創建失敗", + "createAccountSuccess": "帳號創建成功", + "curUser": "當前登錄帳戶", + "currentEmail": "當前郵箱為: \u003ccode\u003e%s\u003c/code\u003e ", + "datetime": "日期", + "default": "默認", + "defaultShare": "默認共享", + "defaulthhare": "默認共享", + "delete": "刪除", + "deleteAllShared": "刪除所有共享", + "deleteSharedNotebook": "刪除共享筆記本", + "demoRegister": "\u003ca href=\"/register\"\u003e立即註冊\u003c/a\u003e", + "discussion": "社區討論", + "donate ": " 捐贈", + "download": "下載", + "editorTips": "幫助", + "email": "Email", + "emailBodyRequired": "郵件內容不能為空", + "emailInSending": "正在發送郵件到", + "emailOrOthers": "Email或其它聯系方式", + "emailSendFailed": "郵件發送失敗", + "errorEmail": "請輸入正確的email", + "errorPassword": "請輸入長度不少於6位的密碼, 盡量復雜", + "findPassword": "找回密碼", + "findPasswordSendEmailOver": "已經將修改密碼的鏈接發送到您的郵箱, 請查收郵件.", + "findPasswordTimeout": "鏈接已過期", + "fold": "折疊", + "forgetPassword ": " 忘記密碼?", + "fork github": "Github 源碼", + "friendEmail": "好友郵箱", + "friendNotExits": "該用戶還沒有註冊%s, 復制邀請鏈接發送給Ta, 邀請鏈接: %s", + "green": "綠色", + "hadAcount ": " 已有帳戶?", + "hasAcount ": " 還無帳戶?", + "hi": "Hi", + "history": "歷史記錄", + "home": "主頁", + "howToInstallLeanote": "leanote安裝步驟", + "ing": "正在處理", + "inputEmail": "請輸入Email", + "inputFriendEmail": "請輸入好友郵箱", + "inputNewPassword": "請輸入新密碼", + "inputPassword": "請輸入密碼", + "inputPassword2": "請輸入確認密碼", + "inputUsername": "請輸入用戶名", + "knowledge": "知識", + "knowledgeInfo": "leanote是壹個筆記, 妳可以用它來管理自己的知識.", + "leanoteBlog": "官方博客", + "leftHidden": "隱藏左側", + "leftShow": "展開左側", + "login": "登錄", + "loginSuccess": "登錄成功, 正在跳轉", + "logining": "正在登錄", + "logout": "退出", + "minLength": "長度至少為%s", + "Move": "移動", + "myBlog": "我的博客", + "myNote": "我的筆記", + "myNotebook": "我的筆記本", + "myTag": "我的標簽", + "nav": "文檔導航", + "new": "新建", + "newMarkdown": "新建Markdown筆記", + "newMarkdownNote": "新建Markdown筆記", + "newNote": "新建筆記", + "newPassword": "新密碼", + "noHistories": "無歷史記錄", + "noNoteNewNoteTips": "該筆記本下空空如也...何不", + "noSpecialChars": "不能包含特殊字符", + "normalMode": "普通模式", + "notFound": "該頁面不存在", + "notGoodPassword": "密碼至少6位", + "notebook": "筆記本", + "oldPassword": "舊密碼", + "or": "或", + "password": "密碼", + "password2": "確認密碼", + "passwordTips": "密碼至少6位", + "permission": "權限", + "reFindPassword": "重新找回密碼", + "readOnly": "只讀", + "red": "紅色", + "register": "註冊", + "registerSuccessAndRdirectToNote": "註冊成功, 正在跳轉...", + "rename": "重命名", + "resendVerifiedEmail": "重新發送驗證郵件", + "restoreFromThisVersion": "從該版本還原", + "save": "保存", + "saveSuccess": "保存成功", + "saving": "正在保存", + "search": "搜索", + "send": "發送", + "sendFailed": "發送失敗", + "sendInviteEmailToYourFriend": "發送邀請email給Ta", + "sendSuccess": "發送成功", + "sendVerifiedEmail": "發送驗證郵箱", + "setAvatar": "頭像設置", + "setUsername": "用戶名設置", + "setUsernameTips": "妳的郵箱是 \u003ccode\u003e%s\u003c/code\u003e, 可以再設置壹個唯壹的用戶名.\u003cbr /\u003e用戶名至少4位, 不可含特殊字符.", + "share": "分享", + "shareInfo": "妳也可以將知識分享給妳的好友.", + "shareToFriends": "分享給好友", + "simple": "簡約", + "submit": "提交", + "suggestions": "建議", + "suggestionsInfo": "幫助我們完善leanote", + "tag": "標簽", + "themeSetting": "主題設置", + "thirdCreateAcountTips": "您現在使用的是第三方帳號登錄%(app)s, 您也可以註冊%(app)s帳號登錄, 趕緊註冊壹個吧. \u003cbr /\u003e註冊成功後仍可以使用第三方帳號登錄leanote並管理您現有的筆記.", + "trash": "廢紙簍", + "try": "體驗壹下", + "unTitled": "無標題", + "unVerified": "未驗證", + "unfold": "展開", + "update": "更新", + "updateEmail": "修改郵箱", + "updateEmailTips": "郵箱修改後, 驗證之後才有效, 驗證之後新的郵箱地址將會作為登錄帳號使用.", + "updatePassword": "修改密碼", + "updatePasswordSuccess": "修改密碼成功", + "updatePasswordSuccessRedirectToLogin": "修改成功, 正在跳轉到登錄頁", + "updateUsernameSuccess": "用戶名修改成功", + "uploadImage": "上傳圖片", + "use ": " 使用", + "usernameIsExisted": "用戶名已存在", + "usernameOrEmail": "用戶名或Email", + "usernameSetting": "用戶名設置", + "verified": "已驗證", + "verifiedEmaiHasSent": "驗證郵件已發送, 請及時查閱郵件並驗證.", + "verifiedNow": "現在去驗證", + "welcomeUseLeanote": "歡迎使用leanote", + "writable": "可寫", + "writingMode": "寫作模式", + "wrongEmail": "Email格式有誤", + "wrongPassword": "密碼有誤", + "wrongUsernameOrPassword": "用戶名或密碼有誤", + "yellow": "黃色", + "yourContact": "您的聯系方式", + "yourSuggestions": "幫助完善leanote", + "Close": "關閉", + + "Notebook": "筆記本", + "Note": "筆記", + "Tag": "標簽", + "Starred": "加星筆記", + "Newest": "最新筆記", + "New": "新建", + "New note": "新建筆記", + "Search note": "搜索筆記", + "Search notebook": "搜索筆記本", + + "Switch account": "切換帳戶", + "Sync": "同步", + "Loading": "正在加載", + "Choose Files": "選擇文件", + "Check for updates": "檢查更新", + "Checking for udpates...": "正在檢查是否有可用更新...", + "Upgrade": "升級", + "This note is conflicted with:": "該筆記與以下筆記沖突:", + "Maker as resolved": "標記已解決沖突", + "Leanote, Not Just A Notebook": "Leanote, 不只是筆記", + "Public as blog": "公開為博客", + "Cancel public": "取消公開為博客", + "Delete": "刪除", + "Remove": "移除", + "Export": "導出", + "Histories": "歷史記錄", + "Toggle writting mode": "切換寫作模式", + "Attachments": "附件", + "UnTitled": "無標題", + + "Add sub notebook": "添加子筆記本", + "Rename": "重命名", + "Import notes": "導入筆記", + + "My blog": "我的博客", + "Sync now": "立即同步", + + "Custom server": "配置服務", + "Host, http://leanote.com": "服務地址, 如 http://leanote.com", + "Username or Email": "用戶名或郵箱", + "Password": "密碼", + "Sign up": "註冊", + "Forget password?": "忘記密碼?", + "Find password": "找回密碼", + + "Untitled": "無標題", + "No Starred Note": "無加星筆記", + "Conflict": "沖突", + "Star": "加星", + "Blog": "博客", + "Setting": "設置", + + "Insert link into content": "插件附件鏈接到筆記中", + "Save as": "保存為", + + "Search results": "搜索結果", + + "Image saved successful!": "圖片保存成功!", + "Image saved failure!": "圖片保存失敗!", + "File saved failure!": "文件保存失敗!", + "File saved successful!": "文件保存成功", + + "File not exists": "文件不存在", + "Error": "錯誤", + "Cut": "剪切", + "Copy": "復制", + "Paste": "粘貼", + "Open link in browser": "在瀏覽器打開", + + "Info": "提示", + "Warning": "警告", + + "Mode": "模式", + "Toggle Fullscreen": "全屏切換", + "Toggle Presentation": "演示切換", + + "More...": "更多", + "Force full sync": "強制全量同步", + "ForceFullSyncMsg": "強制全量同步會從服務器上同步所有數據, 可能耗時比較久, 妳確定?" + +} \ No newline at end of file diff --git a/src/public/plugins/export_pdf/plugin.js b/src/public/plugins/export_pdf/plugin.js index 45b02a1c..e4d3801d 100644 --- a/src/public/plugins/export_pdf/plugin.js +++ b/src/public/plugins/export_pdf/plugin.js @@ -9,6 +9,9 @@ define(function() { }, 'zh-cn': { 'export': '导出PDF', + }, + 'zh-hk': { + 'export': '導出PDF', } }, diff --git a/src/public/plugins/import_evernote/plugin.js b/src/public/plugins/import_evernote/plugin.js index 7acc10e6..46715c5f 100644 --- a/src/public/plugins/import_evernote/plugin.js +++ b/src/public/plugins/import_evernote/plugin.js @@ -14,6 +14,9 @@ define(function() { }, 'zh-cn': { 'importEvernote': '导入Evernote', + }, + 'zh-hk': { + 'importEvernote': '導入Evernote', } }, diff --git a/src/public/plugins/langs/plugin.js b/src/public/plugins/langs/plugin.js new file mode 100644 index 00000000..e340975e --- /dev/null +++ b/src/public/plugins/langs/plugin.js @@ -0,0 +1,93 @@ +/** + * 语言设置插件 + */ +define(function() { + var setLang = { + langs: { + 'en-us': { + 'setLang': 'Langs', + }, + 'zh-cn': { + 'setLang': '语言设置', + }, + 'zh-hk': { + 'setLang': '語言設置', + } + }, + _langsMenu: {}, // // name => menu + setLang: function(langFileName) { + var me = this; + if(langFileName == Api.curLang) { + return; + } + for(var langN in me._langsMenu) { + var langMenu = me._langsMenu[langN]; + if(langN == langFileName) { + langMenu.checked = true; + } else { + langMenu.checked = false; + } + } + // 设置完后, 将langName写到Config.js中 + Config.lang = langFileName; + var ok = Api.writeConfig(Config); + if(ok) { + location.reload(); + } else { + alert(getMsg('error')); + } + }, + // 启动后 + setLangChecked: function(langFileName) { + var me = this; + me._langsMenu[langFileName].checked = true; + }, + // 打开前要执行的 + onOpen: function() { + var me = this; + var gui = Api.gui; + + var langSubmenus = new gui.Menu(); + + var langs = Config.langs; + for(var i = 0; i < langs.length; ++i) { + var lang = langs[i]; + (function(lang2) { + // alert(lang2.name) + me._langsMenu[lang2.filename] = new gui.MenuItem({ + label: lang2.name, + type: 'checkbox', + click: function(e) { + me.setLang(lang2.filename); + } + }); + + langSubmenus.append(me._langsMenu[lang2.filename]); + })(lang); + } + + var langMenu = new gui.MenuItem({ + label: Api.getMsg('plugin.langs.setLang'), + }); + langMenu.submenu = langSubmenus; + + // 设置 + Api.addMoreMenu(new gui.MenuItem({ + type: 'separator' + })); + Api.addMoreMenu(langMenu); + }, + // 打开后 + onOpenAfter: function() { + var me = this; + me.setLangChecked(Api.curLang); + }, + // 关闭时需要运行的 + onClose: function() { + + } + }; + + return setLang; + +}); diff --git a/src/public/plugins/langs/plugin.json b/src/public/plugins/langs/plugin.json new file mode 100644 index 00000000..79cc45b5 --- /dev/null +++ b/src/public/plugins/langs/plugin.json @@ -0,0 +1,16 @@ +{ + "name": "langs", + "author": "life", + "authorUrl": "http://life.leanote.com", + "desc": "语言", + "langs": { + "en-us": { + "pluginName": "Langs", + "pluginDesc": "" + }, + "zh-cn": { + "pluginName": "设置语言", + "pluginDesc": "" + } + } +} \ No newline at end of file diff --git a/src/public/plugins/theme/plugin.js b/src/public/plugins/theme/plugin.js index 1e756f33..17bcc58e 100644 --- a/src/public/plugins/theme/plugin.js +++ b/src/public/plugins/theme/plugin.js @@ -77,6 +77,9 @@ define(function() { }, 'zh-cn': { 'changeTheme': '修改主题', + }, + 'zh-hk': { + 'changeTheme': '修改主题' } }, // 打开前要执行的 diff --git a/src/public/themes/themes/black/theme.json b/src/public/themes/themes/black/theme.json index 6c47cf8e..24c78454 100644 --- a/src/public/themes/themes/black/theme.json +++ b/src/public/themes/themes/black/theme.json @@ -8,6 +8,9 @@ }, "zh-cn": { "name": "暗" + }, + "zh-hk": { + "name": "暗" } } } \ No newline at end of file diff --git a/src/public/themes/themes/blue/theme.json b/src/public/themes/themes/blue/theme.json index 0e438a20..77716364 100644 --- a/src/public/themes/themes/blue/theme.json +++ b/src/public/themes/themes/blue/theme.json @@ -8,6 +8,9 @@ }, "zh-cn": { "name": "蓝" + }, + "zh-hk": { + "name": "藍" } } } \ No newline at end of file diff --git a/src/public/themes/themes/grass/theme.json b/src/public/themes/themes/grass/theme.json index 0988c719..7aa44289 100644 --- a/src/public/themes/themes/grass/theme.json +++ b/src/public/themes/themes/grass/theme.json @@ -7,7 +7,10 @@ "name": "Grass" }, "zh-cn": { - "name": "草地" + "name": "绿草" + }, + "zh-hk": { + "name": "綠草" } } } \ No newline at end of file diff --git a/src/public/themes/themes/pebbles/theme.json b/src/public/themes/themes/pebbles/theme.json index 8592d8c4..6cdbd0a0 100644 --- a/src/public/themes/themes/pebbles/theme.json +++ b/src/public/themes/themes/pebbles/theme.json @@ -8,6 +8,9 @@ }, "zh-cn": { "name": "鹅卵石" + }, + "zh-hk": { + "name": "鵝卵石" } } } \ No newline at end of file diff --git a/src/public/themes/themes/vegetables/theme.json b/src/public/themes/themes/vegetables/theme.json index d3515b8a..5e518ed6 100644 --- a/src/public/themes/themes/vegetables/theme.json +++ b/src/public/themes/themes/vegetables/theme.json @@ -8,6 +8,9 @@ }, "zh-cn": { "name": "蔬菜" + }, + "zh-hk": { + "name": "蔬菜" } } } \ No newline at end of file diff --git a/src/public/themes/themes/water@2x.jpg b/src/public/themes/themes/water/images/water@2x.jpg similarity index 100% rename from src/public/themes/themes/water@2x.jpg rename to src/public/themes/themes/water/images/water@2x.jpg diff --git a/src/public/themes/themes/water/theme.css b/src/public/themes/themes/water/theme.css new file mode 100644 index 00000000..5f83faef --- /dev/null +++ b/src/public/themes/themes/water/theme.css @@ -0,0 +1,65 @@ +#leftNotebook { + background: none !important; + background-color: rgba(37, 49, 62, 0.96) !important; + background: url(images/water@2x.jpg) no-repeat !important; + background-size: 100% auto !important; +} +.folderHeader .fa-left, +.folderHeader span { + color: #fff; +} +#addNotebookPlus { + color: #F9F8F8; +} +#notebookList { + border-top: none; +} +#notebookList input { + background: transparent; + color: #fff; +} +.folderBody a:hover { + background-color: transparent !important; + font-weight: bold; +} +.ztree li a.curSelectedNode { + color: #eee; +} +.ztree li a.curSelectedNode, +#starNotes li.selected { + background-color: transparent; + font-weight: bold; +} +.ztree li a.curSelectedNode a, +#starNotes li.selected a { + color: #eee; +} +#starNotes li, +.ztree li { + border: none; +} +#starNotes li a, +.ztree li a { + color: #eee; +} +.sync-icon, +#myProfile a { + color: #fff; +} +#searchNotebookForList { + background: transparent; + color: #fff; + border: 1px solid rgba(230, 230, 230, 0.5); + height: 25px; +} +#searchNotebookForList::-webkit-input-placeholder { + color: #eee !important; + /* WebKit browsers */ + font-size: 12px; +} +.no-info { + color: #fff; +} +.progress-bar { + background: #fff; +} diff --git a/src/public/themes/themes/water/theme.json b/src/public/themes/themes/water/theme.json new file mode 100644 index 00000000..7f2b978d --- /dev/null +++ b/src/public/themes/themes/water/theme.json @@ -0,0 +1,16 @@ +{ + "author": "life", + "authorUrl": "http://life.leanote.com", + "desc": "", + "langs": { + "en-us": { + "name": "Water" + }, + "zh-cn": { + "name": "波光" + }, + "zh-hk": { + "name": "波光" + } + } +} \ No newline at end of file diff --git a/src/public/themes/themes/wheat@2x.jpg b/src/public/themes/themes/wheat/images/wheat@2x.jpg similarity index 100% rename from src/public/themes/themes/wheat@2x.jpg rename to src/public/themes/themes/wheat/images/wheat@2x.jpg diff --git a/src/public/themes/themes/wheat/theme.css b/src/public/themes/themes/wheat/theme.css new file mode 100644 index 00000000..8e073c0e --- /dev/null +++ b/src/public/themes/themes/wheat/theme.css @@ -0,0 +1,65 @@ +#leftNotebook { + background: none !important; + background-color: rgba(37, 49, 62, 0.96) !important; + background: url(images/wheat@2x.jpg) no-repeat !important; + background-size: 100% auto !important; +} +.folderHeader .fa-left, +.folderHeader span { + color: #fff; +} +#addNotebookPlus { + color: #F9F8F8; +} +#notebookList { + border-top: none; +} +#notebookList input { + background: transparent; + color: #fff; +} +.folderBody a:hover { + background-color: transparent !important; + font-weight: bold; +} +.ztree li a.curSelectedNode { + color: #eee; +} +.ztree li a.curSelectedNode, +#starNotes li.selected { + background-color: transparent; + font-weight: bold; +} +.ztree li a.curSelectedNode a, +#starNotes li.selected a { + color: #eee; +} +#starNotes li, +.ztree li { + border: none; +} +#starNotes li a, +.ztree li a { + color: #eee; +} +.sync-icon, +#myProfile a { + color: #fff; +} +#searchNotebookForList { + background: transparent; + color: #fff; + border: 1px solid rgba(230, 230, 230, 0.5); + height: 25px; +} +#searchNotebookForList::-webkit-input-placeholder { + color: #eee !important; + /* WebKit browsers */ + font-size: 12px; +} +.no-info { + color: #fff; +} +.progress-bar { + background: #fff; +} diff --git a/src/public/themes/themes/wheat/theme.json b/src/public/themes/themes/wheat/theme.json new file mode 100644 index 00000000..2abdbb61 --- /dev/null +++ b/src/public/themes/themes/wheat/theme.json @@ -0,0 +1,16 @@ +{ + "author": "life", + "authorUrl": "http://life.leanote.com", + "desc": "", + "langs": { + "en-us": { + "name": "Wheat" + }, + "zh-cn": { + "name": "小麦" + }, + "zh-hk": { + "name": "小麥" + } + } +} \ No newline at end of file diff --git a/src/public/themes/themes/wood@2x.jpg b/src/public/themes/themes/wood/images/wood@2x.jpg similarity index 100% rename from src/public/themes/themes/wood@2x.jpg rename to src/public/themes/themes/wood/images/wood@2x.jpg diff --git a/src/public/themes/themes/pebbles/theme.less b/src/public/themes/themes/wood/theme.css similarity index 54% rename from src/public/themes/themes/pebbles/theme.less rename to src/public/themes/themes/wood/theme.css index e2f13315..8532f328 100644 --- a/src/public/themes/themes/pebbles/theme.less +++ b/src/public/themes/themes/wood/theme.css @@ -1,12 +1,11 @@ #leftNotebook { background: none !important; - background-color: rgba(37,49,62, 0.96) !important; - background: url(images/left_bg.jpg) no-repeat !important; + background-color: rgba(37, 49, 62, 0.96) !important; + background: url(images/wood@2x.jpg) no-repeat !important; background-size: 100% auto !important; - // background-repeat: repeat; } - -.folderHeader .fa-left, .folderHeader span { +.folderHeader .fa-left, +.folderHeader span { color: #fff; } #addNotebookPlus { @@ -14,56 +13,53 @@ } #notebookList { border-top: none; - - // 添加笔记本框 - input { - background: transparent; - color: #fff; - } +} +#notebookList input { + background: transparent; + color: #fff; } .folderBody a:hover { background-color: transparent !important; font-weight: bold; } - .ztree li a.curSelectedNode { - color: #eee; + color: #eee; } .ztree li a.curSelectedNode, #starNotes li.selected { background-color: transparent; font-weight: bold; - a { - color: #eee; - } } - -#starNotes li, .ztree li { +.ztree li a.curSelectedNode a, +#starNotes li.selected a { + color: #eee; +} +#starNotes li, +.ztree li { border: none; - a { - color: #eee; - } } - -.sync-icon, #myProfile a { +#starNotes li a, +.ztree li a { + color: #eee; +} +.sync-icon, +#myProfile a { color: #fff; } - #searchNotebookForList { background: transparent; color: #fff; border: 1px solid rgba(230, 230, 230, 0.5); height: 25px; - &::-webkit-input-placeholder { - color: #eee !important; /* WebKit browsers */ - font-size: 12px; - } } - +#searchNotebookForList::-webkit-input-placeholder { + color: #eee !important; + /* WebKit browsers */ + font-size: 12px; +} .no-info { color: #fff; } - .progress-bar { background: #fff; } diff --git a/src/public/themes/themes/wood/theme.json b/src/public/themes/themes/wood/theme.json new file mode 100644 index 00000000..4182711b --- /dev/null +++ b/src/public/themes/themes/wood/theme.json @@ -0,0 +1,16 @@ +{ + "author": "life", + "authorUrl": "http://life.leanote.com", + "desc": "", + "langs": { + "en-us": { + "name": "Wood" + }, + "zh-cn": { + "name": "木纹" + }, + "zh-hk": { + "name": "木紋" + } + } +} \ No newline at end of file