This commit is contained in:
life
2015-04-12 23:28:54 +08:00
parent f78349822c
commit c567103193
34 changed files with 1970 additions and 251 deletions

View File

@@ -8,7 +8,7 @@
<meta name="keywords" content="leanote,leanote.com"> <meta name="keywords" content="leanote,leanote.com">
<meta name="description" content="leanote, Not Just A Notebook!"> <meta name="description" content="leanote, Not Just A Notebook!">
<meta name="author" content="leanote"> <meta name="author" content="leanote">
<title>Leanote login</title> <title class="lang">Leanote login</title>
<link href="public/css/bootstrap.css" rel="stylesheet"> <link href="public/css/bootstrap.css" rel="stylesheet">
<link href="public/css/font-awesome-4.2.0/css/font-awesome.css" rel="stylesheet"> <link href="public/css/font-awesome-4.2.0/css/font-awesome.css" rel="stylesheet">
<link href="public/css/index.css" rel="stylesheet"> <link href="public/css/index.css" rel="stylesheet">
@@ -82,6 +82,10 @@ try {
console.log(e); console.log(e);
} }
function getMsg(key) {
return langData[key] || key;
}
$(function() { $(function() {
$('.tool-close, .tool-close-blur').click(function() { $('.tool-close, .tool-close-blur').click(function() {
// mac下关闭才是隐藏 // mac下关闭才是隐藏
@@ -116,20 +120,20 @@ $(function() {
var host = $('#host').val(); var host = $('#host').val();
if(!email) { if(!email) {
showMsg("Email is required", "email"); showMsg(getMsg("Email is required"), "email");
return; return;
} }
if(!pwd) { if(!pwd) {
showMsg("Password is required", "pwd"); showMsg(getMsg("Password is required"), "pwd");
return; return;
} else { } else {
if(pwd.length < 6) { if(pwd.length < 6) {
showMsg("Email or Password Error", "pwd"); showMsg(getMsg("Email or Password Error"), "pwd");
return; return;
} }
} }
if(hasHost && (!host || !isValidUrl(host))) { if(hasHost && (!host || !isValidUrl(host))) {
showMsg('Invalid host', 'host'); showMsg(getMsg('Invalid host'), 'host');
return; return;
} }
$('#loadingLogo').addClass('loading'); $('#loadingLogo').addClass('loading');
@@ -149,7 +153,7 @@ $(function() {
gui.Window.open('note.html', getMainWinParams()); gui.Window.open('note.html', getMainWinParams());
win.close(); win.close();
} else { } else {
showMsg("Email or Password Error"); showMsg(getMsg("Email or Password Error"));
} }
}); });
}); });

18
src/node_modules/file.js generated vendored
View File

@@ -377,16 +377,16 @@ var File = {
// 访问api, 得到图片 // 访问api, 得到图片
function getImageFromApi() { function getImageFromApi() {
console.log('fetch servers image ' + fileId); // console.log('fetch servers image ' + fileId);
Api.getImage(fileId, function(fileLocalPath, filename) { Api.getImage(fileId, function(fileLocalPath, filename) {
if(fileLocalPath) { if(fileLocalPath) {
console.log('save image to local'); // console.log('save image to local');
// 保存到本地数据库中 // 保存到本地数据库中
me.addImageForce(fileId, fileLocalPath, function(doc) { me.addImageForce(fileId, fileLocalPath, function(doc) {
if(doc) { if(doc) {
console.log('save image to local success'); // console.log('save image to local success');
} else { } else {
console.log('save image to local error'); // console.log('save image to local error');
} }
callback(fileLocalPath); callback(fileLocalPath);
// return me.retImage(fileLocalPath, res); // return me.retImage(fileLocalPath, res);
@@ -394,8 +394,8 @@ var File = {
} else { } else {
// 远程取不到图片, 是没有网络? 还是远程真的没有了 // 远程取不到图片, 是没有网络? 还是远程真的没有了
// TODO // TODO
console.log("cann't get server's image" + fileId); // console.log("cann't get server's image" + fileId);
callback(false); // callback(false);
// return me.e404(res); // return me.e404(res);
} }
}); });
@@ -404,13 +404,13 @@ var File = {
// has表示本地数据库有记录 // has表示本地数据库有记录
me.getImageLocalPath(fileId, function(has, fileLocalPath) { me.getImageLocalPath(fileId, function(has, fileLocalPath) {
// 本地有 // 本地有
console.log('re img') // console.log('re img')
console.log(fileLocalPath); // console.log(fileLocalPath);
// console.log(fs.exists(fileLocalPath)); // console.log(fs.exists(fileLocalPath));
if(has && fileLocalPath) { if(has && fileLocalPath) {
fs.exists(fileLocalPath, function(exists) { fs.exists(fileLocalPath, function(exists) {
if(exists) { if(exists) {
console.log('本地存在'); // console.log('本地存在');
callback(fileLocalPath); callback(fileLocalPath);
// me.retImage(fileLocalPath, res); // me.retImage(fileLocalPath, res);
} else { } else {

6
src/node_modules/note.js generated vendored
View File

@@ -102,7 +102,7 @@ var Note = {
// 只有title, Content, Tags修改了才算是IsDirty // 只有title, Content, Tags修改了才算是IsDirty
if('Content' in updates && dbNote['Content'] != updates['Content']) { if('Content' in updates && dbNote['Content'] != updates['Content']) {
isDirty = true; isDirty = true;
console.error(' content not same'); // console.error(' content not same');
// ContentIsDirty 才会发Content // ContentIsDirty 才会发Content
updates['ContentIsDirty'] = true; updates['ContentIsDirty'] = true;
@@ -124,8 +124,8 @@ var Note = {
updates['LocalIsDelete'] = false; updates['LocalIsDelete'] = false;
updates.UpdatedTime = date; updates.UpdatedTime = date;
console.log('finally update:'); // console.log('finally update:');
console.log(updates); // console.log(updates);
// Set an existing field's value // Set an existing field's value
Notes.update({NoteId: noteOrContent.NoteId}, { $set: updates }, {}, function (err, numReplaced) { Notes.update({NoteId: noteOrContent.NoteId}, { $set: updates }, {}, function (err, numReplaced) {

View File

@@ -33,7 +33,7 @@ if(process.platform != 'darwin') {
document.write('<link rel="stylesheet" href="public/css/theme/windows.css" type="text/css" />'); document.write('<link rel="stylesheet" href="public/css/theme/windows.css" type="text/css" />');
} }
function log(o) { function log(o) {
console.log(o); // console.trace(o);
} }
</script> </script>
</head> </head>
@@ -268,7 +268,7 @@ function log(o) {
<div id="noteMaskForLoading" class="note-mask"> <div id="noteMaskForLoading" class="note-mask">
<img src="public/images/loading-24.gif"/> <img src="public/images/loading-24.gif"/>
<br /> <br />
<span class="lang">loading</span>... <span class="lang">loading...</span>
</div> </div>
<div id="editorMask"> <div id="editorMask">
@@ -344,7 +344,7 @@ function log(o) {
<div id="leanoteNav" class="leanoteNav"> <div id="leanoteNav" class="leanoteNav">
<h1> <h1>
<i class="fa fa-align-justify" title="Note nav"></i> <i class="fa fa-align-justify" title="Note nav"></i>
<span class="lang">newNote</span> <span class="lang">nav</span>
</h1> </h1>
<div id="leanoteNavContent" class="leanoteNavContent"> <div id="leanoteNavContent" class="leanoteNavContent">
</div> </div>

View File

@@ -20,6 +20,7 @@
// width: 268px; // width: 268px;
// height: 346px; // height: 346px;
}, }
"chromium-args": "--enable-smooth-scrolling" // ,
// "chromium-args": "--enable-smooth-scrolling"
} }

View File

@@ -15,6 +15,7 @@
"min_height": 346, "min_height": 346,
"width": 278, "width": 278,
"height": 356 "height": 356
}, }
"chromium-args": "--enable-smooth-scrolling" //,
// "chromium-args": "--enable-smooth-scrolling"
} }

View File

@@ -15,6 +15,7 @@
"min_height": 326, "min_height": 326,
"width": 1100, "width": 1100,
"height": 600 "height": 600
}, }
"chromium-args": "--enable-smooth-scrolling" // ,
// "chromium-args": "--enable-smooth-scrolling"
} }

View File

@@ -19,5 +19,6 @@ var Config = {
"name": "繁体中文" "name": "繁体中文"
} }
], ],
"lang": "zh-hk" "lang": "zh-hk",
"theme": ""
}; };

View File

@@ -341,9 +341,9 @@ Note.curHasChanged = function(force) {
console.log(cacheNote.Content == content); console.log(cacheNote.Content == content);
} }
console.error('hasChanged'); // console.error('hasChanged');
console.log(Note.curNoteId); // console.log(Note.curNoteId);
console.log(hasChanged); // console.log(hasChanged);
hasChanged["UserId"] = cacheNote["UserId"] || ""; hasChanged["UserId"] = cacheNote["UserId"] || "";
@@ -467,7 +467,7 @@ Note.curChangedSaveIt = function(force, callback) {
return; return;
} }
console.error(">>"); // console.error(">>");
var hasChanged = Note.curHasChanged(force); var hasChanged = Note.curHasChanged(force);
@@ -583,30 +583,25 @@ Note.hideContentLoading = function() {
// 定位到笔记 // 定位到笔记
Note.directToNote = function(noteId) { Note.directToNote = function(noteId) {
var $p = $("#noteItemList"); // alert(noteId);
var pHeight = $p.height();
// 相对于父亲的位置
var $t = $("[noteId='" + noteId + "']"); var $t = $("[noteId='" + noteId + "']");
if($t.length == 0) { if($t.length == 0) {
return false; return false;
} }
// position方法返回的是元素的在页面内的绝对位置信息,top和left
var pTop = $t.position().top;
var scrollTop = $p.scrollTop();
pTop += scrollTop + 66; // 66是上面的title, search
/*
log("..");
log(noteId);
log(pTop + ' ' + pHeight + ' ' + scrollTop);
*/
// 当前的可视范围的元素位置是[scrollTop, pHeight + scrollTop] var $p = $("#noteItemList");
if(pTop >= scrollTop && pTop <= pHeight + scrollTop) { var pHeight = $p.height();
var scrollTop = $p.scrollTop();
var pTop = $t.position().top; // 相对于noteItemList的位置
// 当前的可视范围的元素位置是[0, pHeight]
if(pTop >= 0 && pTop <= pHeight) {
// alert(pTop + ' ' + scrollTop + ' ' + pHeight) // alert(pTop + ' ' + scrollTop + ' ' + pHeight)
} else { } else {
var top = pTop; // var top = pTop;
console.log("定位到特定note, 在可视范围内"); // console.log("定位到特定note, 在可视范围内");
$("#noteItemList").scrollTop(top - 66); $("#noteItemList").scrollTop(pTop + scrollTop);
} }
return true; return true;
}; };
@@ -678,7 +673,6 @@ Note.changeNote = function(selectNoteId, isShare, needSaveChanged, callback) {
var target = $(tt('[noteId="?"]', selectNoteId)) var target = $(tt('[noteId="?"]', selectNoteId))
Note.selectTarget(target); Note.selectTarget(target);
// 如果 inChangeNoteId == selectNoteId, 表示之前的note的content还在加载中, 此时保存笔记肯定出错 // 如果 inChangeNoteId == selectNoteId, 表示之前的note的content还在加载中, 此时保存笔记肯定出错
// if(Note.inChangeNoteId != Note.curNoteId) { // if(Note.inChangeNoteId != Note.curNoteId) {
@@ -700,31 +694,24 @@ Note.changeNote = function(selectNoteId, isShare, needSaveChanged, callback) {
// ajax之 // ajax之
var cacheNote = Note.cache[selectNoteId]; var cacheNote = Note.cache[selectNoteId];
// 判断是否是共享notes
if(!isShare) {
if(cacheNote.Perm != undefined) {
isShare = true;
}
}
var hasPerm = true; // !isShare || Share.hasUpdatePerm(selectNoteId); // 不是共享, 或者是共享但有权限 var hasPerm = true; // !isShare || Share.hasUpdatePerm(selectNoteId); // 不是共享, 或者是共享但有权限
// 有权限 // 有权限
if(hasPerm) {
Note.hideReadOnly();
Note.renderNote(cacheNote); Note.renderNote(cacheNote);
// 这里要切换编辑器 // 这里要切换编辑器
switchEditor(cacheNote.IsMarkdown); switchEditor(cacheNote.IsMarkdown);
Note.hideEditorMask(); Note.hideEditorMask();
} else {
Note.renderNoteReadOnly(cacheNote);
}
setTimeout(function() {
Attach.renderNoteAttachNum(selectNoteId, true); Attach.renderNoteAttachNum(selectNoteId, true);
});
// 下面很慢
Note.contentAjaxSeq++; Note.contentAjaxSeq++;
var seq = Note.contentAjaxSeq; var seq = Note.contentAjaxSeq;
function setContent(ret) { function setContent(ret, fromCache) {
if(ret) { if(ret) {
cacheNote.InitSync = false; cacheNote.InitSync = false;
} }
@@ -735,14 +722,13 @@ Note.changeNote = function(selectNoteId, isShare, needSaveChanged, callback) {
if(seq != Note.contentAjaxSeq) { if(seq != Note.contentAjaxSeq) {
return; return;
} }
if(!fromCache) {
Note.setNoteCache(ret, false); Note.setNoteCache(ret, false);
}
// 把其它信息也带上 // 把其它信息也带上
ret = Note.cache[selectNoteId] ret = Note.cache[selectNoteId]
if(hasPerm) { Note.renderNoteContent(ret, false);
Note.renderNoteContent(ret);
} else {
Note.renderNoteContentReadOnly(ret);
}
self.hideContentLoading(); self.hideContentLoading();
callback && callback(ret); callback && callback(ret);
@@ -750,7 +736,7 @@ Note.changeNote = function(selectNoteId, isShare, needSaveChanged, callback) {
// 不是刚同步过来的, 且有内容 // 不是刚同步过来的, 且有内容
if(!cacheNote.InitSync && cacheNote.Content) { if(!cacheNote.InitSync && cacheNote.Content) {
setContent(cacheNote); setContent(cacheNote, true);
return; return;
} }
@@ -876,22 +862,34 @@ Note.renderNote = function(note) {
}; };
// render content // render content
Note.renderNoteContent = function(content) { // 这一步很慢
Note.renderNoteContent = function(content, needRenderToLeft) {
// console.error('---------------- note:' + note.Title); // console.error('---------------- note:' + note.Title);
// console.trace(); // console.trace();
var s = (new Date()).getTime();
setEditorContent(content.Content, content.IsMarkdown, content.Preview); setEditorContent(content.Content, content.IsMarkdown, content.Preview);
var e = (new Date()).getTime();
console.log(e-s);
// console.log(content.NoteId + " => " + content.Content); // console.log(content.NoteId + " => " + content.Content);
// 只有在renderNoteContent时才设置curNoteId // 只有在renderNoteContent时才设置curNoteId
Note.setCurNoteId(content.NoteId); Note.setCurNoteId(content.NoteId);
if(needRenderToLeft == undefined) {
needRenderToLeft = true;
}
if(needRenderToLeft) {
// life // life
// 重新渲染到左侧 desc, 因为笔记传过来是没有desc的 // 重新渲染到左侧 desc, 因为笔记传过来是没有desc的
content.Desc = Note.genDesc(content.Content); content.Desc = Note.genDesc(content.Content);
content.ImgSrc = Note.getImgSrc(content.Content); content.ImgSrc = Note.getImgSrc(content.Content);
Note.renderChangedNote(content); Note.renderChangedNote(content);
}
}; };
Note.renderNoteDesc = function(note) { Note.renderNoteDesc = function(note) {
@@ -1595,7 +1593,7 @@ Note.searchNote = function() {
hideLoading(); hideLoading();
if(t == Note.searchSeq && notes) { if(t == Note.searchSeq && notes) {
Note.searchKey = val; Note.searchKey = val;
Notebook.changeCurNotebookTitle('Search results', false, notes.length, false, true); Notebook.changeCurNotebookTitle(getMsg('Search results'), false, notes.length, false, true);
Note.renderNotes(notes); Note.renderNotes(notes);
// markdown一旦setContent就focus, 导致搜索失去焦点 // markdown一旦setContent就focus, 导致搜索失去焦点
setTimeout(function() { setTimeout(function() {
@@ -2338,7 +2336,7 @@ var Attach = {
e.stopPropagation(); e.stopPropagation();
var attachId = $(this).closest('li').data("id"); var attachId = $(this).closest('li').data("id");
var t = this; var t = this;
if(confirm("Are you sure to delete it ?")) { if(confirm(getMsg("Are you sure to delete it ?"))) {
// $(t).button("loading"); // $(t).button("loading");
self.deleteAttach(attachId); self.deleteAttach(attachId);
// $(t).button("reset"); // $(t).button("reset");

View File

@@ -987,7 +987,7 @@ Notebook.deleteNotebookFromTree = function(notebookId) {
// 清空垃圾 // 清空垃圾
Notebook.clearTrash = function() { Notebook.clearTrash = function() {
var me = this; var me = this;
if(confirm('Are you sure ?')) { if(confirm(getMsg('Are you sure ?'))) {
NoteService.clearTrash(function() { NoteService.clearTrash(function() {
if(Notebook.curNotebookId == Notebook.trashNotebookId) { if(Notebook.curNotebookId == Notebook.trashNotebookId) {
Note.clearAll(); Note.clearAll();

View File

@@ -381,7 +381,7 @@ $(function() {
function deleteTag() { function deleteTag() {
$li = $(this).closest('li'); $li = $(this).closest('li');
var tag = $.trim($li.data("tag")); var tag = $.trim($li.data("tag"));
if(confirm("Are you sure ?")) { if(confirm(getMsg("Are you sure ?"))) {
TagService.deleteTag(tag, function(re) { TagService.deleteTag(tag, function(re) {
// re = {NoteId => note} // re = {NoteId => note}
if(typeof re == "object" && re.Ok !== false) { if(typeof re == "object" && re.Ok !== false) {

View File

@@ -1483,7 +1483,7 @@ var trimTitle = function(title) {
var Loading = { var Loading = {
show: function(msg) { show: function(msg) {
msg || (msg = "loading..."); msg || (msg = getMsg("loading..."));
$('#loadingDialogBodyMsg').html(msg); $('#loadingDialogBodyMsg').html(msg);
$('#loadingDialog').modal({backdrop: 'static', keyboard: false}); $('#loadingDialog').modal({backdrop: 'static', keyboard: false});
}, },

View File

@@ -187,6 +187,9 @@
"Switch account": "切换帐户", "Switch account": "切换帐户",
"Sync": "同步", "Sync": "同步",
"Loading": "正在加载", "Loading": "正在加载",
"Loading...": "正在加载",
"loading...": "正在加载",
"loading": "正在加载",
"Choose Files": "选择文件", "Choose Files": "选择文件",
"Check for updates": "检查更新", "Check for updates": "检查更新",
"Checking for udpates...": "正在检查是否有可用更新...", "Checking for udpates...": "正在检查是否有可用更新...",
@@ -252,6 +255,15 @@
"More...": "更多", "More...": "更多",
"Force full sync": "强制全量同步", "Force full sync": "强制全量同步",
"ForceFullSyncMsg": "强制全量同步会从服务器上同步所有数据, 可能耗时比较久, 你确定?" "ForceFullSyncMsg": "强制全量同步会从服务器上同步所有数据, 可能耗时比较久, 你确定?",
"Are you sure to delete it ?": "确定删除?",
"Are you sure ?": "你确定执行该操作?",
"Email or Password Error": "用户名或密码错误",
"Invalid host": "服务地址错误",
"Leanote login": "登录",
"Email is required": "请输入用户名或邮箱",
"Password is required": "请输入密码"
} }

View File

@@ -187,6 +187,9 @@
"Switch account": "切換帳戶", "Switch account": "切換帳戶",
"Sync": "同步", "Sync": "同步",
"Loading": "正在加載", "Loading": "正在加載",
"Loading...": "正在加載",
"loading...": "正在加載",
"loading": "正在加載",
"Choose Files": "選擇文件", "Choose Files": "選擇文件",
"Check for updates": "檢查更新", "Check for updates": "檢查更新",
"Checking for udpates...": "正在檢查是否有可用更新...", "Checking for udpates...": "正在檢查是否有可用更新...",
@@ -252,6 +255,15 @@
"More...": "更多", "More...": "更多",
"Force full sync": "強制全量同步", "Force full sync": "強制全量同步",
"ForceFullSyncMsg": "強制全量同步會從服務器上同步所有數據, 可能耗時比較久, 妳確定?" "ForceFullSyncMsg": "強制全量同步會從服務器上同步所有數據, 可能耗時比較久, 妳確定?",
"Are you sure to delete it ?": "確定刪除?",
"Are you sure ?": "妳確定執行該操作?",
"Email or Password Error": "用戶名或密碼錯誤",
"Invalid host": "服務地址錯誤",
"Leanote login": "登錄",
"Email is required": "請輸入用戶名或郵箱",
"Password is required": "請輸入密碼"
} }

View File

@@ -6,12 +6,21 @@ define(function() {
langs: { langs: {
'en-us': { 'en-us': {
'export': 'Export PDF', 'export': 'Export PDF',
'exportSuccess': 'PDF saved successful!',
'exportFailure': 'PDF saved failure!',
'notExists': 'Please sync your note to ther server firslty.'
}, },
'zh-cn': { 'zh-cn': {
'export': '导出PDF', 'export': '导出PDF',
'exportSuccess': 'PDF导出成功!',
'exportFailure': 'PDF导出失败!',
'notExists': '请先同步该笔记!'
}, },
'zh-hk': { 'zh-hk': {
'export': '導出PDF', 'export': '導出PDF',
'exportSuccess': 'PDF導出成功!',
'exportFailure': 'PDF導出失敗!',
'notExists': '請先同步該筆記!'
} }
}, },
@@ -32,12 +41,12 @@ define(function() {
Api.fileService.download(me.downloadPdfPath, name, function(ok, msg) { Api.fileService.download(me.downloadPdfPath, name, function(ok, msg) {
// console.log(ok + ' -=-'); // console.log(ok + ' -=-');
if(ok) { if(ok) {
new window.Notification('Info', { new window.Notification(getMsg('Info'), {
body: 'PDF saved successful!' body: getMsg('plugin.export_pdf.exportSuccess')
}); });
} else { } else {
new window.Notification('Warning', { new window.Notification(getMsg('Warning'), {
body: msg || 'PDF saved failure!' body: getMsg('plugin.export_pdf.exportFailure')
}); });
} }
}); });
@@ -53,7 +62,7 @@ define(function() {
return; return;
} }
var name = note.Title ? note.Title + '.pdf' : 'Untitled.pdf'; var name = note.Title ? note.Title + '.pdf' : getMsg('Untitled') + '.pdf';
window.downloadPdfPath = false; window.downloadPdfPath = false;
if(!me._inited) { if(!me._inited) {
@@ -74,14 +83,14 @@ define(function() {
} else { } else {
var m = ""; var m = "";
if(msg == "noteNotExists") { if(msg == "noteNotExists") {
m = "Please sync your note to ther server firslty." m = getMsg('plugin.export_pdf.notExists');
} }
// alert会死? // alert会死?
// alert('File not exists'); // alert('File not exists');
// https://github.com/nwjs/nw.js/wiki/Notification // https://github.com/nwjs/nw.js/wiki/Notification
var notification = new window.Notification('Warning', { var notification = new window.Notification(getMsg('Warning'), {
body: 'Export PDF error! ' + m body: getMsg('plugin.export_pdf.exportFailure') + m
// icon: appIcon // icon: appIcon
}); });
} }

View File

@@ -2,19 +2,31 @@
* 主题插件 * 主题插件
*/ */
define(function() { define(function() {
var theme = {
// 改变css langs: {
// var themes = {"Simple":'simple-no.css', 'Blue': 'blue.css', 'Black': 'black.css'}; 'en-us': {
'changeTheme': 'Change theme',
},
'zh-cn': {
'changeTheme': '主题设置',
},
'zh-hk': {
'changeTheme': '主題設置'
}
},
// dir => {} // dir => {}
var themeMap = { _themeMap : {
'default': { 'default': {
name: Api.getMsg('default'), name: Api.getMsg('default'),
dir: '' dir: ''
} }
} },
var themes = [ _themes: [],
themeMap['default'] getThemes: function() {
var me = this;
me._themes = [
me._themeMap['default']
]; ];
// 遍历主题目录, 得到主题 // 遍历主题目录, 得到主题
@@ -28,6 +40,10 @@ define(function() {
continue; continue;
} }
if(json.released === false) { // 还没成功
continue;
}
var themePrefixLang = 'theme.' + dir; var themePrefixLang = 'theme.' + dir;
Api.addLangMsgs(json.langs, themePrefixLang); Api.addLangMsgs(json.langs, themePrefixLang);
@@ -37,16 +53,18 @@ define(function() {
continue; continue;
} }
themeMap[dir] = { me._themeMap[dir] = {
name: name, // 主题名称 name: name, // 主题名称
dir: dir dir: dir
}; };
themes.push(themeMap[dir]); me._themes.push(me._themeMap[dir]);
} }
},
// 改变主题 // 改变主题
function changeTheme(themeDir) { changeTheme: function (themeDir) {
var me = this;
themeDir || (themeDir = ''); themeDir || (themeDir = '');
themeDir = themeDir.toLowerCase(); themeDir = themeDir.toLowerCase();
if(themeDir && themeDir != 'default') { if(themeDir && themeDir != 'default') {
@@ -56,68 +74,60 @@ define(function() {
$('#theme').attr('href', ''); $('#theme').attr('href', '');
} }
// 保存配置 Config.theme = themeDir;
UserService.updateG({Theme: themeDir}); var ok = Api.writeConfig(Config);
// 将其它的不选中 // 将其它的不选中
for(var i in themes) { for(var i in me._themes) {
var theme = themes[i]; var theme = me._themes[i];
if(theme.dir != themeDir) { if(theme.dir != themeDir) {
theme.menu.checked = false; theme.menu.checked = false;
} else { } else {
theme.menu.checked = true; theme.menu.checked = true;
} }
} }
} },
var theme = {
langs: {
'en-us': {
'changeTheme': 'Change theme',
},
'zh-cn': {
'changeTheme': '修改主题',
},
'zh-hk': {
'changeTheme': '修改主题'
}
},
// 打开前要执行的 // 打开前要执行的
onOpen: function() { onOpen: function() {
var me = this; var me = this;
var gui = Api.gui; var gui = Api.gui;
var themeSubmenus = new gui.Menu(); me._themeMenu = new gui.MenuItem({
label: Api.getMsg('plugin.theme.changeTheme'),
});
for(var i in themes) { // 设置
Api.setThemeMenu(me._themeMenu);
},
// 打开后
onOpenAfter: function() {
var me = this;
me.getThemes();
var themeSubmenus = new gui.Menu();
for(var i in me._themes) {
(function(curTheme) { (function(curTheme) {
curTheme.menu = new gui.MenuItem({ curTheme.menu = new gui.MenuItem({
label: curTheme.name, label: curTheme.name,
type: 'checkbox', type: 'checkbox',
click: function(e) { click: function(e) {
// var themeCss = themes[t]; // var themeCss = themes[t];
changeTheme(curTheme.dir); me.changeTheme(curTheme.dir);
} }
}); });
themeSubmenus.append(curTheme.menu); themeSubmenus.append(curTheme.menu);
})(themes[i]); })(me._themes[i]);
} }
var themeMenu = new gui.MenuItem({
label: Api.getMsg('plugin.theme.changeTheme'),
});
themeMenu.submenu = themeSubmenus;
// 设置 me._themeMenu.submenu = themeSubmenus;
Api.setThemeMenu(themeMenu);
},
// 打开后
onOpenAfter: function() {
// 修改主题 // 修改主题
changeTheme(UserInfo.Theme); me.changeTheme(Config.theme);
}, },
// 关闭时需要运行的 // 关闭时需要运行的
onClose: function() { onClose: function() {
} }
}; };

View File

@@ -185,7 +185,6 @@ h1, h2, h3 {
position: absolute; position: absolute;
top: -12px; top: -12px;
right: 20px; right: 20px;
background-image: url("../../images/triangle_2x.png");
background-size: 20px 12px; background-size: 20px 12px;
} }
} }
@@ -1718,6 +1717,9 @@ body {
top: 5px; top: 5px;
// padding-top: 5px; // padding-top: 5px;
} }
#note {
border-radius: 0 0 5px 0;
}
#noteList { #noteList {
top: 0; top: 0;
padding-top: 5px; padding-top: 5px;

View File

@@ -179,7 +179,6 @@ h3 {
position: absolute; position: absolute;
top: -12px; top: -12px;
right: 20px; right: 20px;
background-image: url("../../images/triangle_2x.png");
background-size: 20px 12px; background-size: 20px 12px;
} }
.dropdown-submenu .dropdown-menu:before { .dropdown-submenu .dropdown-menu:before {
@@ -1523,6 +1522,9 @@ body.init #pageInner {
#note { #note {
top: 5px; top: 5px;
} }
#note {
border-radius: 0 0 5px 0;
}
#noteList { #noteList {
top: 0; top: 0;
padding-top: 5px; padding-top: 5px;

View File

@@ -0,0 +1,101 @@
#leftNotebook {
background: none !important;
background-color: rgba(61, 61, 61, 0.96) !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;
}
/**
*/
#noteList,
#notesAndSort {
background: #444444;
}
#notesAndSort {
border: none;
}
#notesAndSort,
#notesAndSort a {
color: #fff;
}
#searchNote {
border-bottom: #3a3a3a 1px solid;
padding-bottom: 5px;
}
#searchNote input {
background: #3c3c3c;
border-color: #363636;
}
#noteItemListWrap {
top: 80px;
}
#noteItemList {
/* 不显示图片 */
}
#noteItemList .item {
height: 70px;
border: 1px solid #ebeff2;
background-color: #fff;
}
#noteItemList .item-thumb {
display: none;
}
#noteItemList .item-image .item-desc {
right: 0;
}

View File

@@ -0,0 +1,272 @@
#leftNotebook {
background: none !important;
background-color: rgba(39, 38, 38, 0.96) !important;
box-shadow: 5px 0px 5px #272626;
z-index: 3;
border-radius: 5px 0 0 5px;
}
.folderHeader .fa-left,
.folderHeader span {
color: #c2c2c2;
}
#addNotebookPlus {
color: #F9F8F8;
}
#notebookList {
border-top: none;
}
#notebookList input {
background: transparent;
color: #c2c2c2;
}
.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: #c2c2c2;
}
#searchNotebookForList {
background: transparent;
color: #c2c2c2;
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: #c2c2c2;
}
.progress-bar {
background: #c2c2c2;
}
#noteAndEditor {
border: none;
}
#noteList,
#notesAndSort {
background: #444444;
}
#notesAndSort {
border: none;
}
#notesAndSort,
#notesAndSort a {
color: #c2c2c2;
}
#searchNote {
border-bottom: #363636 1px solid;
padding-bottom: 5px;
}
#searchNote input {
background: #3c3c3c;
border-color: #363636;
}
#noteItemListWrap {
top: 80px;
}
#noteList {
border: none;
}
#noteItemList {
/* 不显示图片 */
}
#noteItemList .item {
height: 69px;
border: none;
border-bottom: 1px solid #363636;
background-color: transparent;
color: #c2c2c2;
overflow: hidden;
}
#noteItemList .item-title {
color: #c2c2c2;
border-bottom: none;
}
#noteItemList .item-info,
#noteItemList .item-desc {
color: #888888;
}
#noteItemList .item-thumb {
display: none;
}
#noteItemList .item-image .item-desc {
right: 0;
}
#noteItemList .item-desc {
left: 10px;
right: 10px;
}
#noteItemList .item-title,
#noteItemList .item-info {
padding-right: 5px;
}
#noteItemList .item:hover,
#noteItemList .contextmenu-hover {
background: #3c3c3c !important;
}
.item-active .item-info,
.item-active .desc,
.item-active .item-info .fa,
.item-active .item-title,
#noteItemList .item-active:hover .item-info .fa {
color: #eee!important;
}
.item-active,
#noteItemList .item-active:hover {
background-color: #868b87 !important;
}
#newMyNote #newNoteMarkdownBtn,
#newMyNote #newNoteBtn {
border: 1px solid #615E5E;
}
#noteAndEditor,
#note {
background-color: #272626 !important;
color: #c2c2c2;
}
#noteTitle {
background-color: #272626 !important;
color: #c2c2c2;
}
#editorTool a {
color: #c2c2c2;
}
#mceToolbar,
#wmd-button-bar {
background-color: transparent;
border-bottom: 1px solid #444040;
}
#tool {
border-bottom: 1px solid #444040;
}
.mce-btn {
background-color: transparent;
}
.mce-menubtn span,
.mce-ico {
color: #847D7D;
}
.mce-caret {
border-top-color: #847D7D;
}
.mce-btn i {
text-shadow: none;
}
i.mce-i-backcolor {
background: #454141;
}
.tool-split {
display: none;
}
.mce-colorbutton .mce-caret {
margin-top: 8px;
}
.more-fa {
color: #847D7D;
}
.mce-colorbutton .mce-btn-small .mce-preview {
margin-left: -18px;
}
.mce-colorbutton:hover .mce-open {
border-left-color: #5F5B5B;
border-right-color: #5F5B5B;
}
.mce-btn.mce-active,
.mce-btn.mce-active:hover,
.mce-btn:hover {
background-color: #413C3C;
}
.wmd-button-row,
.preview-button-row,
#mdEditor #wmd-input,
.extension-preview-buttons,
#mdEditor .preview-panel {
background: #272626;
}
.extension-preview-buttons {
border: none !important;
}
#mdEditor #wmd-input {
color: #c2c2c2;
}
#mdEditor .navbar-default {
border: none !important;
}
#leanoteNav,
#leanoteNavMd {
background-color: #2A2828;
}
#leanoteNavContent a,
#leanoteNavMd a {
color: #c2c2c2;
}
#editorBottom {
border: none;
}
#tag .add-tag-text {
color: #c2c2c2;
}
#addTagInput {
background: none;
color: #c2c2c2;
}
#editorMask {
background: #272626;
z-index: 88888 !important;
}
#editorMask a {
color: #c2c2c2;
}
body.writting #note #editor {
background: #272626;
}
body.writting #note #editorContentWrap {
background: #302E2E;
}
body.writting #note #editorContent {
background: #272626;
box-shadow: 0 1px 10px #000;
}
body.writting #note .mce-btn {
background: transparent !important;
}
body.writting #note #mceToolbar,
body.writting #note #mdEditor .navbar-default,
body.writting #note #wmd-button-bar {
box-shadow: 0 3px 10px #000;
}
body.writting #note #mdEditor,
body.writting #note #mceToolbar,
body.writting #note #wmd-button-bar {
background: #272626;
}
body.writting #note #mceToolbar,
body.writting #note #mdEditor .navbar-default,
body.writting #note #wmd-button-bar {
box-shadow: none;
}

