diff --git a/README.md b/README.md index 3bd87ca..33a3cbe 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,27 @@ # NotePadOnline ## NPO是什么? -NotePadOnline(以下简称为"NPO")不仅提供简洁的跨端笔记传输功能,也支持笔记设密、分享等实用功能。不仅如此,经过多代打磨,在安全性得到大幅提升的同时,便利性与实用性也在不断攀升。现在你已经可以在最新的版本中自由定义笔记的分享与否,还可以为笔记的分享设置密码。同时由于算法和逻辑的迭代更新,程序冗余度正不断减少。安全、便利与实用一直是NPO的初心,同时我们也深知没有设计就失去了灵魂。因此在3.0及以上版本中,NPO不仅很好地剥离了程序本体与主题,也支持主题切换。NPO默认主题的视觉效果也正不断更新迭代,在此NPO欢迎所有人创作属于自己的主题。 +NotePadOnline(以下简称为"NPO")是一款类石墨文档的办公协同跨终端文档同步程序,支持文档设密、自定义分享开关、分享设密、导出为Word等功能。NPO是不依赖数据库的轻量程序,且在迭代更新中,兼具安全性和实用性。 ## NPO的未来计划? -### 1.NPO正逐步开放可供设定的权限与内容,目前处于更新计划中的有 -[1]短网址支持 -[2]注销所有笔记 -[3]定时清理过时笔记缓存 -[4]更多主题 -注意:处于更新计划中并不意味着一定会得到更新,也可能会在未来砍掉;NPO没有后台,因此相关内容的设定仍需修改lib/config.php文件 -### 2.NPO会更新一些实用功能,目前已被考虑的有 -~~[1]分享页的二维码展示(完成)~~ -[2]笔记分享的邀请码功能 -~~[3]白昼与黑夜模式(完成)~~ -~~[4]离线笔记(完成)~~ -~~[5]笔记的内容清空(完成)~~ -[6]删除笔记(连带缓存文件) -~~[7]分享页设密(完成,且在3.0中进一步分离编辑页与分享页)~~ -### 考虑过或者是被建议过的功能,但短期内甚至是长期也不一定会实现的有 -[1]分享笔记的付费查看功能(理由:臃肿繁琐) -[2]用户功能:包括查看访问过的笔记足迹、部分笔记设定用户归属、分发笔记可见或可改权限(理由:繁琐复杂、臃肿繁琐) -[3]后台管理(理由:没有必要) -[4]插件功能(理由:轻量为主、且愿意做插件的人局指可数) +### 1.NPO正准备自"笔记同步"升级到"办公协同" +版权、用户、企业等相关功能将在后续完善 +### 2.NPO的更新计划中有 +[1]办公协同相关 +[2]短网址支持 +[3]注销过期笔记 +[4]更多主题样式 +注意:处于更新计划中仍有可能会因各种原因在未来被砍掉 ## 为什么有NPO? -NPO原型是EverTools基金会的NotePad_Live。之所以延续NotePad_Live是因为作者喜爱并享受NotePad.live的便利,然而不久前宣称永不关闭的NotePad.live已经无法打开,于是便有了延续并重构NotePad_Live的想法与计划。 +NPO最早的灵感是基于EverTools基金会的NotePad_Live。之所以延续NotePad_Live是因为作者喜爱并享受NotePad.live的便利,然而不久前宣称永不关闭的NotePad.live已经无法打开,于是便有了延续并重构NotePad_Live的想法与计划。 +目前正打算升级到“办公协同”是受到石墨文档的启发 ## 作者是谁? -不得志的人生输家 +欢迎关注我的个人博客(http://94joy.cn) ## 演示(Demo)与下载(Download) -演示:94NotePad公益 +演示:NPO(http://n.94joy.cn) 下载1:Github(https://github.com/2613df/NotepadOnline/releases) ## 快拿银子来砸我吧! @@ -39,4 +29,4 @@ NPO原型是EverTools基金会的NotePad_Live。之所以延续NotePad_Live是 ![推荐使用微信赞助](https://github.com/2613df/NotepadOnline/raw/master/assets/image/wechatpay.png) 非常感谢您了!!!!! 如果您是学生且愿意支持这个项目的话,就请将这个项目或是n.94joy.cn这个网址推荐给身边的同学吧,如果能点个星星就更好了,万分感谢您的支持。 -如果你对项目或是网站发展有建议的话,请在Github上发表您的想法,我会第一时间处理! +如果你对项目或是网站发展有建议的话,请在Github上发表您的想法,我会第一时间处理! \ No newline at end of file diff --git a/assets/js/jquery.hotkeys.js b/assets/js/jquery.hotkeys.js new file mode 100644 index 0000000..e7701f3 --- /dev/null +++ b/assets/js/jquery.hotkeys.js @@ -0,0 +1,204 @@ +/*jslint browser: true*/ +/*jslint jquery: true*/ + +/* + * jQuery Hotkeys Plugin + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * + * Based upon the plugin by Tzury Bar Yochay: + * https://github.com/tzuryby/jquery.hotkeys + * + * Original idea by: + * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/ + */ + +/* + * One small change is: now keys are passed by object { keys: '...' } + * Might be useful, when you want to pass some other data to your handler + */ + +(function(jQuery) { + + jQuery.hotkeys = { + version: "0.2.0", + + specialKeys: { + 8: "backspace", + 9: "tab", + 10: "return", + 13: "return", + 16: "shift", + 17: "ctrl", + 18: "alt", + 19: "pause", + 20: "capslock", + 27: "esc", + 32: "space", + 33: "pageup", + 34: "pagedown", + 35: "end", + 36: "home", + 37: "left", + 38: "up", + 39: "right", + 40: "down", + 45: "insert", + 46: "del", + 59: ";", + 61: "=", + 96: "0", + 97: "1", + 98: "2", + 99: "3", + 100: "4", + 101: "5", + 102: "6", + 103: "7", + 104: "8", + 105: "9", + 106: "*", + 107: "+", + 109: "-", + 110: ".", + 111: "/", + 112: "f1", + 113: "f2", + 114: "f3", + 115: "f4", + 116: "f5", + 117: "f6", + 118: "f7", + 119: "f8", + 120: "f9", + 121: "f10", + 122: "f11", + 123: "f12", + 144: "numlock", + 145: "scroll", + 173: "-", + 186: ";", + 187: "=", + 188: ",", + 189: "-", + 190: ".", + 191: "/", + 192: "`", + 219: "[", + 220: "\\", + 221: "]", + 222: "'" + }, + + shiftNums: { + "`": "~", + "1": "!", + "2": "@", + "3": "#", + "4": "$", + "5": "%", + "6": "^", + "7": "&", + "8": "*", + "9": "(", + "0": ")", + "-": "_", + "=": "+", + ";": ": ", + "'": "\"", + ",": "<", + ".": ">", + "/": "?", + "\\": "|" + }, + + // excludes: button, checkbox, file, hidden, image, password, radio, reset, search, submit, url + textAcceptingInputTypes: [ + "text", "password", "number", "email", "url", "range", "date", "month", "week", "time", "datetime", + "datetime-local", "search", "color", "tel"], + + // default input types not to bind to unless bound directly + textInputTypes: /textarea|input|select/i, + + options: { + filterInputAcceptingElements: true, + filterTextInputs: true, + filterContentEditable: true + } + }; + + function keyHandler(handleObj) { + if (typeof handleObj.data === "string") { + handleObj.data = { + keys: handleObj.data + }; + } + + // Only care when a possible input has been specified + if (!handleObj.data || !handleObj.data.keys || typeof handleObj.data.keys !== "string") { + return; + } + + var origHandler = handleObj.handler, + keys = handleObj.data.keys.toLowerCase().split(" "); + + handleObj.handler = function(event) { + // Don't fire in text-accepting inputs that we didn't directly bind to + if (this !== event.target && + (jQuery.hotkeys.options.filterInputAcceptingElements && + jQuery.hotkeys.textInputTypes.test(event.target.nodeName) || + (jQuery.hotkeys.options.filterContentEditable && jQuery(event.target).attr('contenteditable')) || + (jQuery.hotkeys.options.filterTextInputs && + jQuery.inArray(event.target.type, jQuery.hotkeys.textAcceptingInputTypes) > -1))) { + return; + } + + var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[event.which], + character = String.fromCharCode(event.which).toLowerCase(), + modif = "", + possible = {}; + + jQuery.each(["alt", "ctrl", "shift"], function(index, specialKey) { + + if (event[specialKey + 'Key'] && special !== specialKey) { + modif += specialKey + '+'; + } + }); + + // metaKey is triggered off ctrlKey erronously + if (event.metaKey && !event.ctrlKey && special !== "meta") { + modif += "meta+"; + } + + if (event.metaKey && special !== "meta" && modif.indexOf("alt+ctrl+shift+") > -1) { + modif = modif.replace("alt+ctrl+shift+", "hyper+"); + } + + if (special) { + possible[modif + special] = true; + } + else { + possible[modif + character] = true; + possible[modif + jQuery.hotkeys.shiftNums[character]] = true; + + // "$" can be triggered as "Shift+4" or "Shift+$" or just "$" + if (modif === "shift+") { + possible[jQuery.hotkeys.shiftNums[character]] = true; + } + } + + for (var i = 0, l = keys.length; i < l; i++) { + if (possible[keys[i]]) { + return origHandler.apply(this, arguments); + } + } + }; + } + + jQuery.each(["keydown", "keyup", "keypress"], function() { + jQuery.event.special[this] = { + add: keyHandler + }; + }); + +})(jQuery || this.jQuery || window.jQuery); diff --git a/content/templates/default/assets/css/main.css b/content/templates/default/assets/css/main.css index 5e80bcc..aa479d0 100644 --- a/content/templates/default/assets/css/main.css +++ b/content/templates/default/assets/css/main.css @@ -17,15 +17,49 @@ /* height:inherit !important; */} .w-e-toolbar{ - flex-wrap: wrap; + /*flex-wrap: wrap;*/ background-color:#f7f7f7; + /*justify-content: center;*/ + /*height:34px;*/ + /*height: 300px;*/ +/* overflow-x: visible; + overflow-y: visible;*/ + width:100%; + z-index: 25000; +/* overflow-x: auto; + overflow-y: visible;*/ /*line-height: 1.5rem;*/ + /*overflow: hidden;*/ + text-align: center !important; +} +#toolNone{ + text-align: center; + width:100%; + background-color:#f7f7f7; + padding-top:5px; + height:34px; +} +.navbarTop{ + /*z-index: 30000;*/ + height: 3.5rem; +} +.navbarTopCollapse{ + position: absolute; + top:.5rem; + right:.5rem; +} +#navbarSupportedContent{ + background-color: #fff; +} +.w-e-menu{ + display: inline-block; } .dropdown-menu.show{ z-index: 20000; } .modal{ z-index: 20000; + user-select: none; } .broadcastTop{ position: absolute; @@ -66,9 +100,9 @@ padding-left: 1rem !important; }*/ -.containerContent{ +/*.containerContent{ height:calc(100% - 3.5rem); -} +}*/ /*.containerTips,.containerForm{ height:calc(100% - 6rem); } @@ -109,48 +143,15 @@ margin:auto; resize: none; margin-bottom:0;/*抵消BS4.2的问题*/ } -/*.content:hover{ - color: #495057; - border-color: #a5d9f3; +#editorDiv{ + height:calc(100% - 34px); } -.content:focus{ - color: #495057; - border-color: #4cb4e7; - box-shadow: 0 0 0 .2rem rgba(165,217,243,.25); -}*/ -.footer { - /*position:fixed; - bottom:0rem; - height:auto;*/ - /*width:100%; - text-align:center;*/ - +.docDiv{ + height:calc(100% - 3.5rem); } -/*.bodyBtn{padding-bottom:8.5rem;} -.bodyNoBtn{padding-bottom:2.5rem;} -.footerBtn{height:5rem;} -.footerNoBtn{height:2.5rem;}*/ -/*#controls { - padding:.5rem; - text-align:center; - margin:0 auto; - background-color:#f9f9fa; -} -pre { - white-space:pre-wrap; - white-space:-moz-pre-wrap; - white-space:-pre-wrap; - white-space:-o-pre-wrap; - word-wrap:break-word; -}*/ body { background-color:#f7f7f7; } - - -.containerContent{ - background-color: #fff; -} .dark{ background-color: #171616; color: #dedede; @@ -158,8 +159,6 @@ body { .dark nav{ background-color: #666666; color: #dedede; - - } .dark .content,.dark .content:hover,.dark .content:focus { background-color: #171616; @@ -170,17 +169,21 @@ body { .dark #controls{ background-color: #666666; color: #dedede; - } .w-e-text{ overflow-y:auto !important; padding:0 1rem !important; } - +#editorDiv{ + background-color: #fff; +} +.w-e-text{ + margin-right: 10rem !important; +} /*滚动条整体样式*/ ::-webkit-scrollbar { width: 10px; - /*height: 1px;*/ + height: 10px; } /*滚动条滑块*/ /*::-webkit-scrollbar-thumb { @@ -290,7 +293,15 @@ height:100%; border-bottom-right-radius:.25em; } #toastTopClose{ + color: #6c757d; float:right; + font-size: 1.5rem; + font-weight: 700; + line-height: 1; +} +#toastTopClose:hover{ + color: #000; + text-decoration: none; } #moreTog{ display: inline-block; diff --git a/content/templates/default/footer.php b/content/templates/default/footer.php index 98dbd60..7c36cef 100644 --- a/content/templates/default/footer.php +++ b/content/templates/default/footer.php @@ -34,10 +34,10 @@