View File

@@ -0,0 +1,16 @@
{
"author": "life",
"authorUrl": "http://life.leanote.com",
"desc": "夜色",
"langs": {
"en-us": {
"name": "Night"
},
"zh-cn": {
"name": "夜色"
},
"zh-hk": {
"name": "夜色"
}
}
}

View File

@@ -0,0 +1,318 @@
@noteBg: rgb(39, 38, 38);
@noteBgOpacity: rgba(39, 38, 38, 0.96);
@noteBgLess: rgba(68,68,68,1); // 稍浅
@noteBgLessDeep: rgba(54,54,54,1);
@noteBgDeep: #000;
@txtcolor: rgba(194,194,194,1); // rgba(196,196,196,1);
@txtColorAn: rgba(136,136,136,1);
@itemHoverBg: rgba(60,60,60,1);
@itemActiveBg: #868B87;
@leftNotebookColor: #eee;
#leftNotebook {
background: none !important;
background-color: @noteBgOpacity !important;
box-shadow: 5px 0px 5px @noteBg;
z-index: 3;
border-radius: 5px 0 0 5px;
}
#noteList {
// box-shadow: 0 0 10px @noteBgDeep;
// z-index: 2;
}
.folderHeader .fa-left,
.folderHeader span {
color: @txtcolor;
}
#addNotebookPlus {
color: #F9F8F8;
}
#notebookList {
border-top: none;
}
#notebookList input {
background: transparent;
color: @txtcolor;
}
.folderBody a:hover {
background-color: transparent !important;
font-weight: bold;
}
.ztree li a.curSelectedNode {
color: @leftNotebookColor;
}
.ztree li a.curSelectedNode,
#starNotes li.selected {
background-color: transparent;
font-weight: bold;
}
.ztree li a.curSelectedNode a,
#starNotes li.selected a {
color: @leftNotebookColor;
}
#starNotes li,
.ztree li {
border: none;
}
#starNotes li a,
.ztree li a {
color: @leftNotebookColor;
}
.sync-icon,
#myProfile a {
color: @txtcolor;
}
@searchNotebookForListBorderColor: rgba(230, 230, 230, 0.5);
#searchNotebookForList {
background: transparent;
color: @txtcolor;
border: 1px solid @searchNotebookForListBorderColor;
height: 25px;
}
#searchNotebookForList::-webkit-input-placeholder {
color: #eee !important;
/* WebKit browsers */
font-size: 12px;
}
.no-info {
color: @txtcolor;
}
.progress-bar {
background: @txtcolor;
}
#noteAndEditor {
border: none;
}
#noteList, #notesAndSort {
background: @noteBgLess;
}
#notesAndSort {
border: none;
&, a {
color: @txtcolor;
}
}
#searchNote {
border-bottom: @noteBgLessDeep 1px solid;
padding-bottom: 5px;
input {
background: @itemHoverBg;
border-color: @noteBgLessDeep;
}
}
#noteItemListWrap {
top: 80px;
}
#noteList {
border: none;
}
#noteItemList {
.item {
height: 69px;
border: none;
border-bottom: 1px solid @noteBgLessDeep;
background-color: transparent;
color: @txtcolor;
overflow: hidden;
}
.item-title {
color: @txtcolor;
border-bottom: none;
}
.item-info, .item-desc {
color: @txtColorAn;
}
.item-thumb {
display: none;
}
/* 不显示图片 */
.item-image .item-desc {
right: 0;
}
.item-desc{
left: 10px;
right: 10px;
}
.item-title, .item-info {
padding-right: 5px;
}
}
#noteItemList .item:hover, #noteItemList .contextmenu-hover {
background: @itemHoverBg !important;
}
.item-active .item-info,
.item-active .desc,
.item-active .item-info .fa,
.item-active .item-title,
#noteItemList .item-active:hover .item-info .fa {
color: #eee!important;
}
.item-active, #noteItemList .item-active:hover {
background-color: @itemActiveBg !important;
}
#newMyNote #newNoteMarkdownBtn, #newMyNote #newNoteBtn {
border: 1px solid #615E5E;
}
@noteBg: rgb(39, 38, 38);
#noteAndEditor, #note {
background-color: @noteBg !important;
color: @txtcolor;
// top: 0;
}
#noteTitle {
background-color: @noteBg !important;
color: @txtcolor;
}
#editorTool a {
color: @txtcolor;
}
//=========
// tinymce
// 编辑器按钮
#mceToolbar, #wmd-button-bar {
background-color: transparent;
border-bottom: 1px solid #444040;
}
#tool {
border-bottom: 1px solid #444040;
}
.mce-btn {
background-color: transparent;
}
// 按钮字体, 图标字体
.mce-menubtn span, .mce-ico {
color: #847D7D;
}
.mce-caret {
border-top-color: #847D7D;
}
// 图标
.mce-btn i {
text-shadow: none;
}
// 图标, 背景色
i.mce-i-backcolor {
background: #454141;
}
// 分隔线
.tool-split {
display: none;
}
// 下拉图标对齐
.mce-colorbutton .mce-caret {
margin-top: 8px;
}
.more-fa {
color: #847D7D;
}
// 文字, 文件背景图标下面那块的位置
.mce-colorbutton .mce-btn-small .mce-preview {
margin-left: -18px;
}
.mce-colorbutton:hover .mce-open {
border-left-color: #5F5B5B;
border-right-color: #5F5B5B;
}
.mce-btn.mce-active, .mce-btn.mce-active:hover, .mce-btn:hover {
background-color: #413C3C;
}
// md
.wmd-button-row, .preview-button-row,
#mdEditor #wmd-input,
.extension-preview-buttons,
#mdEditor .preview-panel {
background: @noteBg;
}
.extension-preview-buttons {
border: none !important;
}
#mdEditor #wmd-input {
color: @txtcolor;
}
#mdEditor .navbar-default {
border: none !important;
}
.btn-success:hover, .btn-success:focus, .btn-success:active {
background-color: rgba(128, 128, 128, 0.5) !important;
}
#wmd-input .code, #wmd-input .pre {
color: @txtcolor;
}
code.prettyprint, pre.prettyprint {
background-color: #E1E1E7;
}
// 文档导航
#leanoteNav, #leanoteNavMd {
background-color: #2A2828;
}
#leanoteNavContent a, #leanoteNavMd a {
color: @txtcolor;
}
#editorBottom {
border: none;
}
// tag
#tag .add-tag-text {
color: @txtcolor;
}
#addTagInput {
background: none;
color: @txtcolor;
}
// 无笔记, 何不?
#editorMask {
background: @noteBg;
z-index: 88888 !important;
a {
color: @txtcolor;
}
}
// writting
body.writting #note {
#editor {
background: @noteBg;
}
#editorContentWrap {
background: #302E2E;
}
#editorContent {
background: @noteBg;
box-shadow: 0 1px 10px #000;
}
.mce-btn {
background: transparent !important;
}
#mceToolbar, #mdEditor .navbar-default, #wmd-button-bar {
box-shadow: 0 3px 10px #000;
}
#mdEditor, #mceToolbar, #wmd-button-bar {
background: @noteBg;
}
#mceToolbar, #mdEditor .navbar-default, #wmd-button-bar {
box-shadow: none;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 KiB

View File

@@ -0,0 +1,289 @@
#leftNotebook {
background: none !important;
background-color: rgba(39, 38, 38, 0.96) !important;
box-shadow: 5px 0px 5px #272626;
z-index: 3;
border-radius: 5px 0 0 5px;
}
.folderHeader .fa-left,
.folderHeader span {
color: #c2c2c2;
}
#addNotebookPlus {
color: #F9F8F8;
}
#notebookList {
border-top: none;
}
#notebookList input {
background: transparent;
color: #c2c2c2;
}
.folderBody a:hover {
background-color: transparent !important;
font-weight: bold;
}
.ztree li a.curSelectedNode {
color: #eeeeee;
}
.ztree li a.curSelectedNode,
#starNotes li.selected {
background-color: transparent;
font-weight: bold;
}
.ztree li a.curSelectedNode a,
#starNotes li.selected a {
color: #eeeeee;
}
#starNotes li,
.ztree li {
border: none;
}
#starNotes li a,
.ztree li a {
color: #eeeeee;
}
.sync-icon,
#myProfile a {
color: #c2c2c2;
}
#searchNotebookForList {
background: transparent;
color: #c2c2c2;
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: #c2c2c2;
}
.progress-bar {
background: #c2c2c2;
}
#noteAndEditor {
border: none;
}
#noteList,
#notesAndSort {
background: #444444;
}
#notesAndSort {
border: none;
}
#notesAndSort,
#notesAndSort a {
color: #c2c2c2;
}
#searchNote {
border-bottom: #363636 1px solid;
padding-bottom: 5px;
}
#searchNote input {
background: #3c3c3c;
border-color: #363636;
}
#noteItemListWrap {
top: 80px;
}
#noteList {
border: none;
}
#noteItemList {
/* 不显示图片 */
}
#noteItemList .item {
height: 69px;
border: none;
border-bottom: 1px solid #363636;
background-color: transparent;
color: #c2c2c2;
overflow: hidden;
}
#noteItemList .item-title {
color: #c2c2c2;
border-bottom: none;
}
#noteItemList .item-info,
#noteItemList .item-desc {
color: #888888;
}
#noteItemList .item-thumb {
display: none;
}
#noteItemList .item-image .item-desc {
right: 0;
}
#noteItemList .item-desc {
left: 10px;
right: 10px;
}
#noteItemList .item-title,
#noteItemList .item-info {
padding-right: 5px;
}
#noteItemList .item:hover,
#noteItemList .contextmenu-hover {
background: #3c3c3c !important;
}
.item-active .item-info,
.item-active .desc,
.item-active .item-info .fa,
.item-active .item-title,
#noteItemList .item-active:hover .item-info .fa {
color: #eee!important;
}
.item-active,
#noteItemList .item-active:hover {
background-color: #868b87 !important;
}
#newMyNote #newNoteMarkdownBtn,
#newMyNote #newNoteBtn {
border: 1px solid #615E5E;
}
#noteAndEditor,
#note {
background-color: #272626 !important;
color: #c2c2c2;
}
#noteTitle {
background-color: #272626 !important;
color: #c2c2c2;
}
#editorTool a {
color: #c2c2c2;
}
#mceToolbar,
#wmd-button-bar {
background-color: transparent;
border-bottom: 1px solid #444040;
}
#tool {
border-bottom: 1px solid #444040;
}
.mce-btn {
background-color: transparent;
}
.mce-menubtn span,
.mce-ico {
color: #847D7D;
}
.mce-caret {
border-top-color: #847D7D;
}
.mce-btn i {
text-shadow: none;
}
i.mce-i-backcolor {
background: #454141;
}
.tool-split {
display: none;
}
.mce-colorbutton .mce-caret {
margin-top: 8px;
}
.more-fa {
color: #847D7D;
}
.mce-colorbutton .mce-btn-small .mce-preview {
margin-left: -18px;
}
.mce-colorbutton:hover .mce-open {
border-left-color: #5F5B5B;
border-right-color: #5F5B5B;
}
.mce-btn.mce-active,
.mce-btn.mce-active:hover,
.mce-btn:hover {
background-color: #413C3C;
}
.wmd-button-row,
.preview-button-row,
#mdEditor #wmd-input,
.extension-preview-buttons,
#mdEditor .preview-panel {
background: #272626;
}
.extension-preview-buttons {
border: none !important;
}
#mdEditor #wmd-input {
color: #c2c2c2;
}
#mdEditor .navbar-default {
border: none !important;
}
.btn-success:hover,
.btn-success:focus,
.btn-success:active {
background-color: rgba(128, 128, 128, 0.5) !important;
}
#wmd-input .code,
#wmd-input .pre {
color: #c2c2c2;
}
code.prettyprint,
pre.prettyprint {
background-color: #E1E1E7;
}
#leanoteNav,
#leanoteNavMd {
background-color: #2A2828;
}
#leanoteNavContent a,
#leanoteNavMd a {
color: #c2c2c2;
}
#editorBottom {
border: none;
}
#tag .add-tag-text {
color: #c2c2c2;
}
#addTagInput {
background: none;
color: #c2c2c2;
}
#editorMask {
background: #272626;
z-index: 88888 !important;
}
#editorMask a {
color: #c2c2c2;
}
body.writting #note #editor {
background: #272626;
}
body.writting #note #editorContentWrap {
background: #302E2E;
}
body.writting #note #editorContent {
background: #272626;
box-shadow: 0 1px 10px #000;
}
body.writting #note .mce-btn {
background: transparent !important;
}
body.writting #note #mceToolbar,
body.writting #note #mdEditor .navbar-default,
body.writting #note #wmd-button-bar {
box-shadow: 0 3px 10px #000;
}
body.writting #note #mdEditor,
body.writting #note #mceToolbar,
body.writting #note #wmd-button-bar {
background: #272626;
}
body.writting #note #mceToolbar,
body.writting #note #mdEditor .navbar-default,
body.writting #note #wmd-button-bar {
box-shadow: none;
}
#leftNotebook {
background: url(images/left_bg.jpg) no-repeat !important;
background-size: 100% auto !important;
}