Alex Lee

使用的开源程序

Bootstrap | Jquery | Popper | font-awesome | wangeditor | clipboard.js | QRCode.js | FileSaver.js | jquery.wordexport.js -

idea来源

+

创意来源

Notepad_live | 石墨文档

关于NPO

-

项目地址:Github
当前版本:3.2
更新内容:
1 优化滚动条样式和显示逻辑
2 优化保存 / 同步逻辑,支持多终端同步
3 优化文档样式
4 新增顶部广播
5 顶栏不再能被选中
6 优化分享功能
7 支持导出Word
8 修复一定情况下Word导出失败的问题

+

项目地址:Github
当前版本:3.21
更新内容:
1 优化滚动条样式和显示逻辑
2 优化保存 / 同步逻辑,支持多终端同步
3 优化文档样式
4 新增顶部广播
5 顶栏不再能被选中
6 优化分享功能
7 支持导出Word
8 修复一定情况下Word导出失败的问题
9 捕获组合按键,优化体验
10 优化工具栏
11 进一步优化移动端(含iPad)体验

- - - - - - - - - + - - - - - - - - + \ No newline at end of file diff --git a/content/templates/default/header.php b/content/templates/default/header.php index 08fdbe4..8ef52d0 100644 --- a/content/templates/default/header.php +++ b/content/templates/default/header.php @@ -14,23 +14,21 @@ -