View File

@@ -0,0 +1,16 @@
{
"author": "life",
"authorUrl": "http://life.leanote.com",
"desc": "鹅卵石-夜色",
"langs": {
"en-us": {
"name": "Pebbles-Night"
},
"zh-cn": {
"name": "鹅卵石-夜色"
},
"zh-hk": {
"name": "鵝卵石-夜色"
}
}
}

View File

@@ -0,0 +1,6 @@
@import "../night/theme.less";
#leftNotebook {
background: url(images/left_bg.jpg) no-repeat !important;
background-size: 100% auto !important;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 KiB

View File

@@ -0,0 +1,295 @@
#leftNotebook {
background: none !important;
background-color: rgba(238, 232, 213, 0.96) !important;
box-shadow: 5px 0px 5px #eee8d5;
z-index: 3;
border-radius: 5px 0 0 5px;
}
.folderHeader .fa-left,
.folderHeader span {
color: #93a1a1;
}
#addNotebookPlus {
color: #F9F8F8;
}
#notebookList {
border-top: none;
}
#notebookList input {
background: transparent;
color: #93a1a1;
}
.folderBody a:hover {
background-color: transparent !important;
font-weight: bold;
}
.ztree li a.curSelectedNode {
color: #3c3c3c;
}
.ztree li a.curSelectedNode,
#starNotes li.selected {
background-color: transparent;
font-weight: bold;
}
.ztree li a.curSelectedNode a,
#starNotes li.selected a {
color: #3c3c3c;
}
#starNotes li,
.ztree li {
border: none;
}
#starNotes li a,
.ztree li a {
color: #3c3c3c;
}
.sync-icon,
#myProfile a {
color: #93a1a1;
}
#searchNotebookForList {
background: transparent;
color: #93a1a1;
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: #93a1a1;
}
.progress-bar {
background: #93a1a1;
}
#noteAndEditor {
border: none;
}
#noteList,
#notesAndSort {
background: #fdf6e3;
}
#notesAndSort {
border: none;
}
#notesAndSort,
#notesAndSort a {
color: #93a1a1;
}
#searchNote {
border-bottom: #fdf6e3 1px solid;
padding-bottom: 5px;
}
#searchNote input {
background: #3c3c3c;
border-color: #fdf6e3;
}
#noteItemListWrap {
top: 80px;
}
#noteList {
border: none;
}
#noteItemList {
/* 不显示图片 */
}
#noteItemList .item {
height: 69px;
border: none;
border-bottom: 1px solid #fdf6e3;
background-color: transparent;
color: #93a1a1;
overflow: hidden;
}
#noteItemList .item-title {
color: #93a1a1;
border-bottom: none;
}
#noteItemList .item-info,
#noteItemList .item-desc {
color: #586e75;
}
#noteItemList .item-thumb {
display: none;
}
#noteItemList .item-image .item-desc {
right: 0;
}
#noteItemList .item-desc {
left: 10px;
right: 10px;
}
#noteItemList .item-title,
#noteItemList .item-info {
padding-right: 5px;
}
#noteItemList .item:hover,
#noteItemList .contextmenu-hover {
background: #3c3c3c !important;
}
.item-active .item-info,
.item-active .desc,
.item-active .item-info .fa,
.item-active .item-title,
#noteItemList .item-active:hover .item-info .fa {
color: #eee!important;
}
.item-active,
#noteItemList .item-active:hover {
background-color: #868b87 !important;
}
#newMyNote #newNoteMarkdownBtn,
#newMyNote #newNoteBtn {
border: 1px solid #615E5E;
}
#noteAndEditor,
#note {
background-color: #eee8d5 !important;
color: #93a1a1;
}
#noteTitle {
background-color: #eee8d5 !important;
color: #93a1a1;
}
#editorTool a {
color: #93a1a1;
}
#mceToolbar,
#wmd-button-bar {
background-color: transparent;
border-bottom: 1px solid #444040;
}
#tool {
border-bottom: 1px solid #444040;
}
.mce-btn {
background-color: transparent;
}
.mce-menubtn span,
.mce-ico {
color: #847D7D;
}
.mce-caret {
border-top-color: #847D7D;
}
.mce-btn i {
text-shadow: none;
}
i.mce-i-backcolor {
background: #454141;
}
.tool-split {
display: none;
}
.mce-colorbutton .mce-caret {
margin-top: 8px;
}
.more-fa {
color: #847D7D;
}
.mce-colorbutton .mce-btn-small .mce-preview {
margin-left: -18px;
}
.mce-colorbutton:hover .mce-open {
border-left-color: #5F5B5B;
border-right-color: #5F5B5B;
}
.mce-btn.mce-active,
.mce-btn.mce-active:hover,
.mce-btn:hover {
background-color: #413C3C;
}
.wmd-button-row,
.preview-button-row,
#mdEditor #wmd-input,
.extension-preview-buttons,
#mdEditor .preview-panel {
background: #eee8d5;
}
.extension-preview-buttons {
border: none !important;
}
#mdEditor #wmd-input {
color: #93a1a1;
}
#mdEditor .navbar-default {
border: none !important;
}
.btn-success:hover,
.btn-success:focus,
.btn-success:active {
background-color: rgba(128, 128, 128, 0.5) !important;
}
#wmd-input .code,
#wmd-input .pre {
color: #93a1a1;
}
code.prettyprint,
pre.prettyprint {
background-color: #E1E1E7;
}
#leanoteNav,
#leanoteNavMd {
background-color: #2A2828;
}
#leanoteNavContent a,
#leanoteNavMd a {
color: #93a1a1;
}
#editorBottom {
border: none;
}
#tag .add-tag-text {
color: #93a1a1;
}
#addTagInput {
background: none;
color: #93a1a1;
}
#editorMask {
background: #eee8d5;
z-index: 88888 !important;
}
#editorMask a {
color: #93a1a1;
}
body.writting #note #editor {
background: #eee8d5;
}
body.writting #note #editorContentWrap {
background: #302E2E;
}
body.writting #note #editorContent {
background: #eee8d5;
box-shadow: 0 1px 10px #000;
}
body.writting #note .mce-btn {
background: transparent !important;
}
body.writting #note #mceToolbar,
body.writting #note #mdEditor .navbar-default,
body.writting #note #wmd-button-bar {
box-shadow: 0 3px 10px #000;
}
body.writting #note #mdEditor,
body.writting #note #mceToolbar,
body.writting #note #wmd-button-bar {
background: #eee8d5;
}
body.writting #note #mceToolbar,
body.writting #note #mdEditor .navbar-default,
body.writting #note #wmd-button-bar {
box-shadow: none;
}
.folderHeader .fa-left,
.folderHeader span {
color: #3c3c3c;
}
#addNotebookPlus {
color: #93a1a1;
}
#searchNotebookForList {
background: rgba(202, 189, 151, 0.5);
}

View File

@@ -0,0 +1,17 @@
{
"author": "life",
"authorUrl": "http://life.leanote.com",
"desc": "书卷",
"released": false,
"langs": {
"en-us": {
"name": "Volumn"
},
"zh-cn": {
"name": "书卷"
},
"zh-hk": {
"name": "書卷"
}
}
}

View File

@@ -0,0 +1,25 @@
@import "../night/theme.less";
@noteBg: rgba(238,232,213,1);
@noteBgOpacity: rgba(238,232,213, 0.96);
@noteBgLess: rgba(253,246,227,1); // 稍浅
@noteBgLessDeep: rgba(253,246,227,1);
@noteBgDeep: #000;
@txtcolor: #93a1a1; // rgba(196,196,196,1);
@txtColorAn: #586e75;
@itemHoverBg: rgba(60,60,60,1);
@itemActiveBg: #868B87;
@leftNotebookColor: #3C3C3C;
.folderHeader .fa-left,
.folderHeader span {
color: @leftNotebookColor;
}
#addNotebookPlus {
color: @txtcolor;
}
#searchNotebookForList {
background: rgba(202, 189, 151, 0.5);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

View File

@@ -0,0 +1,289 @@
#leftNotebook {
background: none !important;
background-color: rgba(39, 38, 38, 0.96) !important;
box-shadow: 5px 0px 5px #272626;
z-index: 3;
border-radius: 5px 0 0 5px;
}
.folderHeader .fa-left,
.folderHeader span {
color: #c2c2c2;
}
#addNotebookPlus {
color: #F9F8F8;
}
#notebookList {
border-top: none;
}
#notebookList input {
background: transparent;
color: #c2c2c2;
}
.folderBody a:hover {
background-color: transparent !important;
font-weight: bold;
}
.ztree li a.curSelectedNode {
color: #eeeeee;
}
.ztree li a.curSelectedNode,
#starNotes li.selected {
background-color: transparent;
font-weight: bold;
}
.ztree li a.curSelectedNode a,
#starNotes li.selected a {
color: #eeeeee;
}
#starNotes li,
.ztree li {
border: none;
}
#starNotes li a,
.ztree li a {
color: #eeeeee;
}
.sync-icon,
#myProfile a {
color: #c2c2c2;
}
#searchNotebookForList {
background: transparent;
color: #c2c2c2;
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: #c2c2c2;
}
.progress-bar {
background: #c2c2c2;
}
#noteAndEditor {
border: none;
}
#noteList,
#notesAndSort {
background: #444444;
}
#notesAndSort {
border: none;
}
#notesAndSort,
#notesAndSort a {
color: #c2c2c2;
}
#searchNote {
border-bottom: #363636 1px solid;
padding-bottom: 5px;
}
#searchNote input {
background: #3c3c3c;
border-color: #363636;
}
#noteItemListWrap {
top: 80px;
}
#noteList {
border: none;
}
#noteItemList {
/* 不显示图片 */
}
#noteItemList .item {
height: 69px;
border: none;
border-bottom: 1px solid #363636;
background-color: transparent;
color: #c2c2c2;
overflow: hidden;
}
#noteItemList .item-title {
color: #c2c2c2;
border-bottom: none;
}
#noteItemList .item-info,
#noteItemList .item-desc {
color: #888888;
}
#noteItemList .item-thumb {
display: none;
}
#noteItemList .item-image .item-desc {
right: 0;
}
#noteItemList .item-desc {
left: 10px;
right: 10px;
}
#noteItemList .item-title,
#noteItemList .item-info {
padding-right: 5px;
}
#noteItemList .item:hover,
#noteItemList .contextmenu-hover {
background: #3c3c3c !important;
}
.item-active .item-info,
.item-active .desc,
.item-active .item-info .fa,
.item-active .item-title,
#noteItemList .item-active:hover .item-info .fa {
color: #eee!important;
}
.item-active,
#noteItemList .item-active:hover {
background-color: #868b87 !important;
}
#newMyNote #newNoteMarkdownBtn,
#newMyNote #newNoteBtn {
border: 1px solid #615E5E;
}
#noteAndEditor,
#note {
background-color: #272626 !important;
color: #c2c2c2;
}
#noteTitle {
background-color: #272626 !important;
color: #c2c2c2;
}
#editorTool a {
color: #c2c2c2;
}
#mceToolbar,
#wmd-button-bar {
background-color: transparent;
border-bottom: 1px solid #444040;
}
#tool {
border-bottom: 1px solid #444040;
}
.mce-btn {
background-color: transparent;
}
.mce-menubtn span,
.mce-ico {
color: #847D7D;
}
.mce-caret {
border-top-color: #847D7D;
}
.mce-btn i {
text-shadow: none;
}
i.mce-i-backcolor {
background: #454141;
}
.tool-split {
display: none;
}
.mce-colorbutton .mce-caret {
margin-top: 8px;
}
.more-fa {
color: #847D7D;
}
.mce-colorbutton .mce-btn-small .mce-preview {
margin-left: -18px;
}
.mce-colorbutton:hover .mce-open {
border-left-color: #5F5B5B;
border-right-color: #5F5B5B;
}
.mce-btn.mce-active,
.mce-btn.mce-active:hover,
.mce-btn:hover {
background-color: #413C3C;
}
.wmd-button-row,
.preview-button-row,
#mdEditor #wmd-input,
.extension-preview-buttons,
#mdEditor .preview-panel {
background: #272626;
}
.extension-preview-buttons {
border: none !important;
}
#mdEditor #wmd-input {
color: #c2c2c2;
}
#mdEditor .navbar-default {
border: none !important;
}
.btn-success:hover,
.btn-success:focus,
.btn-success:active {
background-color: rgba(128, 128, 128, 0.5) !important;
}
#wmd-input .code,
#wmd-input .pre {
color: #c2c2c2;
}
code.prettyprint,
pre.prettyprint {
background-color: #E1E1E7;
}
#leanoteNav,
#leanoteNavMd {
background-color: #2A2828;
}
#leanoteNavContent a,
#leanoteNavMd a {
color: #c2c2c2;
}
#editorBottom {
border: none;
}
#tag .add-tag-text {
color: #c2c2c2;
}
#addTagInput {
background: none;
color: #c2c2c2;
}
#editorMask {
background: #272626;
z-index: 88888 !important;
}
#editorMask a {
color: #c2c2c2;
}
body.writting #note #editor {
background: #272626;
}
body.writting #note #editorContentWrap {
background: #302E2E;
}
body.writting #note #editorContent {
background: #272626;
box-shadow: 0 1px 10px #000;
}
body.writting #note .mce-btn {
background: transparent !important;
}
body.writting #note #mceToolbar,
body.writting #note #mdEditor .navbar-default,
body.writting #note #wmd-button-bar {
box-shadow: 0 3px 10px #000;
}
body.writting #note #mdEditor,
body.writting #note #mceToolbar,
body.writting #note #wmd-button-bar {
background: #272626;
}
body.writting #note #mceToolbar,
body.writting #note #mdEditor .navbar-default,
body.writting #note #wmd-button-bar {
box-shadow: none;
}
#leftNotebook {
background: url(images/water@2x.jpg) no-repeat !important;
background-size: 100% auto !important;
}

View File

@@ -0,0 +1,16 @@
{
"author": "life",
"authorUrl": "http://life.leanote.com",
"desc": "波光-夜色",
"langs": {
"en-us": {
"name": "Water-Night"
},
"zh-cn": {
"name": "波光-夜色"
},
"zh-hk": {
"name": "波光-夜色"
}
}
}

View File

@@ -0,0 +1,6 @@
@import "../night/theme.less";
#leftNotebook {
background: url(images/water@2x.jpg) no-repeat !important;
background-size: 100% auto !important;
}